pub trait ConnectionPragma: Pragma<Scope = PerConnection> {
// Provided methods
fn get<Row>(conn: &mut SqliteConnection) -> QueryResult<Row>
where Self: ReadPragma,
Sqlite: QueryMetadata<Self::SqlType>,
Row: FromSqlRow<Self::SqlType, Sqlite> { ... }
fn get_all<Row>(conn: &mut SqliteConnection) -> QueryResult<Vec<Row>>
where Self: ReadPragma,
Sqlite: QueryMetadata<Self::SqlType>,
Row: FromSqlRow<Self::SqlType, Sqlite> { ... }
fn set<'a>(
argument: impl Into<Self::Argument<'a>>,
conn: &mut SqliteConnection,
) -> QueryResult<()>
where Self: WritePragma { ... }
}Available on crate feature
__sqlite-shared only.Expand description
Reads and writes a PerConnection pragma.
Provided Methods§
Sourcefn get<Row>(conn: &mut SqliteConnection) -> QueryResult<Row>where
Self: ReadPragma,
Sqlite: QueryMetadata<Self::SqlType>,
Row: FromSqlRow<Self::SqlType, Sqlite>,
fn get<Row>(conn: &mut SqliteConnection) -> QueryResult<Row>where
Self: ReadPragma,
Sqlite: QueryMetadata<Self::SqlType>,
Row: FromSqlRow<Self::SqlType, Sqlite>,
Read the first row, returning Error::NotFound if the pragma returns none.
Sourcefn get_all<Row>(conn: &mut SqliteConnection) -> QueryResult<Vec<Row>>where
Self: ReadPragma,
Sqlite: QueryMetadata<Self::SqlType>,
Row: FromSqlRow<Self::SqlType, Sqlite>,
fn get_all<Row>(conn: &mut SqliteConnection) -> QueryResult<Vec<Row>>where
Self: ReadPragma,
Sqlite: QueryMetadata<Self::SqlType>,
Row: FromSqlRow<Self::SqlType, Sqlite>,
Read every row.
Sourcefn set<'a>(
argument: impl Into<Self::Argument<'a>>,
conn: &mut SqliteConnection,
) -> QueryResult<()>where
Self: WritePragma,
fn set<'a>(
argument: impl Into<Self::Argument<'a>>,
conn: &mut SqliteConnection,
) -> QueryResult<()>where
Self: WritePragma,
Assign argument, running the statement to completion without confirming the value SQLite applied.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".