Provides minisql storage row codec facilities for this project.
Package: minisql.storage.row_codec
Reachable from entry: yes
minisql/common/endian.mlasendian→ src/minisql/common/endian.ml
function bytesEqual(left, right)Performs the bytesEqual operation for the minisql storage row codec module. Inputs: left, right. Returns the produced value or propagates a structured error from validation or delegated operations.
| Parameter | Type | Default | Description |
|---|---|---|---|
left |
dynamic |
— | left value consumed by this operation. |
right |
dynamic |
— | right value consumed by this operation. |
function column(typeCode, nullable, maxLength, precision, scale)Performs the column operation for this module. Inputs: typeCode, nullable, maxLength, precision, scale. Returns the produced value or propagates a structured error from validation or delegated operations.
| Parameter | Type | Default | Description |
|---|---|---|---|
typeCode |
dynamic |
— | typeCode value consumed by this operation. |
nullable |
dynamic |
— | nullable value consumed by this operation. |
maxLength |
dynamic |
— | maxLength value consumed by this operation. |
precision |
dynamic |
— | precision value consumed by this operation. |
scale |
dynamic |
— | scale value consumed by this operation. |
- minisql.storage.row_codec.ColumnSpec — struct
function componentName()Performs the componentName operation for the minisql storage row codec module. Takes no caller-supplied inputs. Returns the produced value or propagates a structured error from validation or delegated operations.
const CORRUPT_DATA = 9004Defines the corrupt data constant used by the minisql storage row codec module.
function decodeBinary(spec, encoded)Decodes the binary. Inputs: spec, encoded. Returns the produced value or propagates a structured error from validation or delegated operations.
| Parameter | Type | Default | Description |
|---|---|---|---|
spec |
dynamic |
— | spec value consumed by this operation. |
encoded |
dynamic |
— | encoded value consumed by this operation. |
function decodeCompatible(rowSchema, encoded)Decodes the compatible. Inputs: rowSchema, encoded. Returns the produced value or propagates a structured error from validation or delegated operations.
| Parameter | Type | Default | Description |
|---|---|---|---|
rowSchema |
dynamic |
— | rowSchema value consumed by this operation. |
encoded |
dynamic |
— | encoded value consumed by this operation. |
function decodeRow(rowSchema, encoded)Decodes the row. Inputs: rowSchema, encoded. Returns the produced value or propagates a structured error from validation or delegated operations.
| Parameter | Type | Default | Description |
|---|---|---|---|
rowSchema |
dynamic |
— | rowSchema value consumed by this operation. |
encoded |
dynamic |
— | encoded value consumed by this operation. |
function decodeScalar(spec, encoded)Decodes the scalar. Inputs: spec, encoded. Returns the produced value or propagates a structured error from validation or delegated operations.
| Parameter | Type | Default | Description |
|---|---|---|---|
spec |
dynamic |
— | spec value consumed by this operation. |
encoded |
dynamic |
— | encoded value consumed by this operation. |
function decodeText(spec, encoded)Decodes the text. Inputs: spec, encoded. Returns the produced value or propagates a structured error from validation or delegated operations.
| Parameter | Type | Default | Description |
|---|---|---|---|
spec |
dynamic |
— | spec value consumed by this operation. |
encoded |
dynamic |
— | encoded value consumed by this operation. |
const DIRECTORY_ENTRY_SIZE = 8Defines the directory entry size constant used by the minisql storage row codec module.
function encode(rowSchema, values)Encodes encode for the minisql storage row codec workflow. Inputs: rowSchema, values. Returns the produced value or propagates a structured error from validation or delegated operations.
| Parameter | Type | Default | Description |
|---|---|---|---|
rowSchema |
dynamic |
— | rowSchema value consumed by this operation. |
values |
dynamic |
— | values value consumed by this operation. |
function encodeBinary(spec, value)Encodes the binary. Inputs: spec, value. Returns the produced value or propagates a structured error from validation or delegated operations.
| Parameter | Type | Default | Description |
|---|---|---|---|
spec |
dynamic |
— | spec value consumed by this operation. |
value |
dynamic |
— | Value consumed or transformed by the operation. |
function encodeRow(rowSchema, values)Encodes the row. Inputs: rowSchema, values. Returns the produced value or propagates a structured error from validation or delegated operations.
| Parameter | Type | Default | Description |
|---|---|---|---|
rowSchema |
dynamic |
— | rowSchema value consumed by this operation. |
values |
dynamic |
— | values value consumed by this operation. |
function encodeScalar(spec, value)Encodes the scalar. Inputs: spec, value. Returns the produced value or propagates a structured error from validation or delegated operations.
| Parameter | Type | Default | Description |
|---|---|---|---|
spec |
dynamic |
— | spec value consumed by this operation. |
value |
dynamic |
— | Value consumed or transformed by the operation. |
function encodeText(spec, value)Encodes the text. Inputs: spec, value. Returns the produced value or propagates a structured error from validation or delegated operations.
| Parameter | Type | Default | Description |
|---|---|---|---|
spec |
dynamic |
— | spec value consumed by this operation. |
value |
dynamic |
— | Value consumed or transformed by the operation. |
function external(encodedPointer)Performs the external operation for this module. Inputs: encodedPointer. Returns the produced value or propagates a structured error from validation or delegated operations.
| Parameter | Type | Default | Description |
|---|---|---|---|
encodedPointer |
dynamic |
— | encodedPointer value consumed by this operation. |
function fail(code, operation, message)Performs the fail operation for the minisql storage row codec module. Inputs: code, operation, message. Returns the produced value or propagates a structured error from validation or delegated operations.
| 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. |
const FLAG_EXTERNAL = 2Defines the flag external constant used by the minisql storage row codec module.
const FLAG_NULL = 1Defines the flag null constant used by the minisql storage row codec module.
const FORMAT_VERSION = 1Defines the format version constant used by the minisql storage row codec module.
const HEADER_SIZE = 16Defines the header size constant used by the minisql storage row codec module.
const INVALID_ARGUMENT = 9001Row format v1. SQL NULL is represented by SqlNull rather than MiniLang void,
function isBinaryType(typeCode)Evaluates whether the supplied input satisfies the binary type predicate. Inputs: typeCode. Returns a boolean result; invalid input or delegated failures are reported as structured errors.
| Parameter | Type | Default | Description |
|---|---|---|---|
typeCode |
dynamic |
— | typeCode value consumed by this operation. |
function isExternalType(typeCode)Evaluates whether the supplied input satisfies the external type predicate. Inputs: typeCode. Returns a boolean result; invalid input or delegated failures are reported as structured errors.
| Parameter | Type | Default | Description |
|---|---|---|---|
typeCode |
dynamic |
— | typeCode value consumed by this operation. |
function isExternalValue(value)Evaluates whether the supplied input satisfies the external value predicate. Inputs: value. Returns a boolean result; invalid input or delegated failures are reported as structured errors.
| 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 storage row codec module. Takes no caller-supplied inputs. Returns a boolean result; invalid input or delegated failures are reported as structured errors.
function isNull(value)Evaluates whether the supplied input satisfies the null predicate. Inputs: value. Returns a boolean result; invalid input or delegated failures are reported as structured errors.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function isTextType(typeCode)Evaluates whether the supplied input satisfies the text type predicate. Inputs: typeCode. Returns a boolean result; invalid input or delegated failures are reported as structured errors.
| Parameter | Type | Default | Description |
|---|---|---|---|
typeCode |
dynamic |
— | typeCode value consumed by this operation. |
function magicBytes()Performs the magicBytes operation for the minisql storage row codec module. Takes no caller-supplied inputs. Returns the produced value or propagates a structured error from validation or delegated operations.
function nullValue()Performs the null value operation for this module. Takes no caller-supplied inputs. Returns the produced value or propagates a structured error from validation or delegated operations.
- minisql.storage.row_codec.RowData — struct
- minisql.storage.row_codec.RowSchema — struct
function schema(version, columns)Performs the schema operation for this module. Inputs: version, columns. Returns the produced value or propagates a structured error from validation or delegated operations.
| Parameter | Type | Default | Description |
|---|---|---|---|
version |
dynamic |
— | version value consumed by this operation. |
columns |
dynamic |
— | columns value consumed by this operation. |
- minisql.storage.row_codec.SqlNull — struct
function targetMilestone()Performs the targetMilestone operation for the minisql storage row codec module. Takes no caller-supplied inputs. Returns the produced value or propagates a structured error from validation or delegated operations.
const TYPE_BIGINT = 4Defines the type bigint constant used by the minisql storage row codec module.
const TYPE_BINARY = 11Defines the type binary constant used by the minisql storage row codec module.
const TYPE_BLOB = 13Defines the type blob constant used by the minisql storage row codec module.
const TYPE_BOOLEAN = 1Defines the type boolean constant used by the minisql storage row codec module.
const TYPE_CHAR = 8Defines the type char constant used by the minisql storage row codec module.
const TYPE_DATE = 14Defines the type date constant used by the minisql storage row codec module.
const TYPE_DECIMAL = 7Defines the type decimal constant used by the minisql storage row codec module.
const TYPE_DOUBLE = 6Defines the type double constant used by the minisql storage row codec module.
const TYPE_INTEGER = 3Defines the type integer constant used by the minisql storage row codec module.
const TYPE_MISMATCH = 9017Defines the type mismatch constant used by the minisql storage row codec module.
const TYPE_REAL = 5Defines the type real constant used by the minisql storage row codec module.
const TYPE_SMALLINT = 2Defines the type smallint constant used by the minisql storage row codec module.
const TYPE_TEXT = 10Defines the type text constant used by the minisql storage row codec module.
const TYPE_TIME = 15Defines the type time constant used by the minisql storage row codec module.
const TYPE_TIMESTAMP = 16Defines the type timestamp constant used by the minisql storage row codec module.
const TYPE_VARBINARY = 12Defines the type varbinary constant used by the minisql storage row codec module.
const TYPE_VARCHAR = 9Defines the type varchar constant used by the minisql storage row codec module.
const UNSUPPORTED_FORMAT = 9003Defines the unsupported format constant used by the minisql storage row codec module.
function validType(typeCode)Performs the valid type operation for this module. Inputs: typeCode. Returns the produced value or propagates a structured error from validation or delegated operations.
| Parameter | Type | Default | Description |
|---|---|---|---|
typeCode |
dynamic |
— | typeCode value consumed by this operation. |