Releases: tkcrm/pgxgen
Releases · tkcrm/pgxgen
v0.0.25
v0.0.24
v0.0.23
v0.0.22
v0.0.21
v0.0.20
v0.0.20
NOTE: Delete existed
crud_queries.sql
andcrud_queries.sql.go
files in your project
NEW
- added CI
- removed
output_crud_sql_file_name
parameter - added
sqlc_move_models
parameter. Now you can move you models to another package - mobx keystone parameter moved from
gp_models.external_models.keystone
togen_keystone_models
and now it accept array - added
crud_params.auto_remove_generated_files
for auto removing all files, ended with_gen.sql
- added
crud_params.exclude_table_name_from_methods
Instead[ActionName][TableName]
will be[ActionName]
. ExampleGetUser
->Get
;FindUsers
->Find
, etc. You can username
field for manual overwriting method name - added
crud_params.tables.[table_name].output_dir
. Not required. If you do not specify this value, then the sql file will be generated in each folder for all tables - added new crud method
exists
. It returntrue
if record exists in database - all get methods now include limit in sql query:
LIMIT 1;
- generated sql queries save to different sql files
- generated sql files now include
_gen
suffix - mobx keystone moved to new package
keystone
- added new cli param
pgxgen keystone
- add util
utils.CreatePath
Updated
- updated
README.md
- updated dependencies
- bump version to
v0.0.20
Fix
- Fix tests
v0.0.19
New
CRUD
Removed double quotes because sqlc generates code without them
before
SELECT id, address FROM stores ORDER BY "created_at" ASC;
SELECT * FROM users WHERE "id"=$1;
UPDATE users SET "first_name"=$1 WHERE "id"=$2;
INSERT INTO users ("first_name") VALUES ($1);
after
SELECT id, address FROM stores ORDER BY created_at ASC;
SELECT * FROM users WHERE id=$1;
UPDATE users SET first_name=$1 WHERE id=$2;
INSERT INTO users (first_name) VALUES ($1);