Metakit / API

@doeixd/metakit/sql/stored

SQL compiled once (@doeixd/metakit/sql/stored): toCheck, toWhere, toValue and toUpdate of @doeixd/metakit/sql, kept in the Artifact.EvidenceStore in context. A statement compiled before for the same definition, dialect, options and compiler is returned as reused without compiling; another is compiled and kept. A refusal is not kept. A definition with no hash, or an input or env value JSON cannot write, fails with Unhashable.

Values

toCheckSql.toCheck, kept under the Schema's fingerprint, so a Schema whose interface is unchanged is not compiled again.
toUpdateSql.toUpdate, kept under the transition's executable hash and its state Schema's fingerprint, with the table, the input and the options; it takes no column,…
toValueSql.toValue, kept under the expression's fingerprint.
toWhereSql.toWhere, kept under the expression's fingerprint.

Interfaces

StoredOptionsWhat a stored compile adds to the options of the compile it stands for.
StoredSqlA statement and whether it was taken from the store instead of compiled.

Types

StoredSqlOptionsSqlOptions without column, a function whose naming no key can hold.