Skip to content

Latest commit

 

History

History
240 lines (149 loc) · 9.47 KB

File metadata and controls

240 lines (149 loc) · 9.47 KB

src/minisql/protocol/codec.ml

Home · Files

Provides minisql protocol codec facilities for this project.

Package: minisql.protocol.codec

Reachable from entry: yes

Imports

Declarations

componentName

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.

View source

copyRange

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.

View source

CORRUPT_DATA

const CORRUPT_DATA = 9004

Defines the corrupt data constant used by the minisql protocol codec module.

View source

decodeHeader

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.

View source

decodeMessage

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.

View source

encodeHeader

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.

View source

encodeMessage

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.

View source

fail

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.

View source

INVALID_ARGUMENT

const INVALID_ARGUMENT = 9001

Defines the invalid argument constant used by the minisql protocol codec module.

View source

isHeader

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.

View source

isImplemented

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.

View source

magicMatches

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.

View source

targetMilestone

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.

View source

UNSUPPORTED_FORMAT

const UNSUPPORTED_FORMAT = 9003

Defines the unsupported format constant used by the minisql protocol codec module.

View source

writeMagic

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.

View source