[bug] Escape reserved words used as identifier.
This commit is contained in:
parent
63c1fd6430
commit
3019fdbbb2
10 changed files with 226 additions and 4 deletions
|
|
@ -291,7 +291,7 @@ func TestGeneratedAllTypesSQLBuilderFiles(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
|
||||
testutils.AssertFileNamesEqual(t, modelFiles, "all_types.go", "all_types_view.go", "employee.go", "link.go",
|
||||
"mood.go", "person.go", "person_phone.go", "weird_names_table.go", "level.go")
|
||||
"mood.go", "person.go", "person_phone.go", "weird_names_table.go", "level.go", "user.go")
|
||||
|
||||
testutils.AssertFileContent(t, modelDir+"all_types.go", "\npackage model", allTypesModelContent)
|
||||
|
||||
|
|
@ -299,7 +299,7 @@ func TestGeneratedAllTypesSQLBuilderFiles(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
|
||||
testutils.AssertFileNamesEqual(t, tableFiles, "all_types.go", "employee.go", "link.go",
|
||||
"person.go", "person_phone.go", "weird_names_table.go")
|
||||
"person.go", "person_phone.go", "weird_names_table.go", "user.go")
|
||||
|
||||
testutils.AssertFileContent(t, tableDir+"all_types.go", "\npackage table", allTypesTableContent)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue