Releases: kennytm/dbgen
Releases · kennytm/dbgen
v0.8.0
- Support derived tables for generating tables with linked foreign key references that cannot be faked.
- Added an online playground for testing dbgen templates.
- Generated data files can be specified to include column names as headers.
- Generated schema files no longer collapse into a single line.
- New functions:
debug.panic
- New CLI flags:
-N,--total-count(total number of rows to generate)-R,--rows-per-file(number of rows to generate for each file)-Nand-Rtogether obsolete the-n,-k,--last-file-inserts-countand--last-insert-rows-countflags.
--headers(include column name headers)--zoneinfo(path to tz database)
- The
chachaRNG is renamed tochacha20; also added thechacha12RNG. - Performance improvement.
- Improved error display.
v0.7.0
- Support arrays
- Construct an array with
ARRAY[1, 2, 3] - Extract an element with
@array[1]
- Construct an array with
- Support global expressions: evaluating some expressions before generating the data file, used in initialize some shared constants.
- New syntax:
CASE WHENexpression without the "case" value.current_timestamp- Statements
a; b; c, which evaluates all 3 expressions but only keep the last result - Bitwise operators
a & b | c ^ ~d
- New functions:
substringchar_length,octet_lengthoverlaydivmodcoalescegenerate_seriesrand.shufflerand.uuid
- New CLI flags:
--no-schemas(do not dump schemas)--now(override the value ofcurrent_timestamp)-D,--initialize(specify global expressions from command line)
- Added
step(mock) RNG
v0.6.0
v0.5.0
- In a template, expressions can now be placed inside
/*{{ … }}*/blocks in additional to{{ … }}blocks. The former makes it possible to share the same file to bothdbgenand the database engine itself. - Time intervals are now printed as
"5 12:23:34.456789"instead ofINTERVAL 476614456789 MICROSECONDfor better compatibility. - Support generating CSV files.
- Support compressing output data as gz, xz or zstd.
v0.4.3
v0.4.2
v0.4.1
rand.u31_timestamp()no longer generates the zero time (1970-01-01 00:00:00), as the zero time is invalid in MySQL.--time-zoneis no longer a required argument.- Added more identifying information in the shell script generated by
dbschemagen
v0.4.0
- Added
rand.finite_f32()andrand.finite_f64()functions. - Added
rand.u31_timestamp()function. - Added
--time-zoneflag to CLI. TheTIMESTAMPsyntax will parse the string using the time zone of this flag. - Added
TIMESTAMP WITH TIME ZONEsyntax.