zino_orm

Type Alias DatabaseConnection

Source
pub type DatabaseConnection = SqliteConnection;
Expand description

SQLite database connection.

Aliased Type§

struct DatabaseConnection { /* private fields */ }

Trait Implementations§

Source§

impl<'c> Executor for &'c mut DatabaseConnection

Available on crate feature orm-sqlx only.
Source§

type Row = SqliteRow

A type for the database row.
Source§

type QueryResult = <Sqlite as Database>::QueryResult

A type for the query result.
Source§

async fn execute(self, sql: &str) -> Result<Self::QueryResult, Error>

Executes the query and return the total number of rows affected.
Source§

async fn execute_with<T: ToString>( self, sql: &str, arguments: &[T], ) -> Result<Self::QueryResult, Error>

Executes the query with arguments and return the total number of rows affected.
Source§

async fn fetch(self, sql: &str) -> Result<Vec<Self::Row>, Error>

Executes the query and return all the generated results.
Source§

async fn fetch_with<T: ToString>( self, sql: &str, arguments: &[T], ) -> Result<Vec<Self::Row>, Error>

Executes the query with arguments and return all the generated results.
Source§

async fn fetch_one(self, sql: &str) -> Result<Self::Row, Error>

Executes the query and returns exactly one row.
Source§

async fn fetch_optional(self, sql: &str) -> Result<Option<Self::Row>, Error>

Executes the query and returns at most one row.
Source§

async fn fetch_optional_with<T: ToString>( self, sql: &str, arguments: &[T], ) -> Result<Option<Self::Row>, Error>

Executes the query with arguments and returns at most one row.