feat: support parsing mysql data types bit(1) and decimal

This commit is contained in:
zhuyasen
2025-01-19 21:55:27 +08:00
parent 2e313280ff
commit 44493211a5
6 changed files with 197 additions and 99 deletions

View File

@@ -289,7 +289,7 @@ func convertMongoToMysqlType(goType string) string {
case goTypeTime:
return "timestamp" //nolint
case goTypeBool:
return "tinyint(1)"
return "bit(1)"
case goTypeOID, goTypeNil, goTypeBytes, goTypeInterface, goTypeSliceInterface, goTypeInts, goTypeStrings:
return "json"
}
@@ -314,7 +314,7 @@ func convertToProtoFieldType(name string, goType string) string {
case "[]int32":
return "repeated int32"
case "[]byte":
return "string"
return "bytes"
case goTypeStrings:
return "repeated string"
}