File tree Expand file tree Collapse file tree 2 files changed +192
-196
lines changed Expand file tree Collapse file tree 2 files changed +192
-196
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,6 @@ export const apply = ({
3434 let output = `
3535package database
3636
37- import "database/sql"
38-
3937${ tables
4038 . filter ( ( table ) => schemas . some ( ( schema ) => schema . name === table . schema ) )
4139 . flatMap ( ( table ) =>
@@ -275,13 +273,13 @@ const GO_TYPE_MAP = {
275273type GoType = ( typeof GO_TYPE_MAP ) [ keyof typeof GO_TYPE_MAP ]
276274
277275const GO_NULLABLE_TYPE_MAP : Record < GoType , string > = {
278- string : 'sql.NullString ' ,
279- bool : 'sql.NullBool ' ,
280- int16 : 'sql.NullInt32 ' ,
281- int32 : 'sql.NullInt32 ' ,
282- int64 : 'sql.NullInt64 ' ,
283- float32 : 'sql.NullFloat64 ' ,
284- float64 : 'sql.NullFloat64 ' ,
276+ string : '*string ' ,
277+ bool : '*bool ' ,
278+ int16 : '*int16 ' ,
279+ int32 : '*int32 ' ,
280+ int64 : '*int64 ' ,
281+ float32 : '*float32 ' ,
282+ float64 : '*float64 ' ,
285283 '[]byte' : '[]byte' ,
286284 'interface{}' : 'interface{}' ,
287285 'map[string]interface{}' : 'map[string]interface{}' ,
You can’t perform that action at this time.
0 commit comments