Provides minisql sql values facilities for this project.
Package: minisql.sql.values
Reachable from entry: yes
minisql/common/endian.mlasendian→ src/minisql/common/endian.mlminisql/sql/ast.mlasast→ src/minisql/sql/ast.mlminisql/sql/types.mlastypes→ src/minisql/sql/types.mlminisql/storage/row_codec.mlasrow_codec→ src/minisql/storage/row_codec.ml
function asInt64(value)Implements as int64 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 |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function asNumber(value)Implements as number 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 |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function binary(value)Implements binary 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 |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
const BINDING_ERROR = 9020Defines the binding error constant used by the minisql sql values module.
function boolean(value)Implements boolean 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 |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function cast(value, target)Casts cast 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 |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
target |
dynamic |
— | target value consumed by this operation. |
function compareNonNull(left, right)Compares non null using the supplied inputs. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Does not modify its inputs.
| Parameter | Type | Default | Description |
|---|---|---|---|
left |
dynamic |
— | left value consumed by this operation. |
right |
dynamic |
— | right value consumed by this operation. |
function componentName()Performs the componentName operation for the minisql sql values module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
const CONSTRAINT_VIOLATION = 9021Defines the constraint violation constant used by the minisql sql values module.
function convert(value, target)Converts convert 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 |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
target |
dynamic |
— | target value consumed by this operation. |
function decimalLiteral(textValue, precision, scale)Implements decimal literal for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
textValue |
dynamic |
— | textValue value consumed by this operation. |
precision |
dynamic |
— | precision value consumed by this operation. |
scale |
dynamic |
— | scale value consumed by this operation. |
function decimalPower10(exponent)Implements decimal power10 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 |
|---|---|---|---|
exponent |
dynamic |
— | exponent value consumed by this operation. |
function decimalWordsFromText(textValue, precision, scale)Parse a decimal spelling into the exact signed scaled integer used by the row format. No binary floating-point arithmetic, rounding or truncation is used. Values with more non-zero fractional digits than the declared scale are rejected instead of silently changing the user's input. Implements decimal words from 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 |
|---|---|---|---|
textValue |
dynamic |
— | textValue value consumed by this operation. |
precision |
dynamic |
— | precision value consumed by this operation. |
scale |
dynamic |
— | scale value consumed by this operation. |
function decimalWordsFromValue(value, target)Implements decimal words from value 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 |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
target |
dynamic |
— | target value consumed by this operation. |
function doubleValue(value)Implements double value 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 |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function fail(code, operation, message)Performs the fail operation for the minisql sql values 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 floatingNumberFromText(textValue)MiniLang's native toNumber parser accepts ordinary decimal spellings but does not accept scientific notation. SQL approximate-number literals do, so split an optional exponent and apply it explicitly. This keeps ordinary spellings on the compiler's well-tested conversion path while supporting forms such as 1.25e2, 1E-3 and a leading plus sign. Implements floating number from 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 |
|---|---|---|---|
textValue |
dynamic |
— | textValue value consumed by this operation. |
function floatingTextPart(raw, startOffset, endOffset, operation)Implements floating text part 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 |
|---|---|---|---|
raw |
dynamic |
— | raw value consumed by this operation. |
startOffset |
dynamic |
— | startOffset value consumed by this operation. |
endOffset |
dynamic |
— | endOffset value consumed by this operation. |
operation |
dynamic |
— | operation value consumed by this operation. |
function fromLiteral(expression)Implements from literal 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 fromStorage(typeKind, raw)Implements from storage for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
typeKind |
dynamic |
— | typeKind value consumed by this operation. |
raw |
dynamic |
— | raw value consumed by this operation. |
function fromTruth(value)Implements from truth 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 int64Compare(left, right)Implements int64 compare 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 integer(value)Implements integer 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 |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
const INVALID_ARGUMENT = 9001Defines the invalid argument constant used by the minisql sql values module.
function isImplemented()Returns whether implemented satisfies the condition required by the minisql sql values module. Returns the computed value or operation status. Does not modify its inputs.
function isNull(value)Returns whether the supplied value satisfies the null 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 isSqlValue(value)Returns whether the supplied value satisfies the SQL value 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 literalFloat(textValue)Implements literal float 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 |
|---|---|---|---|
textValue |
dynamic |
— | textValue value consumed by this operation. |
function literalInteger(textValue)Implements literal integer 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 |
|---|---|---|---|
textValue |
dynamic |
— | textValue value consumed by this operation. |
function logicalAnd(left, right)Implements logical and 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 logicalNot(value)Implements logical not 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 logicalOr(left, right)Implements logical or 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 nullValue(typeKind)Implements null value 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 |
|---|---|---|---|
typeKind |
dynamic |
— | typeKind value consumed by this operation. |
function of(typeKind, value)Implements of 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 |
|---|---|---|---|
typeKind |
dynamic |
— | typeKind value consumed by this operation. |
value |
dynamic |
— | Value consumed or transformed by the operation. |
function parseInt64(textValue)Parses int64 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 |
|---|---|---|---|
textValue |
dynamic |
— | textValue value consumed by this operation. |
- minisql.sql.values.SqlValue — struct
function targetMilestone()Performs the targetMilestone operation for the minisql sql values module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
function text(value)Implements 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 |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function toStorage(value)Implements to storage 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 |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function truth(value)Implements truth 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 |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
const TYPE_MISMATCH = 9017Defines the type mismatch constant used by the minisql sql values module.
const U32_BASE = 4294967296Defines the u32 base constant used by the minisql sql values module.
function unsignedMagnitudeToSigned(high, low, negative)Implements unsigned magnitude to signed for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
high |
dynamic |
— | high value consumed by this operation. |
low |
dynamic |
— | low value consumed by this operation. |
negative |
dynamic |
— | negative value consumed by this operation. |
function upperAscii(value)Implements upper ascii 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 |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |