Expand description
Canonical request model (spec section 10.4, S1D-001).
Every protocol adapter (native RPC, HTTP/JSON, Kit, MySQL wire) converts
its wire form into the canonical ExecuteRequest defined here, so
admission, authorization, resource governance, and execution see exactly
one request shape regardless of how the request arrived.
§Deadline representation
The spec model carries deadline: Option<Instant>, but
std::time::Instant is opaque, monotonic, and not serde-able, so the
canonical model instead stores deadline_unix_micros: wall-clock
microseconds since the Unix epoch — the same time base as
mongreldb_types::hlc::HlcTimestamp::physical_micros. This form is
serde-stable in every format, comparable across processes, and converts
to a monotonic Instant once at server admission; queue wait, planning,
execution, serialization, and network backpressure all count toward it
(S1D-006). None means the server applies its configured default
deadline: a request is never unbounded (spec section 4.9).
§Identity mapping
AuthenticatedIdentity is the protocol-side canonical form of the
engine-side identity (mongreldb_core::auth::Principal, the handle
identity carried by every open database handle):
AuthenticatedIdentity::CatalogUserpins the immutable catalog identity:username,user_id, andcreated_versionmap toPrincipal::username,Principal::user_id, andPrincipal::created_epoch. Roles, permissions, and the admin flag are deliberately NOT part of the wire identity: the server re-resolves them from the catalog at session open, so username reuse cannot revive a stale principal.AuthenticatedIdentity::Credentiallesscorresponds to deployments with catalog auth disabled (embedded mode, or a daemon without--auth-users): there is noPrincipalat all.AuthenticatedIdentity::ServicePrincipalcorresponds to internal server components (replication, CDC, maintenance jobs) that act without catalog credentials. External adapters MUST never mint one; the authorization boundary fails closed on unrecognized principals.
Structs§
- Execute
Request - The canonical request every protocol adapter converts into (S1D-001).
- Result
Limits - Per-request result bounds (spec sections 4.9 and 10.4, S1D-001).
- Session
Id - Identifies one client session.
Enums§
- Admin
Command - Administrative operations carried by
ExecuteCommand::Admin. - Authenticated
Identity - The authenticated identity attached to a request (S1D-001).
- Execute
Command - The operation an
ExecuteRequestasks the server to perform (S1D-001). - Isolation
Level - MVCC isolation level requested by
ExecuteCommand::Begin. - Parameter
Value - One bound parameter value of a
ExecuteCommand::SqlorExecuteCommand::ExecutePreparedrequest. - Session
IdParse Error - Error returned when parsing a textual
SessionIdfails.
Constants§
- DEFAULT_
MAX_ BYTES - Conservative default result-size bound: 64 MiB of Arrow IPC payload.
- DEFAULT_
MAX_ CANDIDATE_ COUNT - Conservative default candidate-count bound: one million candidates.
- DEFAULT_
MAX_ ROWS - Conservative default bounds a server applies when a request does not state one explicitly (spec section 4.9): 100 000 rows.