Skip to content

Commit 1165df0

Browse files
authored
dolphin: Represent tinyint as int32 (#797)
1 parent 5520677 commit 1165df0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

internal/codegen/golang/mysql_type.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func mysqlType(r *compiler.Result, col *compiler.Column, settings config.Combine
2121
}
2222
return "sql.NullString"
2323

24-
case "int", "integer", "smallint", "mediumint", "year":
24+
case "int", "integer", "tinyint", "smallint", "mediumint", "year":
2525
if notNull {
2626
return "int32"
2727
}
@@ -58,7 +58,7 @@ func mysqlType(r *compiler.Result, col *compiler.Column, settings config.Combine
5858
}
5959
return "sql.NullTime"
6060

61-
case "boolean", "bool", "tinyint":
61+
case "boolean", "bool":
6262
if notNull {
6363
return "bool"
6464
}

internal/endtoend/testdata/insert_select/mysql/go/models.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/endtoend/testdata/insert_select/mysql/go/query.sql.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)