Provides minisql sql binder facilities for this project.
Package: minisql.sql.binder
Reachable from entry: yes
minisql/catalog/catalog.mlascatalog→ src/minisql/catalog/catalog.mlminisql/catalog/metadata.mlasmetadata→ src/minisql/catalog/metadata.mlminisql/catalog/schema_history.mlasschema_history→ src/minisql/catalog/schema_history.mlminisql/common/endian.mlasendian→ src/minisql/common/endian.mlminisql/sql/ast.mlasast→ src/minisql/sql/ast.mlminisql/sql/expressions.mlasexpressions→ src/minisql/sql/expressions.mlminisql/sql/parser.mlasparser→ src/minisql/sql/parser.mlminisql/sql/types.mlastypes→ src/minisql/sql/types.mlminisql/sql/values.mlasvalues→ src/minisql/sql/values.ml
function appendInformationColumn(columns, name, kind, nullable)Appends one column definition to a virtual INFORMATION_SCHEMA table.
| Parameter | Type | Default | Description |
|---|---|---|---|
columns |
dynamic |
— | columns value consumed by this operation. |
name |
dynamic |
— | Name of the affected item. |
kind |
dynamic |
— | kind value consumed by this operation. |
nullable |
dynamic |
— | nullable value consumed by this operation. |
function appendNamedSource(sources, named, alias)Appends named source using the supplied inputs. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
sources |
dynamic |
— | sources value consumed by this operation. |
named |
dynamic |
— | named value consumed by this operation. |
alias |
dynamic |
— | alias value consumed by this operation. |
function appendResolvedSource(sources, database, name, alias, availableQueries, viewStack)Appends resolved source using the supplied inputs. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
sources |
dynamic |
— | sources value consumed by this operation. |
database |
dynamic |
— | database value consumed by this operation. |
name |
dynamic |
— | Name of the affected item. |
alias |
dynamic |
— | alias value consumed by this operation. |
availableQueries |
dynamic |
— | availableQueries value consumed by this operation. |
viewStack |
dynamic |
— | viewStack value consumed by this operation. |
function appendSource(sources, table, alias)Appends source using the supplied inputs. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
sources |
dynamic |
— | sources value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
alias |
dynamic |
— | alias value consumed by this operation. |
function bindAggregate(expression, sources, database)Binds aggregate using the supplied inputs. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
sources |
dynamic |
— | sources value consumed by this operation. |
database |
dynamic |
— | database value consumed by this operation. |
function bindAlterTable(statement, database)Binds alter table using the supplied inputs. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
statement |
dynamic |
— | statement value consumed by this operation. |
database |
dynamic |
— | database value consumed by this operation. |
function bindBetweenExpression(expression, sources, allowAggregates, database)Binds one BETWEEN predicate and validates both boundary types.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | BETWEEN expression node to bind. |
sources |
dynamic |
— | Visible row sources for the operand and boundaries. |
allowAggregates |
dynamic |
— | Whether this clause permits aggregate expressions. |
database |
dynamic |
— | Catalog handle used by nested expression binding. |
function bindBinaryExpression(expression, sources, allowAggregates, database)Binds a binary operator and computes its SQL result type.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | Binary expression node to bind. |
sources |
dynamic |
— | Visible row sources for both operands. |
allowAggregates |
dynamic |
— | Whether this clause permits aggregate expressions. |
database |
dynamic |
— | Catalog handle used by nested expression binding. |
function bindCaseExpression(expression, sources, allowAggregates, database)Binds all CASE branches while deriving their common nullable result type.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | CASE expression node to bind. |
sources |
dynamic |
— | Visible row sources for branch expressions. |
allowAggregates |
dynamic |
— | Whether this clause permits aggregate expressions. |
database |
dynamic |
— | Catalog handle used by nested expression binding. |
function bindColumnSources(expression, sources)Binds column sources using the supplied inputs. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
sources |
dynamic |
— | sources value consumed by this operation. |
function bindConflictAssignments(statement, table, sources)Binds conflict assignments using the supplied inputs. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
statement |
dynamic |
— | statement value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
sources |
dynamic |
— | sources value consumed by this operation. |
function bindConflictExpression(expression, table, sources)Binds conflict expression using the supplied inputs. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
sources |
dynamic |
— | sources value consumed by this operation. |
function bindCreateIndex(statement, database)Binds index columns and validates an optional immutable row predicate.
| Parameter | Type | Default | Description |
|---|---|---|---|
statement |
dynamic |
— | statement value consumed by this operation. |
database |
dynamic |
— | database value consumed by this operation. |
function bindCreateTable(statement, database)Binds create table using the supplied inputs. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
statement |
dynamic |
— | statement value consumed by this operation. |
database |
dynamic |
— | database value consumed by this operation. |
function bindDelete(statement, database)Binds delete using the supplied inputs. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
statement |
dynamic |
— | statement value consumed by this operation. |
database |
dynamic |
— | database value consumed by this operation. |
function bindDropIndex(statement, database)Binds DROP INDEX by resolving the database-wide index name to its owning table. Constraint-backed PRIMARY KEY and table-constraint UNIQUE indexes must be removed through ALTER TABLE DROP CONSTRAINT; explicitly created UNIQUE indexes remain DROP INDEX objects.
| Parameter | Type | Default | Description |
|---|---|---|---|
statement |
dynamic |
— | statement value consumed by this operation. |
database |
dynamic |
— | database value consumed by this operation. |
function bindDropTable(statement, database)Binds drop table using the supplied inputs. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
statement |
dynamic |
— | statement value consumed by this operation. |
database |
dynamic |
— | database value consumed by this operation. |
function bindExpression(expression, table, alias)Binds expression using the supplied inputs. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
alias |
dynamic |
— | alias value consumed by this operation. |
function bindExpressionInternal(expression, sources, allowAggregates, database)Dispatches one AST expression to its node-specific binder.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | AST expression node to bind. |
sources |
dynamic |
— | Visible row sources for name resolution. |
allowAggregates |
dynamic |
— | Whether this clause permits aggregate expressions. |
database |
dynamic |
— | Catalog handle used by nested expression binding. |
function bindInExpression(expression, sources, allowAggregates, database)Binds one IN-list predicate and verifies every candidate type.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | IN-list expression node to bind. |
sources |
dynamic |
— | Visible row sources for operands and candidates. |
allowAggregates |
dynamic |
— | Whether this clause permits aggregate expressions. |
database |
dynamic |
— | Catalog handle used by nested expression binding. |
const BINDING_ERROR = 9020Defines the binding error constant used by the minisql sql binder module.
function bindInsert(statement, database)Binds insert using the supplied inputs. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
statement |
dynamic |
— | statement value consumed by this operation. |
database |
dynamic |
— | database value consumed by this operation. |
function bindInsertValue(expression, targetType)Binds insert value using the supplied inputs. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
targetType |
dynamic |
— | targetType value consumed by this operation. |
function bindLiteral(expression)Binds literal using the supplied inputs. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
function bindReturning(items, table)Binds returning using the supplied inputs. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
items |
dynamic |
— | Items consumed or updated by the operation. |
table |
dynamic |
— | table value consumed by this operation. |
function bindScalarFunction(expression, sources, allowAggregates, database)Binds scalar function using the supplied inputs. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
sources |
dynamic |
— | sources value consumed by this operation. |
allowAggregates |
dynamic |
— | allowAggregates value consumed by this operation. |
database |
dynamic |
— | database value consumed by this operation. |
function bindSelect(statement, database)Binds select using the supplied inputs. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
statement |
dynamic |
— | statement value consumed by this operation. |
database |
dynamic |
— | database value consumed by this operation. |
function bindSelectInternal(statement, database, inheritedQueries, viewStack)Binds select internal using the supplied inputs. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. May mutate supplied state as documented by the operation name.
| Parameter | Type | Default | Description |
|---|---|---|---|
statement |
dynamic |
— | statement value consumed by this operation. |
database |
dynamic |
— | database value consumed by this operation. |
inheritedQueries |
dynamic |
— | inheritedQueries value consumed by this operation. |
viewStack |
dynamic |
— | viewStack value consumed by this operation. |
function bindStatement(statement, database)Binds statement using the supplied inputs. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
statement |
dynamic |
— | statement value consumed by this operation. |
database |
dynamic |
— | database value consumed by this operation. |
function bindSubqueryExpression(expression, sources, allowAggregates, database)Binds a scalar, EXISTS, or IN subquery after masking correlated references.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | Subquery expression node to bind. |
sources |
dynamic |
— | Visible outer sources that must not become correlations. |
allowAggregates |
dynamic |
— | Whether this clause permits aggregate expressions. |
database |
dynamic |
— | Catalog handle used to bind the nested SELECT. |
function bindTruncate(statement, database)Binds truncate using the supplied inputs. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
statement |
dynamic |
— | statement value consumed by this operation. |
database |
dynamic |
— | database value consumed by this operation. |
function bindUnaryExpression(expression, sources, allowAggregates, database)Binds a unary operator, including the signed-literal minimum-value path.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | Unary expression node to bind. |
sources |
dynamic |
— | Visible row sources for the operand. |
allowAggregates |
dynamic |
— | Whether this clause permits aggregate expressions. |
database |
dynamic |
— | Catalog handle used by nested expression binding. |
function bindUpdate(statement, database)Binds update using the supplied inputs. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
statement |
dynamic |
— | statement value consumed by this operation. |
database |
dynamic |
— | database value consumed by this operation. |
function bindWhere(expression, table, alias)Binds where using the supplied inputs. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
alias |
dynamic |
— | alias value consumed by this operation. |
function bindWhereSources(expression, sources, operation, database)Binds where sources using the supplied inputs. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
sources |
dynamic |
— | sources value consumed by this operation. |
operation |
dynamic |
— | operation value consumed by this operation. |
database |
dynamic |
— | database value consumed by this operation. |
function bindWindowExpression(expression, sources, database)Binds one window expression and preserves its ordering metadata arrays.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | Window expression node to bind. |
sources |
dynamic |
— | Visible row sources for columns and scalar expressions. |
database |
dynamic |
— | Catalog handle used by nested expression binding. |
- minisql.sql.binder.BoundAlterTable — struct
- minisql.sql.binder.BoundAssignment — struct
- minisql.sql.binder.BoundCreateIndex — struct
- minisql.sql.binder.BoundCreateTable — struct
- minisql.sql.binder.BoundDelete — struct
- minisql.sql.binder.BoundDropTable — struct
- minisql.sql.binder.BoundInformationSchemaSource — struct
- minisql.sql.binder.BoundInsert — struct
function boundItemIndex(items, expression)Implements bound item index for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
items |
dynamic |
— | Items consumed or updated by the operation. |
expression |
dynamic |
— | expression value consumed by this operation. |
- minisql.sql.binder.BoundJoin — struct
- minisql.sql.binder.BoundNamedQuery — struct
- minisql.sql.binder.BoundRecursiveQuery — struct
- minisql.sql.binder.BoundRecursiveReference — struct
- minisql.sql.binder.BoundReturningItem — struct
- minisql.sql.binder.BoundSelect — struct
- minisql.sql.binder.BoundSetOperation — struct
- minisql.sql.binder.BoundSource — struct
- minisql.sql.binder.BoundTruncate — struct
- minisql.sql.binder.BoundUpdate — struct
function componentName()Performs the componentName operation for the minisql sql binder module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
function conflictBindingSources(table)Implements conflict binding sources for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
table |
dynamic |
— | table value consumed by this operation. |
function conflictConstraint(database, table, target)Implements conflict constraint for this module. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
target |
dynamic |
— | target value consumed by this operation. |
function constantSchemaExpression(expression)Implements constant schema expression for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
const CONSTRAINT_VIOLATION = 9021Defines the constraint violation constant used by the minisql sql binder module.
function containsAggregateList(items)Returns whether the supplied value satisfies the aggregate list condition. Returns the computed value or operation status. Does not modify its inputs.
| Parameter | Type | Default | Description |
|---|---|---|---|
items |
dynamic |
— | Items consumed or updated by the operation. |
function crossJoinEqualityForSource(expression, source)Finds one WHERE equality connecting a newly introduced CROSS/comma source to any source already present on its left. Only top-level AND conjuncts are eligible, so the equality may safely become the mandatory INNER-join edge.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
source |
dynamic |
— | source value consumed by this operation. |
function decimalLiteralText(expression)Implements decimal literal text for this module. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
function ensureBoolean(expression, operation)Ensures boolean using the supplied inputs. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
operation |
dynamic |
— | operation value consumed by this operation. |
function fail(code, operation, message)Performs the fail operation for the minisql sql binder module. Returns its result or propagates a structured error from validation or a dependency. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
code |
dynamic |
— | code value consumed by this operation. |
operation |
dynamic |
— | operation value consumed by this operation. |
message |
dynamic |
— | Human-readable message associated with the operation. |
function findBoundColumn(sources, expression)Finds bound column using the supplied inputs. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
sources |
dynamic |
— | sources value consumed by this operation. |
expression |
dynamic |
— | expression value consumed by this operation. |
function findColumn(table, name)Finds column using the supplied inputs. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
table |
dynamic |
— | table value consumed by this operation. |
name |
dynamic |
— | Name of the affected item. |
function findColumnIndex(table, name)Finds column index using the supplied inputs. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
table |
dynamic |
— | table value consumed by this operation. |
name |
dynamic |
— | Name of the affected item. |
function groupedExpressionSafe(expression, groups)Implements grouped expression safe for this module. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
groups |
dynamic |
— | groups value consumed by this operation. |
function indexKeyAstDeterministic(expression)Accepts scalar AST shapes whose value is stable for a stored row. This check runs before binding because CURRENT_TIMESTAMP otherwise becomes an ordinary literal and loses the information needed to reject the volatile source.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
function indexKeyExpressionReferencesColumn(expression)Requires at least one table column so constant scalar expressions cannot create a redundant index whose single key changes between rebuilds.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
function indexKeyExpressionRoundTrips(expression, boundExpression, table)Verifies that canonical catalog SQL reparses to the same typed expression. Column-expression AST nodes intentionally store canonical names rather than quoting state, so an identifier that still needs quotes must be rejected before it could make persisted index metadata ambiguous after a restart.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
boundExpression |
dynamic |
— | boundExpression value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
function indexKeyExpressionSafe(expression)Combines reproducible scalar-shape and row-dependency validation.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
function indexKeyExpressionShapeSafe(expression)Accepts the bound scalar shapes that the row evaluator can reproduce during inserts, updates, uniqueness checks, rebuilds, and index verification.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
function indexPredicateSafe(expression)Accepts only immutable row-local expression nodes for partial indexes.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
const INFORMATION_COLUMNS = 3Defines the information columns constant used by the minisql sql binder module.
const INFORMATION_ROUTINES = 6Defines the information routines constant used by the minisql sql binder module.
const INFORMATION_SCHEMATA = 1Defines the information schemata constant used by the minisql sql binder module.
const INFORMATION_TABLE_CONSTRAINTS = 4Defines the information table constraints constant used by the minisql sql binder module.
const INFORMATION_TABLES = 2Defines the information tables constant used by the minisql sql binder module.
const INFORMATION_VIEWS = 5Defines the information views constant used by the minisql sql binder module.
function informationSchemaTable(name)Builds the stable SQL-visible shape for a supported INFORMATION_SCHEMA relation.
| Parameter | Type | Default | Description |
|---|---|---|---|
name |
dynamic |
— | Name of the affected item. |
const INVALID_ARGUMENT = 9001Defines the invalid argument constant used by the minisql sql binder module.
function isAggregateName(name)Returns whether the supplied value satisfies the aggregate name condition. Returns the computed value or operation status. Does not modify its inputs.
| Parameter | Type | Default | Description |
|---|---|---|---|
name |
dynamic |
— | Name of the affected item. |
function isBoundAlterTable(value)Returns whether the supplied value satisfies the bound alter table condition. Returns the computed value or operation status. Does not modify its inputs.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function isBoundCreateIndex(value)Returns whether the supplied value satisfies the bound create index condition. Returns the computed value or operation status. Does not modify its inputs.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function isBoundCreateTable(value)Returns whether the supplied value satisfies the bound create table condition. Returns the computed value or operation status. Does not modify its inputs.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function isBoundDelete(value)Returns whether the supplied value satisfies the bound delete condition. Returns the computed value or operation status. Does not modify its inputs.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function isBoundDropTable(value)Returns whether the supplied value satisfies the bound drop table condition. Returns the computed value or operation status. Does not modify its inputs.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function isBoundInformationSchemaSource(value)Returns whether a source is a virtual INFORMATION_SCHEMA metadata relation.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function isBoundInsert(value)Returns whether the supplied value satisfies the bound insert condition. Returns the computed value or operation status. Does not modify its inputs.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function isBoundJoin(value)Returns whether the supplied value satisfies the bound join condition. Returns the computed value or operation status. Does not modify its inputs.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function isBoundNamedQuery(value)Returns whether the supplied value satisfies the bound named query condition. Returns the computed value or operation status. Does not modify its inputs.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function isBoundRecursiveQuery(value)Returns whether a named query is an executable recursive fixpoint.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function isBoundRecursiveReference(value)Returns whether a source reads the current recursive working-table delta.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function isBoundReturningItem(value)Returns whether the supplied value satisfies the bound returning item condition. Returns the computed value or operation status. Does not modify its inputs.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function isBoundSelect(value)Returns whether the supplied value satisfies the bound select condition. Returns the computed value or operation status. Does not modify its inputs.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function isBoundSetOperation(value)Returns whether the supplied value satisfies the bound set operation condition. Returns the computed value or operation status. Does not modify its inputs.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function isBoundSource(value)Returns whether the supplied value satisfies the bound source condition. Returns the computed value or operation status. Does not modify its inputs.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function isBoundTruncate(value)Returns whether the supplied value satisfies the bound truncate condition. Returns the computed value or operation status. Does not modify its inputs.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function isBoundUpdate(value)Returns whether the supplied value satisfies the bound update condition. Returns the computed value or operation status. Does not modify its inputs.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function isImplemented()Returns whether implemented satisfies the condition required by the minisql sql binder module. Returns the computed value or operation status. Does not modify its inputs.
function isNullBoundLiteral(expression)Returns whether the supplied value satisfies the null bound literal condition. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Does not modify its inputs.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
function isScalarFunctionName(name)Returns whether the name belongs to the built-in scalar function library.
| Parameter | Type | Default | Description |
|---|---|---|---|
name |
dynamic |
— | Name of the affected item. |
function isWindowAggregateName(name)Returns whether the named aggregate is supported as a window aggregate.
| Parameter | Type | Default | Description |
|---|---|---|---|
name |
dynamic |
— | Name of the affected item. |
function literalType(value)Implements literal type for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function maskOuterColumn(expression, sources, statement)Replaces an explicitly qualified outer-column reference with a typed NULL. The placeholder lets the ordinary nested-query binder infer and validate its output shape without depending on a concrete outer row.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
sources |
dynamic |
— | sources value consumed by this operation. |
statement |
dynamic |
— | statement value consumed by this operation. |
function maskOuterExpression(expression, sources, statement)Recursively masks outer references throughout one nested expression tree.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
sources |
dynamic |
— | sources value consumed by this operation. |
statement |
dynamic |
— | statement value consumed by this operation. |
function maskOuterSelect(statement, sources)Copies a nested SELECT while replacing only references resolved against outer sources.
| Parameter | Type | Default | Description |
|---|---|---|---|
statement |
dynamic |
— | statement value consumed by this operation. |
sources |
dynamic |
— | sources value consumed by this operation. |
function mergeConcreteTypes(left, right)Implements merge concrete types for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
left |
dynamic |
— | left value consumed by this operation. |
right |
dynamic |
— | right value consumed by this operation. |
function mergeResultType(currentType, hasConcrete, nextExpression)Implements merge result type for this module. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
currentType |
dynamic |
— | currentType value consumed by this operation. |
hasConcrete |
dynamic |
— | hasConcrete value consumed by this operation. |
nextExpression |
dynamic |
— | nextExpression value consumed by this operation. |
function namedQueryIndex(availableQueries, name)Implements named query index for this module. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
availableQueries |
dynamic |
— | availableQueries value consumed by this operation. |
name |
dynamic |
— | Name of the affected item. |
function namesContain(names, value)Implements names contain for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
names |
dynamic |
— | names value consumed by this operation. |
value |
dynamic |
— | Value consumed or transformed by the operation. |
const OBJECT_NOT_FOUND = 9014Defines the object not found constant used by the minisql sql binder module.
function objectLocalName(name)Returns the unqualified component of a canonical schema-qualified object name.
| Parameter | Type | Default | Description |
|---|---|---|---|
name |
dynamic |
— | Name of the affected item. |
function parseSingleSelect(sqlText, operation)Parses single select using the supplied inputs. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
sqlText |
dynamic |
— | sqlText value consumed by this operation. |
operation |
dynamic |
— | operation value consumed by this operation. |
function promoteCrossJoinEqualities(joins, whereExpression)Promotes a WHERE-restricted cartesian edge to an INNER equality edge so the existing hash/index join cost model avoids materializing the full product. The returned pair contains the promoted joins and the residual WHERE tree; consumed equalities are enforced by the join and must not be evaluated twice.
| Parameter | Type | Default | Description |
|---|---|---|---|
joins |
dynamic |
— | joins value consumed by this operation. |
whereExpression |
dynamic |
— | whereExpression value consumed by this operation. |
function removeBoundConjunct(expression, target)Removes every exact occurrence of one guaranteed conjunct from an AND tree. Rebuilding only affected branches preserves every unrelated predicate and its SQL three-valued evaluation semantics.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
target |
dynamic |
— | target value consumed by this operation. |
function resolveInsertColumns(statement, table)Implements resolve insert columns for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
statement |
dynamic |
— | statement value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
function resolveNamedQuery(database, name, availableQueries, viewStack)Implements resolve named query for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
name |
dynamic |
— | Name of the affected item. |
availableQueries |
dynamic |
— | availableQueries value consumed by this operation. |
viewStack |
dynamic |
— | viewStack value consumed by this operation. |
function resultTypeWithNullability(typeInfo, nullable)Implements result type with nullability for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
typeInfo |
dynamic |
— | typeInfo value consumed by this operation. |
nullable |
dynamic |
— | nullable value consumed by this operation. |
function rewriteConflictExpression(expression, targetName)Rewrites conflict expression using the supplied inputs. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
targetName |
dynamic |
— | targetName value consumed by this operation. |
function sameNameArray(left, right)Implements same name array for this module. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
left |
dynamic |
— | left value consumed by this operation. |
right |
dynamic |
— | right value consumed by this operation. |
function schemaPreservingRename(currentName, newLocalName)Keeps an unqualified ALTER TABLE rename inside the table's current schema.
| Parameter | Type | Default | Description |
|---|---|---|---|
currentName |
dynamic |
— | currentName value consumed by this operation. |
newLocalName |
dynamic |
— | newLocalName value consumed by this operation. |
function selectDeclaresQualifier(statement, qualifier)Returns true when a qualifier belongs to a source declared by this nested SELECT. Such names shadow outer aliases and must remain ordinary inner-column references.
| Parameter | Type | Default | Description |
|---|---|---|---|
statement |
dynamic |
— | statement value consumed by this operation. |
qualifier |
dynamic |
— | qualifier value consumed by this operation. |
function selectReferencesSource(statement, name)Returns true when a SELECT tree names a candidate recursive working table.
| Parameter | Type | Default | Description |
|---|---|---|---|
statement |
dynamic |
— | statement value consumed by this operation. |
name |
dynamic |
— | Name of the affected item. |
function sourceTypes(sources)Implements source types for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
sources |
dynamic |
— | sources value consumed by this operation. |
function sourceVisibleName(source)Implements source visible name for this module. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
source |
dynamic |
— | source value consumed by this operation. |
function sourceWidth(sources)Implements source width for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
sources |
dynamic |
— | sources value consumed by this operation. |
function stringArrayContains(values, name)Returns whether a string array contains the requested column name.
| Parameter | Type | Default | Description |
|---|---|---|---|
values |
dynamic |
— | values value consumed by this operation. |
name |
dynamic |
— | Name of the affected item. |
function tableForQuery(name, bound, explicitNames)Implements table for query for this module. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
name |
dynamic |
— | Name of the affected item. |
bound |
dynamic |
— | bound value consumed by this operation. |
explicitNames |
dynamic |
— | explicitNames value consumed by this operation. |
function targetMilestone()Performs the targetMilestone operation for the minisql sql binder module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
const TYPE_MISMATCH = 9017Defines the type mismatch constant used by the minisql sql binder module.
const UNSUPPORTED_SQL = 9025Defines the unsupported sql constant used by the minisql sql binder module.
function validateWindowArguments(name, ranking, countStar, arguments)Validates the arity and types required by one supported window function.
| Parameter | Type | Default | Description |
|---|---|---|---|
name |
dynamic |
— | Normalized window-function name. |
ranking |
dynamic |
— | Whether the function belongs to the ranking family. |
countStar |
dynamic |
— | Whether the function represents COUNT(*). |
arguments |
dynamic |
— | Bound window-function arguments. |
function windowTopLevelSafe(expression)Implements window top level safe for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |