A toolkit to generate random DML SQL for MySQL.
- generate multiple DML(Insert/Update/Delete) SQL by defined schema
- generate for MySQL
- support increment generation(generate DML based on the previous generated data)
./mess generate -h
Generate SQL with random data
Usage:
mess generate [flags]
Flags:
--dml string DML (default "insert")
-h, --help help for generate
--metadata-path string Path of metadata for increment generating (default "./metadata.json")
--num-rows uint Number of rows (default 1000)
--output-path string Path of generated SQL (default "output.sql")
--schema-path string Path of schema definition (default "./schema.json")
- check Makefile
- define schema.json
Generate insert
SQL to ./output.sql
make run-example DML=insert
Generate update
SQL based on the data inserted before to ./output.sql
make run-example DML=update
Generate delete
SQL based on the data before to ./output.sql
make run-example DML=delete
MIT