Provides minisql protocol codec facilities for this project.
Package: minisql.protocol.codec
Reachable from entry: yes
minisql/common/crc32c.mlascrc32c→ src/minisql/common/crc32c.mlminisql/common/endian.mlasendian→ src/minisql/common/endian.mlminisql/protocol/constants.mlasconstants→ src/minisql/protocol/constants.mlminisql/protocol/messages.mlasmessages→ src/minisql/protocol/messages.ml
function componentName()Performs the componentName operation for the minisql protocol codec module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
function copyRange(source, offset, count, operation)Implements copy range 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. |
offset |
dynamic |
— | Zero-based offset at which processing starts. |
count |
dynamic |
— | Number of items or units to process. |
operation |
dynamic |
— | operation value consumed by this operation. |
const CORRUPT_DATA = 9004Defines the corrupt data constant used by the minisql protocol codec module.
function decodeHeader(source)Decodes header 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 |
|---|---|---|---|
source |
dynamic |
— | source value consumed by this operation. |
function decodeMessage(source)Decodes message 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 |
|---|---|---|---|
source |
dynamic |
— | source value consumed by this operation. |
function encodeHeader(message)Encodes header 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 |
|---|---|---|---|
message |
dynamic |
— | Human-readable message associated with the operation. |
function encodeMessage(message)Encodes message 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 |
|---|---|---|---|
message |
dynamic |
— | Human-readable message associated with the operation. |
function fail(code, operation, message)Performs the fail operation for the minisql protocol codec 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. |
- minisql.protocol.codec.Header — struct
const INVALID_ARGUMENT = 9001Defines the invalid argument constant used by the minisql protocol codec module.
function isHeader(value)Returns whether the supplied value satisfies the header 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 protocol codec module. Returns the computed value or operation status. Does not modify its inputs.
function magicMatches(source)Implements magic matches for this module. 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 targetMilestone()Performs the targetMilestone operation for the minisql protocol codec module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
const UNSUPPORTED_FORMAT = 9003Defines the unsupported format constant used by the minisql protocol codec module.
function writeMagic(output)Writes magic 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 |
|---|---|---|---|
output |
dynamic |
— | Output collection or buffer populated by the operation. |