Skip to main content

Module sql

Module sql 

Source
Expand description

The SQL runtime: values at the database boundary, and the host variables they come from and go to. It reaches storage only as a byte range and a host type, so any executor can call it.

Structs§

Abandoned
Why a backend could not answer at all, which ends the run: a replay that does not hold the call (SQLR), or a connection that failed (SQL).
Call
One statement as a backend receives it.
OpenCursor
Outcome
A backend’s answer.
Postgres
Recorder
Writes every call and its answer while inner answers.
Replay
Answers calls from a recording. Strict replay answers call n from entry n; keyed replay answers each call from the first unused entry with the same statement and inputs. A call the recording does not hold ends the run.
Session
A run unit’s connection to its database, and the state the runtime keeps rather than asking the backend, so every backend answers alike.
SqlError
An SQLCODE and its SQLSTATE.
Written
What storing an output value did besides store it: the length a cut string had, for SQLWARN1 and the indicator.

Enums§

HostType
What a host variable holds, as Db2 reads its COBOL declaration.
ReadError
Why an input host variable could not be read: its storage failed as the machine’s own read would (S0C7), or Db2 refuses it with an SQLCODE.
Value
A value at the database boundary.

Constants§

BAD_LENGTH
NOT_ASSIGNABLE
NULL_WITHOUT_INDICATOR
OUT_OF_RANGE
UNCONVERTIBLE

Traits§

Database
Stream
A duplex byte stream: a socket, or TLS over one.
Tls
Wraps a connected socket in TLS, verifying the server’s certificate chain against roots (a PEM file) or built-in roots, and its name as host. ironwork’s own build has no implementation, so that it keeps no dependencies; the build in tls/ supplies one.

Functions§

fingerprint
A statement’s identity in a recording: 32-bit FNV-1a over its canonical text.
read
The value an input host variable sends. bytes is the host variable’s storage.
write
Stores a non-null output value into a host variable’s storage, as Db2 assigns it.

Type Aliases§

Answer