Skip to main content

apply_projection

Function apply_projection 

pub async fn apply_projection<'e, E>(
    executor: E,
) -> Result<(), PostgresProjectionStoreError>
where E: PgExecutor<'e>,
Available on crate feature projection-store and (crate features event-store or projection-store) only.
Expand description

Applies MIGRATION_2 to whatever schema executor resolves against.

Separate from apply rather than folded into it, and the separation is the point: an application using only the event store gets no projection_checkpoint table, and one using only the projection store gets no event log. A single apply would decide for both.

It does not set search_path, for the reason apply does not.

§Errors

Driver if the server rejects the statements — most plausibly because the role cannot create objects in the target schema.