Provides minisql client client facilities for this project.
Package: minisql.client.client
Reachable from entry: yes
minisql/common/uuid.mlasuuid→ src/minisql/common/uuid.mlminisql/common/version.mlasversion→ src/minisql/common/version.mlminisql/protocol/connection.mlasconnection→ src/minisql/protocol/connection.mlminisql/protocol/constants.mlasconstants→ src/minisql/protocol/constants.mlminisql/protocol/messages.mlasmessages→ src/minisql/protocol/messages.ml
function abort(client)Aborts a client whose request/response framing may have been interrupted.
| Parameter | Type | Default | Description |
|---|---|---|---|
client |
dynamic |
— | client value consumed by this operation. |
const AUTHENTICATION_FAILED = 9027Defines the authentication failed constant used by the minisql client client module.
function authenticationFailure(operation)Implements authentication failure for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
operation |
dynamic |
— | operation value consumed by this operation. |
function beginQuery(client, sqlText)Sends one SQL request and transfers ownership of its response stream to a cursor. A connection permits one active query because protocol v1 preserves response ordering and intentionally does not interleave request frames.
| Parameter | Type | Default | Description |
|---|---|---|---|
client |
dynamic |
— | client value consumed by this operation. |
sqlText |
dynamic |
— | sqlText value consumed by this operation. |
function cancelSession(client, sessionId)Requests cooperative cancellation through a separate administrative client. The target query connection remains protocol-aligned and receives error 9035.
| Parameter | Type | Default | Description |
|---|---|---|---|
client |
dynamic |
— | client value consumed by this operation. |
sessionId |
dynamic |
— | Identifier of session. |
function clearAuthChallenge(challenge)Implements clear auth challenge 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 |
|---|---|---|---|
challenge |
dynamic |
— | challenge value consumed by this operation. |
- minisql.client.client.Client — struct
function close(client)Closes close owned by the minisql client client module. Requires arguments that satisfy the validation performed below. Returns its result or propagates a structured error from validation or a dependency. May mutate supplied state and perform I/O through its dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
client |
dynamic |
— | client value consumed by this operation. |
const CLOSED_HANDLE = 9008Defines the closed handle constant used by the minisql client client module.
function closeFailedOpen(client, result)Closes failed open using the supplied inputs. Returns its result or propagates a structured error from validation or a dependency. May mutate supplied state and perform I/O through its dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
client |
dynamic |
— | client value consumed by this operation. |
result |
dynamic |
— | Result object populated or inspected by the operation. |
function componentName()Performs the componentName operation for the minisql client client module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
function fail(code, operation, message)Performs the fail operation for the minisql client client 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 failQueryCursor(cursor, failure)Invalidates a connection after a response-stream failure. Once a frame has been lost or rejected, protocol v1 cannot safely locate the next request boundary, so the original error is returned and the socket is not reused.
| Parameter | Type | Default | Description |
|---|---|---|---|
cursor |
dynamic |
— | cursor value consumed by this operation. |
failure |
dynamic |
— | failure value consumed by this operation. |
const HANDSHAKE_TIMEOUT_MS = 5000Defines the handshake timeout ms constant used by the minisql client client module.
function helloHandshake(client, operation)Implements hello handshake 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 |
|---|---|---|---|
client |
dynamic |
— | client value consumed by this operation. |
operation |
dynamic |
— | operation value consumed by this operation. |
const INVALID_ARGUMENT = 9001Defines the invalid argument constant used by the minisql client client module.
function isClient(value)Returns whether the supplied value satisfies the client 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 client client module. Returns the computed value or operation status. Does not modify its inputs.
function isQueryCursor(value)Reports whether a value is a forward-only client query cursor.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
dynamic |
— | Value consumed or transformed by the operation. |
function m0SelfTestLine()Performs the m0SelfTestLine operation for the minisql client client module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
function nextQueryBatch(cursor)Receives and decodes one bounded continuation frame. Returning void denotes end-of-stream; the final response itself is returned before that sentinel.
| Parameter | Type | Default | Description |
|---|---|---|---|
cursor |
dynamic |
— | cursor value consumed by this operation. |
function openAuthenticatedAddress(address, port, username, password)Opens authenticated address 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 |
|---|---|---|---|
address |
dynamic |
— | address value consumed by this operation. |
port |
dynamic |
— | port value consumed by this operation. |
username |
dynamic |
— | username value consumed by this operation. |
password |
dynamic |
— | password value consumed by this operation. |
function openAuthenticatedAddressBytes(address, port, username, passwordBytes)Opens authenticated address bytes using the supplied inputs. Requires arguments that satisfy the validation performed below. Returns the computed value or operation status. Performs I/O through its file, transport, or storage dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
address |
dynamic |
— | address value consumed by this operation. |
port |
dynamic |
— | port value consumed by this operation. |
username |
dynamic |
— | username value consumed by this operation. |
passwordBytes |
dynamic |
— | passwordBytes value consumed by this operation. |
function openAuthenticatedConnection(connectionValue, username, passwordBytes, operation)Opens authenticated connection 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. May mutate supplied state and perform I/O through its dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
connectionValue |
dynamic |
— | connectionValue value consumed by this operation. |
username |
dynamic |
— | username value consumed by this operation. |
passwordBytes |
dynamic |
— | passwordBytes value consumed by this operation. |
operation |
dynamic |
— | operation value consumed by this operation. |
function openAuthenticatedLoopback(port, username, password)Opens authenticated loopback 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 |
|---|---|---|---|
port |
dynamic |
— | port value consumed by this operation. |
username |
dynamic |
— | username value consumed by this operation. |
password |
dynamic |
— | password value consumed by this operation. |
function openAuthenticatedLoopbackBytes(port, username, passwordBytes)Opens authenticated loopback bytes 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 |
|---|---|---|---|
port |
dynamic |
— | port value consumed by this operation. |
username |
dynamic |
— | username value consumed by this operation. |
passwordBytes |
dynamic |
— | passwordBytes value consumed by this operation. |
function openLoopback(port)Opens loopback 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. Performs I/O through its file, transport, or storage dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
port |
dynamic |
— | port value consumed by this operation. |
function openTlsAuthenticatedAddress(address, port, serverName, username, password)Opens native TLS with Windows trust while wiping the temporary password bytes.
| Parameter | Type | Default | Description |
|---|---|---|---|
address |
dynamic |
— | address value consumed by this operation. |
port |
dynamic |
— | port value consumed by this operation. |
serverName |
dynamic |
— | serverName value consumed by this operation. |
username |
dynamic |
— | username value consumed by this operation. |
password |
dynamic |
— | password value consumed by this operation. |
function openTlsAuthenticatedAddressBytes(address, port, serverName, username, passwordBytes)Opens authenticated MiniSQL over native TLS with Windows X.509 trust.
| Parameter | Type | Default | Description |
|---|---|---|---|
address |
dynamic |
— | address value consumed by this operation. |
port |
dynamic |
— | port value consumed by this operation. |
serverName |
dynamic |
— | serverName value consumed by this operation. |
username |
dynamic |
— | username value consumed by this operation. |
passwordBytes |
dynamic |
— | passwordBytes value consumed by this operation. |
function openTlsPinnedAuthenticatedAddress(address, port, serverName, pinText, username, password)Opens pinned native TLS while wiping the temporary password bytes.
| Parameter | Type | Default | Description |
|---|---|---|---|
address |
dynamic |
— | address value consumed by this operation. |
port |
dynamic |
— | port value consumed by this operation. |
serverName |
dynamic |
— | serverName value consumed by this operation. |
pinText |
dynamic |
— | pinText value consumed by this operation. |
username |
dynamic |
— | username value consumed by this operation. |
password |
dynamic |
— | password value consumed by this operation. |
function openTlsPinnedAuthenticatedAddressBytes(address, port, serverName, pinText, username, passwordBytes)Opens authenticated MiniSQL over native TLS with exact SHA-256 leaf pinning.
| Parameter | Type | Default | Description |
|---|---|---|---|
address |
dynamic |
— | address value consumed by this operation. |
port |
dynamic |
— | port value consumed by this operation. |
serverName |
dynamic |
— | serverName value consumed by this operation. |
pinText |
dynamic |
— | pinText value consumed by this operation. |
username |
dynamic |
— | username value consumed by this operation. |
passwordBytes |
dynamic |
— | passwordBytes value consumed by this operation. |
function ping(client)Implements ping for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
client |
dynamic |
— | client value consumed by this operation. |
function protocolByteCounts(client)Returns sent and received framed-protocol byte counters for diagnostics and reproducible connector benchmarks.
| Parameter | Type | Default | Description |
|---|---|---|---|
client |
dynamic |
— | client value consumed by this operation. |
function query(client, sqlText)Implements query for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
client |
dynamic |
— | client value consumed by this operation. |
sqlText |
dynamic |
— | sqlText value consumed by this operation. |
- minisql.client.client.QueryCursor — struct
function request(client, message)Implements request for this module. Returns the computed value or operation status. May mutate supplied state and perform I/O through its dependencies.
| Parameter | Type | Default | Description |
|---|---|---|---|
client |
dynamic |
— | client value consumed by this operation. |
message |
dynamic |
— | Human-readable message associated with the operation. |
function runInteractive()Runs interactive using the supplied inputs. Returns its result or propagates a structured error from validation or a dependency. Any side effects are limited to the explicitly invoked dependencies.
function sameColumns(left, right)Compares response schemas across continuation frames without relying on aggregate-array identity semantics.
| Parameter | Type | Default | Description |
|---|---|---|---|
left |
dynamic |
— | left value consumed by this operation. |
right |
dynamic |
— | right value consumed by this operation. |
function targetMilestone()Performs the targetMilestone operation for the minisql client client module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.
function validateOpen(client, operation)Validates open for the minisql client client workflow. 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 |
|---|---|---|---|
client |
dynamic |
— | client value consumed by this operation. |
operation |
dynamic |
— | operation value consumed by this operation. |
function versionLine()Performs the versionLine operation for the minisql client client module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.