Skip to content

Commit eadf951

Browse files
cmoogkyleconroy
authored andcommitted
patches mysql support for bool types (#291)
1 parent f266a24 commit eadf951

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/mysql/gen.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ func goTypeCol(col *sqlparser.ColumnDefinition, settings dinosql.GenerateSetting
230230
}
231231
return "sql.NullString"
232232
case "int" == t, "integer" == t, t == "smallint",
233-
t == "tinyint", "mediumint" == t, "bigint" == t, "year" == t:
233+
"mediumint" == t, "bigint" == t, "year" == t:
234234
if col.Type.NotNull {
235235
return "int"
236236
}
@@ -250,7 +250,7 @@ func goTypeCol(col *sqlparser.ColumnDefinition, settings dinosql.GenerateSetting
250250
return "time.Time"
251251
}
252252
return "sql.NullTime"
253-
case "boolean" == t:
253+
case "boolean" == t, "bool" == t, "tinyint" == t:
254254
if col.Type.NotNull {
255255
return "bool"
256256
}

0 commit comments

Comments
 (0)