Skip to content

Latest commit

 

History

History
389 lines (244 loc) · 14.7 KB

File metadata and controls

389 lines (244 loc) · 14.7 KB

src/minisql/sql/types.ml

Home · Files

Provides minisql sql types facilities for this project.

Package: minisql.sql.types

Reachable from entry: yes

Imports

Declarations

BINDING_ERROR

const BINDING_ERROR = 9020

Defines the binding error constant used by the minisql sql types module.

View source

canAssign

function canAssign(source, target)

Returns whether the supplied value satisfies the assign condition. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Does not modify its inputs.

Parameter Type Default Description
source dynamic source value consumed by this operation.
target dynamic target value consumed by this operation.

View source

commonNumeric

function commonNumeric(left, right)

Implements common numeric for this module. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.

Parameter Type Default Description
left dynamic left value consumed by this operation.
right dynamic right value consumed by this operation.

View source

comparable

function comparable(left, right)

Implements comparable for this module. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.

Parameter Type Default Description
left dynamic left value consumed by this operation.
right dynamic right value consumed by this operation.

View source

componentName

function componentName()

Performs the componentName operation for the minisql sql types module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.

View source

create

function create(kind, length, precision, scale, nullable)

Creates create for the minisql sql types 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
kind dynamic kind value consumed by this operation.
length dynamic length value consumed by this operation.
precision dynamic precision value consumed by this operation.
scale dynamic scale value consumed by this operation.
nullable dynamic nullable value consumed by this operation.

View source

fail

function fail(code, operation, message)

Performs the fail operation for the minisql sql types 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.

View source

fromColumn

function fromColumn(column)

Implements from column 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
column dynamic column value consumed by this operation.

View source

fromTypeName

function fromTypeName(typeName, nullable)

Implements from type name for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.

Parameter Type Default Description
typeName dynamic typeName value consumed by this operation.
nullable dynamic nullable value consumed by this operation.

View source

INVALID_ARGUMENT

const INVALID_ARGUMENT = 9001

Defines the invalid argument constant used by the minisql sql types module.

View source

isBinaryKind

function isBinaryKind(kind)

Returns whether the supplied value satisfies the binary kind condition. Returns the computed value or operation status. Does not modify its inputs.

Parameter Type Default Description
kind dynamic kind value consumed by this operation.

View source

isImplemented

function isImplemented()

Returns whether implemented satisfies the condition required by the minisql sql types module. Returns the computed value or operation status. Does not modify its inputs.

View source

isIntegralKind

function isIntegralKind(kind)

Returns whether the supplied value satisfies the integral kind condition. Returns the computed value or operation status. Does not modify its inputs.

Parameter Type Default Description
kind dynamic kind value consumed by this operation.

View source

isNumeric

function isNumeric(value)

Returns whether the supplied value satisfies the numeric 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.

View source

isNumericKind

function isNumericKind(kind)

Returns whether the supplied value satisfies the numeric kind condition. Returns the computed value or operation status. Does not modify its inputs.

Parameter Type Default Description
kind dynamic kind value consumed by this operation.

View source

isSqlType

function isSqlType(value)

Returns whether the supplied value satisfies the SQL type 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.

View source

isTextKind

function isTextKind(kind)

Returns whether the supplied value satisfies the text kind condition. Returns the computed value or operation status. Does not modify its inputs.

Parameter Type Default Description
kind dynamic kind value consumed by this operation.

View source

kindName

function kindName(kind)

Implements kind name for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.

Parameter Type Default Description
kind dynamic kind value consumed by this operation.

View source

numericRank

function numericRank(kind)

Implements numeric rank for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.

Parameter Type Default Description
kind dynamic kind value consumed by this operation.

View source

sameBase

function sameBase(left, right)

Implements same base for this module. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.

Parameter Type Default Description
left dynamic left value consumed by this operation.
right dynamic right value consumed by this operation.

View source

targetMilestone

function targetMilestone()

Performs the targetMilestone operation for the minisql sql types module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.

View source

TYPE_MISMATCH

const TYPE_MISMATCH = 9017

Defines the type mismatch constant used by the minisql sql types module.

View source

validKind

function validKind(kind)

Implements valid kind 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
kind dynamic kind value consumed by this operation.

View source

withNullable

function withNullable(value, nullable)

Implements with nullable 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.
nullable dynamic nullable value consumed by this operation.

View source