Skip to main content

QueryBuilder

Trait QueryBuilder 

Source
pub trait QueryBuilder {
    type Ctx: MigrationContext;

    // Required method
    fn build(
        &self,
        ctx: &mut Self::Ctx,
    ) -> impl Future<Output = TernResult<Query>> + Send;
}
Expand description

A helper trait for Migration.

With the derive macros, the user’s responsibility is to implement this for a Rust migration, and the proc macro uses it to build an implementation of Migration.

Required Associated Types§

Source

type Ctx: MigrationContext

The context for running the migration this query is for.

Required Methods§

Source

fn build( &self, ctx: &mut Self::Ctx, ) -> impl Future<Output = TernResult<Query>> + Send

Asynchronously produce the migration query.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§