Module query

Module query 

Source
Expand description

Query execution infrastructure for event-sourced entities.

This module provides the underlying query types used by the es_query! macro. These types are not intended to be used directly - instead, use the es_query! macro which provides a simpler interface for querying index tables and automatically hydrating entities from their events.

§Example

Instead of using these types directly, use the es_query! macro:

es_query!(
    "SELECT id FROM users WHERE name = $1",
    name
).fetch_one(&pool).await

See the es_query! macro documentation for more details.

Structs§

EsQuery
Query builder for event-sourced entities.
EsQueryFlavorFlat
Query flavor for flat entities without nested relationships.
EsQueryFlavorNested
Query flavor for entities with nested relationships that need to be loaded recursively.