Closed elldritch closed 6 years ago
Yep, not a big deal. Could fix this at any time. If nothing else it'll be fixed for v3. I'll tag it appropriately to make sure it's not missed. All the effort is there currently.
The actual code doesn't use the name of the table, so I'm not sure why the tests do. In the actual code most things are just called "o" (for similar reasons).
This is solved in v3 code. For now you'll have to avoid the generated tests but sqlboiler should still work fine. And once you move to the new code after it's released then your tests should stop failing in this way. :)
I have a table named "packages". Foreseeably, generating code for this table causes problems:
For external reasons, I can't rename the table. I've been using
no-tests
to get around this, but is there any way to generate tests as well?From an interface perspective, this seems feasible: all Go keywords are lowercased, so exported identifiers will never conflict with keywords. One way to get around this is to ensure that keywords are never used as locally scoped identifiers e.g. by using
row := &Package{}
instead ofpackage := Package{}
.