gnormal / gnorm

A database-first code generator for any language
https://gnorm.org
Other
487 stars 40 forks source link

Add support for Postgres tables using keywords #118

Closed freb closed 4 years ago

freb commented 5 years ago

Fixes https://github.com/gnormal/gnorm/issues/117

freb commented 4 years ago

I don't see how I would add a test case for this change since none of the tests seem to run against an actual database. I've been using this in my fork for over a year now, any chance this can be merged?

A few weeks ago I did some more digging to see if there was a better way to strip the quotes, and there doesn't appear to be.

natefinch commented 4 years ago

I should add real tests against a real database, but for now, I think this is fine. Thanks for pinging me on it.

freb commented 4 years ago

The only project I've done any work on that uses a real database is pgtype. See:

https://github.com/jackc/pgtype/blob/master/testutil/testutil.go#L17

Thanks for merging!