Skip to main content

Crate graphddb_runtime

Crate graphddb_runtime 

Source
Expand description

GraphDDB Rust runtime (issue #214).

A faithful port of the reference Python runtime (python/graphddb_runtime): it interprets the language-neutral IR (manifest.json + operations.json, SPEC_VERSION 1.1) and executes the validated access patterns against DynamoDB via aws-sdk-dynamodb, achieving byte-level parity with the TS live executor and the Python / PHP runtimes (the conformance golden).

The consumer API mirrors the Python surface: GraphDDBRuntime::from_paths builds a runtime from the IR bundle; execute_query / execute_command / execute_transaction / execute_query_method / execute_command_method / explain run access patterns (async). Params are keyed by their original definition names; results are serde_json::Value (typed bindings are out of scope for this issue).

Re-exports§

pub use client::AwsDynamoClient;
pub use client::DynamoClient;
pub use errors::ErrorKind;
pub use errors::GraphDDBError;
pub use errors::Result;
pub use limits::RuntimeLimits;
pub use middleware::Middleware;
pub use middleware::MiddlewareRegistry;
pub use middleware::PersistCtx;
pub use middleware::PersistItemCtx;
pub use middleware::ReadOpCtx;
pub use middleware::ReadRequestCtx;
pub use middleware::Recovery;
pub use middleware::WriteCtx;
pub use middleware::WriteHooks;
pub use runtime::connection_json;
pub use runtime::GraphDDBRuntime;
pub use runtime::OpScope;
pub use spec_version::SPEC_VERSION_SUPPORTED;
pub use templates::Params;

Modules§

attribute
Marshaling between the plain value model and aws_sdk_dynamodb AttributeValue, mirroring boto3’s TypeSerializer / TypeDeserializer.
batch
BatchGetItem / BatchWriteItem chunking + UnprocessedKeys/Items retry — a port of python/graphddb_runtime/batch.py.
client
The DynamoDB client abstraction the runtime executes against.
concurrency
Bounded-concurrency staged execution — the async counterpart of python/graphddb_runtime/concurrency.py / the TS mapWithConcurrency.
contract
CQRS contract-method execution — impl block on GraphDDBRuntime, porting the contract half of runtime.py (execute_query_method / execute_command_method and their point/range/batch/composition helpers).
cursor
Pagination cursor encode/decode — a faithful port of python/graphddb_runtime/cursor.py and the TS src/pagination/cursor.ts.
ddb_number
A DynamoDB number rendered into a cursor token byte-identically to the Python runtime — the parity SSoT.
entity
Manifest key-attribute derivation shared by the put / transaction write paths — a port of the _add_key_attributes / _fill / _fillable helpers.
errors
Error taxonomy for the GraphDDB Rust runtime (issue #214).
filters
Declarative filter -> DynamoDB FilterExpression compiler — a port of python/graphddb_runtime/filters.py (itself a port of the TS compileFilterExpression).
hydration
Hydration of raw DynamoDB items into result values — a port of python/graphddb_runtime/hydration.py.
iso_datetime
ISO-8601 instant handling for hydration parity.
limits
Runtime execution limits — a port of python/graphddb_runtime/limits.py.
middleware
Host-side middleware / hooks — the Rust parity counterpart of python/graphddb_runtime/middleware.py and the merged PHP php/src/Middleware/*.
per_key_cursor
Per-key cursor envelope for batched range contract methods — a byte-for-byte port of python/graphddb_runtime/per_key_cursor.py and the TS src/runtime/per-key-cursor.ts.
persist_hook
Bridging composed TransactWriteItems to the W3 PersistItemCtx seam.
pyfloat
Format an f64 byte-identically to CPython’s repr(float) / json.dumps(float).
relations
Multi-operation relation traversal / result assembly — a port of python/graphddb_runtime/relations.py.
relations_exec
Relation assembly execution — impl block on GraphDDBRuntime, porting _assemble_relations / RelationAssembler / _run_relation_*.
runtime
GraphDDBRuntime — the DynamoDB executor (port of python/graphddb_runtime/runtime.py).
spec_version
Spec-version guard — a port of _validate_spec_version in python/graphddb_runtime/runtime.py.
templates
Parameter validation and {param} template resolution — a port of python/graphddb_runtime/templates.py.
transactions
Declarative transaction expansion — a port of python/graphddb_runtime/transactions.py.
value
The plain (deserialized) value model — the Rust counterpart of the Python objects boto3’s TypeDeserializer produces (str, Decimal, bool, None, list, dict) and of the PHP decodeAttr output.
write
Write path (commands) + transaction execution — impl block on GraphDDBRuntime, porting the write half of runtime.py + transactions.py’s execution entrypoint.