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)-N
and-R
together obsolete the-n
,-k
,--last-file-inserts-count
and--last-insert-rows-count
flags.
--headers
(include column name headers)--zoneinfo
(path to tz database)
- The
chacha
RNG is renamed tochacha20
; also added thechacha12
RNG. - 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 WHEN
expression 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:
substring
char_length
,octet_length
overlay
div
mod
coalesce
generate_series
rand.shuffle
rand.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 bothdbgen
and the database engine itself. - Time intervals are now printed as
"5 12:23:34.456789"
instead ofINTERVAL 476614456789 MICROSECOND
for 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-zone
is 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-zone
flag to CLI. TheTIMESTAMP
syntax will parse the string using the time zone of this flag. - Added
TIMESTAMP WITH TIME ZONE
syntax.