Skip to content

Commit

Permalink
identify table name using double quotes (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
1dustycy authored Jun 26, 2024
1 parent e7643cd commit 9073298
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/codegen/golang/dumploader.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ func (d DumpLoader) ParamList() string {
}

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

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

0 comments on commit 9073298

Please sign in to comment.