Metakit / API

@doeixd/metakit/operation/sql

SQL lowerings for custom operations (@doeixd/metakit/operation/sql).

Kept on its own subpath so no browser page bundles SQL lowering code. One lowering serves both @doeixd/metakit/sql (text + parameters) and @doeixd/metakit/drizzle (Drizzle SQL), using the piece tagged template whose holes are strictly other SqlPiece values so no raw value enters SQL as text.

Functions

loweringDeclare SQL lowerings for op, typed by op's argument arity.
loweringsCollect SQL lowerings, refusing duplicates for one id@version.
pieceTagged template for SQL lowerings: holes may only be other SqlPieces.
renderPieceRender a SqlPiece tree into a target SQL representation S.

Interfaces

ForeignLoweringsA table of SQL lowerings for custom operations.
SqlLoweringSQL lowering functions for one custom operation across dialects.
SqlPieceA safe SQL fragment built by piece or supplied as a lowered argument.

Types

PieceArgsTuple of SqlPiece matching an operation's argument arity.
SqlDialect