Provides minisql executor dml facilities for this project.
Package: minisql.executor.dml
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/executor/scan.mlasscan→ src/minisql/executor/scan.mlminisql/platform/file.mlasfile_api→ src/minisql/platform/file.mlminisql/server/database_manager.mlasdatabase_manager→ src/minisql/server/database_manager.mlminisql/sql/ast.mlasast→ src/minisql/sql/ast.mlminisql/sql/binder.mlasbinder→ src/minisql/sql/binder.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.mlminisql/storage/btree.mlasbtree→ src/minisql/storage/btree.mlminisql/storage/heap_file.mlasheap_file→ src/minisql/storage/heap_file.mlminisql/storage/overflow.mlasoverflow→ src/minisql/storage/overflow.mlminisql/storage/page.mlaspage→ src/minisql/storage/page.mlminisql/storage/paged_file.mlaspaged_file→ src/minisql/storage/paged_file.mlminisql/storage/row_codec.mlasrow_codec→ src/minisql/storage/row_codec.mlminisql/storage/slotted_page.mlasslotted_page→ src/minisql/storage/slotted_page.mlminisql/transaction/checkpoint.mlascheckpoint→ src/minisql/transaction/checkpoint.mlminisql/transaction/transaction.mlastransaction→ src/minisql/transaction/transaction.mlminisql/transaction/wal.mlaswal→ src/minisql/transaction/wal.mlstd/ds/hashmap.mlashashmap→../MiniLangCompilerML/std/ds/hashmap.ml— external dependency
function appendKeyBytes(left, right)Appends key bytes 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 |
|---|---|---|---|
left |
dynamic |
— | left value consumed by this operation. |
right |
dynamic |
— | right value consumed by this operation. |
function applyGenerated(database, table, row)Applies generated 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 |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
row |
dynamic |
— | row value consumed by this operation. |
function applyInsertedIndexes(database, table, result)Applies an insert-only statement delta to every derived index without rescanning unrelated table payload pages. The caller publishes the durable indexes.dirty marker before the heap commit; a crash or failed index write is therefore repaired by the ordinary startup path.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
result |
dynamic |
— | Result object populated or inspected by the operation. |
function bindConstraintKeyExpressions(table, constraint)Implements constraint key 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. |
constraint |
dynamic |
— | constraint value consumed by this operation. |
function bindIndexPredicate(table, constraint)Binds the canonical predicate stored for a partial index once per operation.
| Parameter | Type | Default | Description |
|---|---|---|---|
table |
dynamic |
— | table value consumed by this operation. |
constraint |
dynamic |
— | constraint value consumed by this operation. |
const BINDING_ERROR = 9020Defines the binding error constant used by the minisql executor dml module.
function buildIndexEntries(database, table, constraint, pageTransaction)Builds index entries using the supplied inputs. 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 |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
constraint |
dynamic |
— | constraint value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
function clearIndexesDirty(database)Implements clear indexes dirty for this module. Returns the computed value or operation status. Performs I/O through its file, transport, or storage dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
const CLOSED_HANDLE = 9008Defines the closed handle constant used by the minisql executor dml module.
function closePersistentTableReader(opened)Closes a non-owning reader and then releases its persistent table lease.
| Parameter | Type | Default | Description |
|---|---|---|---|
opened |
dynamic |
— | opened value consumed by this operation. |
function closePublishedFiles(files)Closes published files using the supplied inputs. Requires arguments that satisfy the validation performed below. Returns its result or propagates a structured error from validation or a dependency. Performs I/O through its file, transport, or storage dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
files |
dynamic |
— | files value consumed by this operation. |
function closeReadOnlyIndex(lease)Releases a persistent index lease without closing its database-owned tree.
| Parameter | Type | Default | Description |
|---|---|---|---|
lease |
dynamic |
— | lease value consumed by this operation. |
function comparisonLiteralForBoundKey(expression, keyExpression)Finds a literal comparison against one exact bound functional-index key.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
keyExpression |
dynamic |
— | keyExpression value consumed by this operation. |
function comparisonLiteralForColumn(expression, columnIndex)Finds and normalizes a comparison between one bound column and a literal.
| Parameter | Type | Default | Description |
|---|---|---|---|
expression |
dynamic |
— | expression value consumed by this operation. |
columnIndex |
dynamic |
— | Zero-based index of column. |
function componentName()Performs the componentName operation for the minisql executor dml module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
function compositeEqualityIndexRows(database, table, expression, pageTransaction)Preserves the legacy composite-index API for unplanned callers.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
expression |
dynamic |
— | expression value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
- minisql.executor.dml.ConflictMatch — struct
function conflictUpdate(database, bound, excludedRow, match, pageTransaction, file, rowSchema)Implements conflict update 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. |
bound |
dynamic |
— | bound value consumed by this operation. |
excludedRow |
dynamic |
— | excludedRow value consumed by this operation. |
match |
dynamic |
— | match value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
file |
dynamic |
— | file value consumed by this operation. |
rowSchema |
dynamic |
— | rowSchema value consumed by this operation. |
const CONSTRAINT_VIOLATION = 9021Defines the constraint violation constant used by the minisql executor dml module.
function constraintColumnMask(table, constraints)Builds a table-width mask for local constraint key columns.
| Parameter | Type | Default | Description |
|---|---|---|---|
table |
dynamic |
— | table value consumed by this operation. |
constraints |
dynamic |
— | constraints value consumed by this operation. |
function constraintForIndexName(database, table, indexName)Finds the exact persistent index selected by the physical plan.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
indexName |
dynamic |
— | indexName value consumed by this operation. |
function constraintForSingleColumn(database, table, columnIndex)Retains the original first-match lookup used by joins and compatibility diagnostics that do not carry a typed optimizer decision.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
columnIndex |
dynamic |
— | Zero-based index of column. |
function constraintKey(row, table, constraint)Resolves key metadata for compatibility callers outside index hot loops.
| Parameter | Type | Default | Description |
|---|---|---|---|
row |
dynamic |
— | row value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
constraint |
dynamic |
— | constraint value consumed by this operation. |
function constraintKeyBound(row, table, constraint, boundKeys)Evaluates persisted expression keys and reads ordinary column keys.
| Parameter | Type | Default | Description |
|---|---|---|---|
row |
dynamic |
— | row value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
constraint |
dynamic |
— | constraint value consumed by this operation. |
boundKeys |
dynamic |
— | boundKeys value consumed by this operation. |
const CORRUPT_DATA = 9004Defines the corrupt data constant used by the minisql executor dml module.
function coveredRowsFromIndexEntries(table, constraint, entries)Converts B+-tree entries into heap-shaped rows without opening the heap.
| Parameter | Type | Default | Description |
|---|---|---|---|
table |
dynamic |
— | table value consumed by this operation. |
constraint |
dynamic |
— | constraint value consumed by this operation. |
entries |
dynamic |
— | entries value consumed by this operation. |
function decodeCoveredIndexKey(table, constraint, encoded)Reconstructs table-typed SQL values from an index key. Non-key positions are typed NULL placeholders and are safe because the optimizer proves they are not referenced before selecting an index-only plan. Floating encodings retain their textual ordering representation and therefore conservatively fall back.
| Parameter | Type | Default | Description |
|---|---|---|---|
table |
dynamic |
— | table value consumed by this operation. |
constraint |
dynamic |
— | constraint value consumed by this operation. |
encoded |
dynamic |
— | encoded value consumed by this operation. |
function decodeEscapedKeyBytes(encoded, startOffset)Decodes one zero-escaped variable-width key component and returns its bytes plus the first cursor position after the 0,0 terminator.
| Parameter | Type | Default | Description |
|---|---|---|---|
encoded |
dynamic |
— | encoded value consumed by this operation. |
startOffset |
dynamic |
— | startOffset value consumed by this operation. |
function decodeIncludedIndexValues(table, constraint, encoded, output)Merges a validated MSI v1 payload into the table-width row reconstructed from the key. Missing legacy payloads return void and trigger a safe fallback.
| Parameter | Type | Default | Description |
|---|---|---|---|
table |
dynamic |
— | table value consumed by this operation. |
constraint |
dynamic |
— | constraint value consumed by this operation. |
encoded |
dynamic |
— | encoded value consumed by this operation. |
output |
dynamic |
— | Output collection or buffer populated by the operation. |
function decodeIndexPart(column, encoded, cursor, operation)Decodes one self-delimiting typed value shared by ordered keys and INCLUDE payloads. Floating-point key text is not reversible and deliberately returns void, which makes execution fall back to a heap-backed index scan.
| Parameter | Type | Default | Description |
|---|---|---|---|
column |
dynamic |
— | column value consumed by this operation. |
encoded |
dynamic |
— | encoded value consumed by this operation. |
cursor |
dynamic |
— | cursor value consumed by this operation. |
operation |
dynamic |
— | operation value consumed by this operation. |
function decodeRowReference(tableId, encoded)Decodes row reference 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 |
|---|---|---|---|
tableId |
dynamic |
— | Identifier of table. |
encoded |
dynamic |
— | encoded value consumed by this operation. |
function delete(database, sessionId, bound, pageTransaction)Deletes delete using the supplied inputs. Requires arguments that satisfy the validation performed below. Returns its result or propagates a structured error from validation or a dependency. Performs I/O through its file, transport, or storage dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
sessionId |
dynamic |
— | Identifier of session. |
bound |
dynamic |
— | bound value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
function deleteInner(database, sessionId, bound, pageTransaction, file)Deletes inner 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 |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
sessionId |
dynamic |
— | Identifier of session. |
bound |
dynamic |
— | bound value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
file |
dynamic |
— | file value consumed by this operation. |
- minisql.executor.dml.DmlResult — struct
const DUPLICATE_KEY = 9022Defines the duplicate key constant used by the minisql executor dml module.
function encodeConstraintHashKey(keyValues)Encodes an exact composite constraint key without the physical B+ tree size ceiling. The statement-local hash set uses this representation to validate arbitrarily large batches in linear expected time.
| Parameter | Type | Default | Description |
|---|---|---|---|
keyValues |
dynamic |
— | keyValues value consumed by this operation. |
function encodeIndexEntryValue(table, constraint, rowValues, reference)Encodes a leaf value as a stable row-reference prefix followed, when needed, by the MSI v1 marker and self-delimiting typed INCLUDE values.
| Parameter | Type | Default | Description |
|---|---|---|---|
table |
dynamic |
— | table value consumed by this operation. |
constraint |
dynamic |
— | constraint value consumed by this operation. |
rowValues |
dynamic |
— | rowValues value consumed by this operation. |
reference |
dynamic |
— | reference value consumed by this operation. |
function encodeIndexKey(keyValues)Encodes index key 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 |
|---|---|---|---|
keyValues |
dynamic |
— | keyValues value consumed by this operation. |
function encodeRowReference(tableId, reference)Encodes row reference 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 |
|---|---|---|---|
tableId |
dynamic |
— | Identifier of table. |
reference |
dynamic |
— | reference value consumed by this operation. |
function ensureIndexes(database)Ensures indexes using the supplied inputs. Requires arguments that satisfy the validation performed below. 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 |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
function equalityIndexRows(database, table, columnIndex, literalValue, pageTransaction)Preserves the legacy equality-index API for join probes and older callers.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
columnIndex |
dynamic |
— | Zero-based index of column. |
literalValue |
dynamic |
— | literalValue value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
function equalityLiteralForColumn(expression, columnIndex)Implements equality literal for column 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. |
columnIndex |
dynamic |
— | Zero-based index of column. |
function escapedKeyBytes(source)Implements escaped key bytes 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 evaluateConstantSql(sqlText)Evaluates constant SQL 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. |
function evaluateReturning(returningItems, row)Evaluates returning 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 |
|---|---|---|---|
returningItems |
dynamic |
— | returningItems value consumed by this operation. |
row |
dynamic |
— | row value consumed by this operation. |
function fail(code, operation, message)Performs the fail operation for the minisql executor dml 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 fileForChange(database, fileId)Implements file for change for this module. Returns the computed value or operation status. Performs I/O through its file, transport, or storage dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
fileId |
dynamic |
— | Identifier of file. |
function findConflict(database, bound, row, pageTransaction, file)Finds conflict 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 |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
bound |
dynamic |
— | bound value consumed by this operation. |
row |
dynamic |
— | row value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
file |
dynamic |
— | file value consumed by this operation. |
function findGenerated(database, table, columnName)Finds generated 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 |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
columnName |
dynamic |
— | columnName value consumed by this operation. |
function findRule(tableSchemaValue, columnName)Finds rule 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 |
|---|---|---|---|
tableSchemaValue |
dynamic |
— | tableSchemaValue value consumed by this operation. |
columnName |
dynamic |
— | columnName value consumed by this operation. |
function generatedColumns(database, table)Implements generated 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 |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
function hasIdentityColumn(database, table)Returns whether identity allocation requires sequential visibility of rows inserted earlier in the same statement.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
function indexAccessDescription(database, bound)Implements index access description 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. |
bound |
dynamic |
— | bound value consumed by this operation. |
function indexColumnMask(table, constraint)Extends a key mask with non-key values persisted in covering-index leaves.
| Parameter | Type | Default | Description |
|---|---|---|---|
table |
dynamic |
— | table value consumed by this operation. |
constraint |
dynamic |
— | constraint value consumed by this operation. |
function indexDirtyPath(database)Implements index dirty path 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. |
function indexedConstraints(database, table)Implements indexed constraints 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. |
table |
dynamic |
— | table value consumed by this operation. |
function indexesNeedRepair(database)Implements indexes need repair for this module. Returns the computed value or operation status. Performs I/O through its file, transport, or storage dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
function indexFilesMissing(database)Detects missing derived index files without scanning any table heap. A clean dirty-marker state proves that committed index updates completed, but older databases or manual file loss may still leave an expected file absent.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
function indexKeyPart(value)Implements index key part 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 indexPath(database, constraint)Implements index path 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. |
constraint |
dynamic |
— | constraint value consumed by this operation. |
function indexPredicatePasses(boundPredicate, row)SQL WHERE semantics admit only TRUE; FALSE and UNKNOWN omit the row.
| Parameter | Type | Default | Description |
|---|---|---|---|
boundPredicate |
dynamic |
— | boundPredicate value consumed by this operation. |
row |
dynamic |
— | row value consumed by this operation. |
function indexRowsForBound(database, bound, pageTransaction)Returns index candidates for one bound, single-table SELECT or void when the query shape or transaction visibility requires a sequential fallback.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
bound |
dynamic |
— | bound value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
function initialRow(database, bound, boundRow, pageTransaction, file)Implements initial row 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. |
bound |
dynamic |
— | bound value consumed by this operation. |
boundRow |
dynamic |
— | boundRow value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
file |
dynamic |
— | file value consumed by this operation. |
function insert(database, sessionId, bound, pageTransaction)Inserts insert using the supplied inputs. Requires arguments that satisfy the validation performed below. Returns its result or propagates a structured error from validation or a dependency. Performs I/O through its file, transport, or storage dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
sessionId |
dynamic |
— | Identifier of session. |
bound |
dynamic |
— | bound value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
function insertBatchWithoutConflict(database, sessionId, bound, pageTransaction, file)Inserts a conflict-free batch using fixed-size result buffers and one unique snapshot. Other constraints are checked again in insertion order so foreign keys may still reference a preceding row from the same SQL statement.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
sessionId |
dynamic |
— | Identifier of session. |
bound |
dynamic |
— | bound value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
file |
dynamic |
— | file value consumed by this operation. |
- minisql.executor.dml.InsertCursor — struct
function insertInner(database, sessionId, bound, pageTransaction, file)Inserts inner 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 |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
sessionId |
dynamic |
— | Identifier of session. |
bound |
dynamic |
— | bound value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
file |
dynamic |
— | file value consumed by this operation. |
const INVALID_ARGUMENT = 9001Basic transactional DML. Every changed heap page is private until the WAL
function isConflictMatch(value)Returns whether the supplied value satisfies the conflict match 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 isDmlResult(value)Returns whether the supplied value satisfies the DML result 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 executor dml module. Returns the computed value or operation status. Does not modify its inputs.
function isUniqueIndexConstraint(value)Returns whether the supplied value satisfies the unique index constraint 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 joinIndexRows(database, source, condition, leftRow, pageTransaction)Implements join index rows 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. |
source |
dynamic |
— | source value consumed by this operation. |
condition |
dynamic |
— | condition value consumed by this operation. |
leftRow |
dynamic |
— | leftRow value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
function keyHasNull(key)Implements key has null for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
key |
dynamic |
— | key value consumed by this operation. |
function keysEqual(left, right)Implements keys equal 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 markIndexesDirty(database)Implements mark indexes dirty for this module. Returns the computed value or operation status. Performs I/O through its file, transport, or storage dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
function namedCompositeEqualityIndexRows(database, table, expression, pageTransaction, indexName)Executes a complete equality probe against a named composite index, or the first usable composite index when indexName is empty.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
expression |
dynamic |
— | expression value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
indexName |
dynamic |
— | indexName value consumed by this operation. |
function namedConstraintForSingleColumn(database, table, columnIndex, indexName)Finds a single-column index, optionally requiring the optimizer's stable catalog index name. An empty name retains the legacy first-match behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
columnIndex |
dynamic |
— | Zero-based index of column. |
indexName |
dynamic |
— | indexName value consumed by this operation. |
function namedEqualityIndexRows(database, table, columnIndex, literalValue, pageTransaction, indexName)Executes an equality lookup through one explicitly named single-column index, or through the first matching index when indexName is empty.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
columnIndex |
dynamic |
— | Zero-based index of column. |
literalValue |
dynamic |
— | literalValue value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
indexName |
dynamic |
— | indexName value consumed by this operation. |
function namedExpressionIndexRows(database, table, expression, pageTransaction, indexName)Executes an equality/range probe against one named expression index.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
expression |
dynamic |
— | expression value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
indexName |
dynamic |
— | indexName value consumed by this operation. |
function namedRangeIndexRows(database, table, columnIndex, literalValue, operator, pageTransaction, indexName)Executes a range lookup through one explicitly named single-column index, or through the first matching index when indexName is empty.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
columnIndex |
dynamic |
— | Zero-based index of column. |
literalValue |
dynamic |
— | literalValue value consumed by this operation. |
operator |
dynamic |
— | operator value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
indexName |
dynamic |
— | indexName value consumed by this operation. |
function namedSingleIndexRows(database, table, expression, pageTransaction, indexName)Implements index rows for bound 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. Finds one executable single-column index predicate inside an AND tree. The caller retains the complete WHERE predicate as a post-filter, so using one conjunct here is semantically equivalent to a database index candidate scan.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
expression |
dynamic |
— | expression value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
indexName |
dynamic |
— | indexName value consumed by this operation. |
function nextIdentity(database, table, columnIndex, pageTransaction, file)Implements next identity 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. |
table |
dynamic |
— | table value consumed by this operation. |
columnIndex |
dynamic |
— | Zero-based index of column. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
file |
dynamic |
— | file value consumed by this operation. |
const OBJECT_NOT_FOUND = 9014Defines the object not found constant used by the minisql executor dml module.
function openPersistentTableReader(database, table, pageTransaction)Acquires a persistent table handle and creates a non-owning reader over it. The returned lease keeps the handle generation alive while positioned reads materialize every heap reference.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
function openReadOnlyIndex(database, constraint, operation)Opens an index for a read plan while retaining the concrete path in errors. This makes a missing or inaccessible derived file diagnosable without hiding corruption behind a generic native CreateFile failure.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
constraint |
dynamic |
— | constraint value consumed by this operation. |
operation |
dynamic |
— | operation value consumed by this operation. |
const PAGE_FULL = 9015Defines the page full constant used by the minisql executor dml module.
function plannedCombinedIndexRowsForBound(database, bound, pageTransaction, indexNames, unionMode)Executes a planned intersection or union of independently safe index probes. Combining durable row identities preserves one heap row per result even when duplicate OR branches or overlapping indexes return the same entry.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
bound |
dynamic |
— | bound value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
indexNames |
dynamic |
— | indexNames value consumed by this operation. |
unionMode |
dynamic |
— | unionMode value consumed by this operation. |
function plannedCoveredIndexEntries(database, table, expression, constraint)Reads B+-tree entries for the exact equality/range shape accepted by the optimizer. Unlike ordinary index access this helper deliberately stops before heap dereference so a covering plan can reconstruct rows from key bytes.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
expression |
dynamic |
— | expression value consumed by this operation. |
constraint |
dynamic |
— | constraint value consumed by this operation. |
function plannedIndexOnlyRowsForBound(database, bound, pageTransaction, indexName)Executes a planned covering scan without touching table or overflow pages.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
bound |
dynamic |
— | bound value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
indexName |
dynamic |
— | indexName value consumed by this operation. |
function plannedIndexReferencesForBound(database, bound, indexName)Reads encoded row identities from one optimizer-selected ordinary index. Functional keys retain their safe single-index fallback until their entry codec exposes the same generic reference-only interface.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
bound |
dynamic |
— | bound value consumed by this operation. |
indexName |
dynamic |
— | indexName value consumed by this operation. |
function plannedIndexRowsForBound(database, bound, pageTransaction, indexName)Executes exactly the optimizer-selected access path for a single-table SELECT. Returning void lets the executor fall back safely if catalog or transaction visibility changed after planning.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
bound |
dynamic |
— | bound value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
indexName |
dynamic |
— | indexName value consumed by this operation. |
function publishCommitted(database, pageTransaction, commitLsn)Implements publish committed for this module. Requires arguments that satisfy the validation performed below. Returns its result or propagates a structured error from validation or a dependency. Performs I/O through its file, transport, or storage dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
commitLsn |
dynamic |
— | commitLsn value consumed by this operation. |
function rangeIndexRows(database, table, columnIndex, literalValue, operator, pageTransaction)Preserves the legacy range-index API for callers without a physical plan.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
columnIndex |
dynamic |
— | Zero-based index of column. |
literalValue |
dynamic |
— | literalValue value consumed by this operation. |
operator |
dynamic |
— | operator value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
const READ_ONLY_VIOLATION = 9012Defines the read only violation constant used by the minisql executor dml module.
function readOnlyIndexContext(lease)Returns the event context amortized across this index probe's page reads.
| Parameter | Type | Default | Description |
|---|---|---|---|
lease |
dynamic |
— | lease value consumed by this operation. |
function readOnlyIndexTree(lease)Returns the immutable BTree owned by one active database handle lease.
| Parameter | Type | Default | Description |
|---|---|---|---|
lease |
dynamic |
— | lease value consumed by this operation. |
function rebuildAllIndexes(database)Implements rebuild all indexes 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. |
function rebuildIndex(database, table, constraint)Implements rebuild index for this module. Requires arguments that satisfy the validation performed below. Returns its result or propagates a structured error from validation or a dependency. Performs I/O through its file, transport, or storage dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
constraint |
dynamic |
— | constraint value consumed by this operation. |
function rebuildIndexesForTable(database, table)Implements rebuild indexes for table 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. |
table |
dynamic |
— | table value consumed by this operation. |
function reindex(database, name)Implements reindex 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. |
name |
dynamic |
— | Name of the affected item. |
function resetWalAfterVacuum(database)Resets WAL after vacuum using the supplied inputs. Returns the computed value or operation status. May mutate supplied state and perform I/O through its dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
function rewriteTableStreaming(databasePath, path, pageSize, databaseId, table)Rewrites one table with memory bounded to one source page, one decoded row, and one target page. This is the VACUUM path for multi-gigabyte relations; retaining the complete live row set would otherwise scale heap usage with database size and fail long before the storage format reaches its limits.
| Parameter | Type | Default | Description |
|---|---|---|---|
databasePath |
dynamic |
— | Path associated with database. |
path |
dynamic |
— | Path of the file or directory used by the operation. |
pageSize |
dynamic |
— | pageSize value consumed by this operation. |
databaseId |
dynamic |
— | Identifier of database. |
table |
dynamic |
— | table value consumed by this operation. |
function rowReferenceContains(references, candidate)Reports whether a reference collection already contains one row identity.
| Parameter | Type | Default | Description |
|---|---|---|---|
references |
dynamic |
— | references value consumed by this operation. |
candidate |
dynamic |
— | candidate value consumed by this operation. |
function rowsFromIndexEntries(database, table, constraint, pageTransaction, entries)Implements rows from index entries 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. |
constraint |
dynamic |
— | constraint value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
entries |
dynamic |
— | entries value consumed by this operation. |
function rowsFromReferences(database, table, pageTransaction, references)Materializes one combined identity set through one shared table reader.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
references |
dynamic |
— | references value consumed by this operation. |
function sameReference(left, right)Implements same reference 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 sameRowReference(left, right)Reports whether two durable heap references identify the same row version.
| Parameter | Type | Default | Description |
|---|---|---|---|
left |
dynamic |
— | left value consumed by this operation. |
right |
dynamic |
— | right value consumed by this operation. |
function scanRows(database, table, pageTransaction, existingFile)Scans rows 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 |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
existingFile |
dynamic |
— | existingFile value consumed by this operation. |
function scanRowsColumns(database, table, pageTransaction, existingFile, requiredColumns)Scans rows while retaining only columns needed by a constraint check.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
existingFile |
dynamic |
— | existingFile value consumed by this operation. |
requiredColumns |
dynamic |
— | requiredColumns value consumed by this operation. |
function schemaState(database)Implements schema state 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. |
function singleIndexRows(database, table, expression, pageTransaction)Finds the first executable single-column predicate for legacy callers.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
expression |
dynamic |
— | expression value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
function stageDelete(pageTransaction, file, table, reference)Implements stage delete for this 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 |
|---|---|---|---|
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
file |
dynamic |
— | file value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
reference |
dynamic |
— | reference value consumed by this operation. |
function stageInsert(pageTransaction, file, table, encodedRow)Implements stage insert for this module. Requires arguments that satisfy the validation performed below. Returns its result or propagates a structured error from validation or a dependency. Performs I/O through its file, transport, or storage dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
file |
dynamic |
— | file value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
encodedRow |
dynamic |
— | encodedRow value consumed by this operation. |
function stageInsertWithCursor(pageTransaction, file, table, encodedRow, cursor)Stages one row while advancing a statement-local heap cursor. Pages before the cursor were already proven full and cannot gain space during an insert-only batch, so each heap page is visited only a bounded number of times.
| Parameter | Type | Default | Description |
|---|---|---|---|
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
file |
dynamic |
— | file value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
encodedRow |
dynamic |
— | encodedRow value consumed by this operation. |
cursor |
dynamic |
— | cursor value consumed by this operation. |
function stageUpdate(pageTransaction, file, table, reference, encodedRow)Implements stage update for this module. Requires arguments that satisfy the validation performed below. 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 |
|---|---|---|---|
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
file |
dynamic |
— | file value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
reference |
dynamic |
— | reference value consumed by this operation. |
encodedRow |
dynamic |
— | encodedRow value consumed by this operation. |
function storageRow(rowSchema, table, sqlValues, file, ownerId)Implements storage row for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
rowSchema |
dynamic |
— | rowSchema value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
sqlValues |
dynamic |
— | sqlValues value consumed by this operation. |
file |
dynamic |
— | file value consumed by this operation. |
ownerId |
dynamic |
— | Identifier of owner. |
function tableSchemaState(database, table)Implements table schema state 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. |
table |
dynamic |
— | table value consumed by this operation. |
function targetMilestone()Performs the targetMilestone operation for the minisql executor dml module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
const TRANSACTION_STATE = 9011Defines the transaction state constant used by the minisql executor dml module.
function truncate(database, sessionId, bound, pageTransaction)Implements truncate for this module. Requires arguments that satisfy the validation performed below. Returns its result or propagates a structured error from validation or a dependency. Performs I/O through its file, transport, or storage dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
sessionId |
dynamic |
— | Identifier of session. |
bound |
dynamic |
— | bound value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
const TYPE_MISMATCH = 9017Defines the type mismatch constant used by the minisql executor dml module.
function uniqueConstraints(database, table)Implements unique constraints 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. |
table |
dynamic |
— | table value consumed by this operation. |
const UNSUPPORTED_SQL = 9025Defines the unsupported sql constant used by the minisql executor dml module.
function update(database, sessionId, bound, pageTransaction)Implements update for this module. Requires arguments that satisfy the validation performed below. Returns its result or propagates a structured error from validation or a dependency. Performs I/O through its file, transport, or storage dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
sessionId |
dynamic |
— | Identifier of session. |
bound |
dynamic |
— | bound value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
function updateInner(database, sessionId, bound, pageTransaction, file)Implements update inner 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. |
sessionId |
dynamic |
— | Identifier of session. |
bound |
dynamic |
— | bound value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
file |
dynamic |
— | file value consumed by this operation. |
function vacuum(database, tableName)Implements vacuum 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. |
tableName |
dynamic |
— | tableName value consumed by this operation. |
function vacuumStorageValues(heap, table, sqlValues, ownerId)Implements vacuum storage values 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 |
|---|---|---|---|
heap |
dynamic |
— | heap value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
sqlValues |
dynamic |
— | sqlValues value consumed by this operation. |
ownerId |
dynamic |
— | Identifier of owner. |
function vacuumTable(database, table)Implements vacuum table for this module. Returns the computed value or operation status. Performs I/O through its file, transport, or storage dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
function validateCheck(table, constraint, row)Validates check 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. |
constraint |
dynamic |
— | constraint value consumed by this operation. |
row |
dynamic |
— | row value consumed by this operation. |
function validateDeleteReferences(database, table, row, pageTransaction, file)Validates delete references 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 |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
row |
dynamic |
— | row value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
file |
dynamic |
— | file value consumed by this operation. |
function validateExistingConstraint(database, bound)Validates existing constraint 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 |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
bound |
dynamic |
— | bound value consumed by this operation. |
function validateForeignKey(database, table, constraint, row, pageTransaction, file)Validates foreign key 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 |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
constraint |
dynamic |
— | constraint value consumed by this operation. |
row |
dynamic |
— | row value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
file |
dynamic |
— | file value consumed by this operation. |
function validateIndexEntryValueShape(constraint, encoded)Validates the leaf-value shape before a heap-backed scan consumes only its row-reference prefix. Full payload decoding remains exclusive to index-only scans, while ordinary legacy values still require an exact 12-byte length.
| Parameter | Type | Default | Description |
|---|---|---|---|
constraint |
dynamic |
— | constraint value consumed by this operation. |
encoded |
dynamic |
— | encoded value consumed by this operation. |
function validateRow(database, table, row, pageTransaction, excludedReference, file)Validates row 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 |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
row |
dynamic |
— | row value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
excludedReference |
dynamic |
— | excludedReference value consumed by this operation. |
file |
dynamic |
— | file value consumed by this operation. |
function validateUnique(database, table, constraint, row, pageTransaction, excludedReference, file)Validates unique 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 |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
constraint |
dynamic |
— | constraint value consumed by this operation. |
row |
dynamic |
— | row value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
excludedReference |
dynamic |
— | excludedReference value consumed by this operation. |
file |
dynamic |
— | file value consumed by this operation. |
function validateUniqueBatch(database, table, rows, pageTransaction, file)Validates all unique keys for a statement from one stable table snapshot. Precomputed keys remove the repeated full heap scan previously performed for every inserted row while retaining SQL NULL and primary-key semantics.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
rows |
dynamic |
— | rows value consumed by this operation. |
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
file |
dynamic |
— | file value consumed by this operation. |
function verifyAllIndexes(database)Verifies all indexes 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 |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
function verifyIndex(database, table, constraint)Verifies one index while guaranteeing that both read-only handles are closed on comparison failures. B+ tree open already performs the streaming structural audit, and the explicit call documents that integrity is part of this API.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
constraint |
dynamic |
— | constraint value consumed by this operation. |
function verifyIndexStreaming(database, table, constraint, tree, reader)Compares one derived index with the heap through forward-only row reads and logarithmic B+ tree membership probes. Count equality plus the presence of every unique row-reference entry proves that the tree has neither missing nor additional entries, without retaining either complete collection.
| Parameter | Type | Default | Description |
|---|---|---|---|
database |
dynamic |
— | database value consumed by this operation. |
table |
dynamic |
— | table value consumed by this operation. |
constraint |
dynamic |
— | constraint value consumed by this operation. |
tree |
dynamic |
— | tree value consumed by this operation. |
reader |
dynamic |
— | reader value consumed by this operation. |
function visiblePage(pageTransaction, file, tableId, pageNumber)Implements visible page for this module. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Performs I/O through its file, transport, or storage dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
pageTransaction |
dynamic |
— | pageTransaction value consumed by this operation. |
file |
dynamic |
— | file value consumed by this operation. |
tableId |
dynamic |
— | Identifier of table. |
pageNumber |
dynamic |
— | pageNumber value consumed by this operation. |
function writePublicationBatch(file, firstPageNumber, images)Writes one consecutive publication batch. Keeping batches below 512 KiB amortizes Win32 seek/write calls without allowing a large transaction to duplicate an unbounded number of committed page images.
| Parameter | Type | Default | Description |
|---|---|---|---|
file |
dynamic |
— | file value consumed by this operation. |
firstPageNumber |
dynamic |
— | firstPageNumber value consumed by this operation. |
images |
dynamic |
— | images value consumed by this operation. |
function writeRowsToHeap(path, pageSize, databaseId, table, rows)Writes rows to heap using the supplied inputs. Requires arguments that satisfy the validation performed below. Returns its result or propagates a structured error from validation or a dependency. Performs I/O through its file, transport, or storage dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
path |
dynamic |
— | Path of the file or directory used by the operation. |
pageSize |
dynamic |
— | pageSize value consumed by this operation. |
databaseId |
dynamic |
— | Identifier of database. |
table |
dynamic |
— | table value consumed by this operation. |
rows |
dynamic |
— | rows value consumed by this operation. |