Skip to content

Commit 9073298

Browse files
authored
identify table name using double quotes (#4)
1 parent e7643cd commit 9073298

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

internal/codegen/golang/dumploader.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ func (d DumpLoader) ParamList() string {
6868
}
6969

7070
func (d DumpLoader) DumpSQL() string {
71-
return fmt.Sprintf("SELECT %s FROM %s ORDER BY %s ASC;",
71+
return fmt.Sprintf(`SELECT %s FROM \"%s\" ORDER BY %s ASC;`,
7272
d.FieldDBNames(), d.MainStruct.Table.Name, d.DumpSortByFields())
7373
}
7474

7575
func (d DumpLoader) LoadSQL() string {
76-
return fmt.Sprintf("INSERT INTO %s (%s) VALUES (%s);",
76+
return fmt.Sprintf(`INSERT INTO \"%s\" (%s) VALUES (%s);`,
7777
d.MainStruct.Table.Name, d.FieldDBNames(), d.ParamList())
7878
}

0 commit comments

Comments
 (0)