pub struct PostgresViewRepository<V, A> { /* private fields */ }
Expand description

A postgres backed query repository for use in backing a GenericQuery.

Implementations

Creates a new PostgresViewRepository that will store serialized views in a Postgres table named identically to the view_name value provided. This table should be created by the user before using this query repository (see /db/init.sql sql initialization file).

use sqlx::{Pool, Postgres};
use postgres_es::PostgresViewRepository;

fn configure_view_repo(pool: Pool<Postgres>) -> PostgresViewRepository<MyView,MyAggregate> {
    PostgresViewRepository::new("my_view_table", pool)
}

Trait Implementations

Returns the current view instance.

Returns the current view instance and context, used by the GenericQuery to update views with committed events. Read more

Updates the view instance and context, used by the GenericQuery to update views with committed events. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.