zarvd / mess

Mess SQL generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mess

Building Go Report Card Godoc Releases LICENSE

A toolkit to generate random DML SQL for MySQL.

Goals

  • generate multiple DML(Insert/Update/Delete) SQL by defined schema
  • generate for MySQL
  • support increment generation(generate DML based on the previous generated data)

Usage

./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")

Examples

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

License

MIT

About

Mess SQL generator

License:MIT License


Languages

Language:Go 98.7%Language:Makefile 1.3%