gnormal / gnorm

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

bootstrap with gnorm #9

Closed natefinch closed 7 years ago

natefinch commented 7 years ago

Right now, database/drivers/postgres/pg and database/drivers/mysql/pg is generated by github.com/xoxo-go/xoxo ... which is a fork of github.com/knq/xo ... this should be replaced by using gnorm itself to generate the code, which should be doable at this point.

Also currently, the mysql/pg code is just a copy of the postgres/pg code, because I couldn't get xoxo to generate it itself. This should be replaced by actual generated code for mysql (and renamed to not be in a package called "pg").

This will require updating the templates in drivers/postgres/template to conform to gnorm's data format and then changing the go generate command in database/drivers/postgres/parse.go (and adding one to mysql), and adding the appropriate gnorm.toml file in those directories as well.

natefinch commented 7 years ago

done here: e8df7631b243374188589f34ebebb248a952807f