pub trait QueryRepository {
// Required methods
fn create_history_if_not_exists_query(history_table: &str) -> Query;
fn drop_history_query(history_table: &str) -> Query;
fn insert_into_history_query(
history_table: &str,
applied: &AppliedMigration,
) -> Query;
fn select_star_from_history_query(history_table: &str) -> Query;
fn upsert_history_query(
history_table: &str,
applied: &AppliedMigration,
) -> Query;
}
Expand description
A type that has a library of “administrative” queries that are needed during a migration run.
Required Methods§
Sourcefn create_history_if_not_exists_query(history_table: &str) -> Query
fn create_history_if_not_exists_query(history_table: &str) -> Query
The query that creates the schema history table or does nothing if it already exists.
Sourcefn drop_history_query(history_table: &str) -> Query
fn drop_history_query(history_table: &str) -> Query
The query that drops the history table if requested.
Sourcefn insert_into_history_query(
history_table: &str,
applied: &AppliedMigration,
) -> Query
fn insert_into_history_query( history_table: &str, applied: &AppliedMigration, ) -> Query
The query to update the schema history table with an applied migration.
Sourcefn select_star_from_history_query(history_table: &str) -> Query
fn select_star_from_history_query(history_table: &str) -> Query
The query to return all rows from the schema history table.
Sourcefn upsert_history_query(
history_table: &str,
applied: &AppliedMigration,
) -> Query
fn upsert_history_query( history_table: &str, applied: &AppliedMigration, ) -> Query
Query to insert or update a record in the history table.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.