StaticbareAn identifier with its quotes removed.
one primary-key column
the name
StaticbuildBuilds a model from texts the caller already has. Tests pass a fixture here without loading the schema module.
the schema script
schema_mariadb.js exports, or null
the model
StaticcolumnOne column piece. A back-quoted name is the same column as an unquoted one.
trimmed SQL
the column, or null
StaticcompareRecords a create the two copies do not share. Whitespace is not a
difference: squash() is the same collapse as
tests/mariadb_schema.js.
creates from the SQL file
creates from the module
the gap list
StaticcreatesCREATE statements in the script, comments removed, each without its
semicolon. The cut is tests/mariadb_schema.js's: a semicolon ends
the statement, and the two copies are compared after squash().
the script
the creates, in script order
StaticemitThe SQL file, unchanged.
a model from read() or build()
the file bytes stored on the model
StaticisA table-body piece that is a key or a check, not a column. KEY
is MariaDB's inline index. A column named key is back-quoted, so
it does not start with that word.
trimmed SQL
whether the piece is a constraint
StaticobjectsThe module's objects, in its order, as the strings it exports.
the module exports, or null
the objects
StaticreadReads the schema file and the driver's statement list.
the package root
the model. sql is the file's bytes.
StaticsplitSplits on commas that are not inside parentheses, quotes, or back-quotes.
a CREATE TABLE body
the pieces, untrimmed
StaticsqlThe type tokens at the start of a column's remainder, including a
length. unknown is a type this schema does not use.
the SQL after the column name
the type, or unknown
StaticsquashCollapses whitespace the way tests/mariadb_schema.js does, so a
gap here is a gap that test would also report.
one statement
the comparable text
StaticstatementThe index of the semicolon that ends the statement at start.
Quotes and back-quotes are skipped, so a semicolon inside one is
not the end.
the script with comment lines removed
the start of the statement
the index of ;, or the length
StatictableOne table body.
the table
the text inside the parentheses
the clause between ) and ;
the gap list
the table
StatictablesEvery CREATE TABLE, with the engine clause that follows the body.
the script
the gap list
the tables, in script order
Reads both MariaDB DDL copies and emits the SQL file unchanged.