Skip to main content

Module backend

Module backend 

Source
Expand description

Pluggable query execution backend for the Redshift Data mock service.

The RedshiftQueryBackend trait abstracts SQL execution so that alternative implementations (e.g. DuckDB-backed) can be swapped in without touching the protocol layer.

The built-in InMemoryRedshiftQueryBackend is the default; it returns the same hardcoded three-row mock result (Number/Street/City) that the service used before the backend abstraction was introduced, preserving backward-compatible behavior for existing tests.

§Object safety and async

Uses the same Pin<Box<dyn Future>> pattern as winterbaume-sqs/winterbaume-sns so that Arc<dyn RedshiftQueryBackend> is object-safe without the async-trait crate.

Structs§

InMemoryRedshiftQueryBackend
Default in-memory backend: returns the hardcoded three-row mock result (Number/Street/City) for single statements, and an empty result for batch executions. Statements are stored with status Finished.
StatementResult
Result of executing a single SQL statement.

Traits§

RedshiftQueryBackend
Pluggable backend for Redshift Data query execution.