Struct sqlx_migrate::context::MigrationContext
source · pub struct MigrationContext<Db>where
Db: Database,{ /* private fields */ }
Implementations§
Trait Implementations§
source§impl<Db> Debug for MigrationContext<Db>where
Db: Database + Debug,
impl<Db> Debug for MigrationContext<Db>where Db: Database + Debug,
source§impl<'c> Executor<'c> for &'c mut MigrationContext<Postgres>
impl<'c> Executor<'c> for &'c mut MigrationContext<Postgres>
type Database = Postgres
source§fn fetch_many<'e, 'q: 'e, E>(
self,
query: E
) -> BoxStream<'e, Result<Either<<Self::Database as Database>::QueryResult, <Self::Database as Database>::Row>, Error>>where
E: Execute<'q, Self::Database> + 'q,
'c: 'e,
fn fetch_many<'e, 'q: 'e, E>( self, query: E ) -> BoxStream<'e, Result<Either<<Self::Database as Database>::QueryResult, <Self::Database as Database>::Row>, Error>>where E: Execute<'q, Self::Database> + 'q, 'c: 'e,
Execute multiple queries and return the generated results as a stream
from each query, in a stream.
source§fn fetch_optional<'e, 'q: 'e, E>(
self,
query: E
) -> BoxFuture<'e, Result<Option<<Self::Database as Database>::Row>, Error>>where
E: Execute<'q, Self::Database> + 'q,
'c: 'e,
fn fetch_optional<'e, 'q: 'e, E>( self, query: E ) -> BoxFuture<'e, Result<Option<<Self::Database as Database>::Row>, Error>>where E: Execute<'q, Self::Database> + 'q, 'c: 'e,
Execute the query and returns at most one row.
source§fn prepare_with<'e, 'q: 'e>(
self,
sql: &'q str,
parameters: &'e [<Self::Database as Database>::TypeInfo]
) -> BoxFuture<'e, Result<<Self::Database as HasStatement<'q>>::Statement, Error>>where
'c: 'e,
fn prepare_with<'e, 'q: 'e>( self, sql: &'q str, parameters: &'e [<Self::Database as Database>::TypeInfo] ) -> BoxFuture<'e, Result<<Self::Database as HasStatement<'q>>::Statement, Error>>where 'c: 'e,
Prepare the SQL query, with parameter type information, to inspect the
type information about its parameters and results. Read more
source§fn execute<'e, 'q: 'e, E>(
self,
query: E
) -> BoxFuture<'e, Result<<Self::Database as Database>::QueryResult, Error>>where
E: Execute<'q, Self::Database> + 'q,
'c: 'e,
fn execute<'e, 'q: 'e, E>( self, query: E ) -> BoxFuture<'e, Result<<Self::Database as Database>::QueryResult, Error>>where E: Execute<'q, Self::Database> + 'q, 'c: 'e,
Execute the query and return the total number of rows affected.
source§fn execute_many<'e, 'q: 'e, E>(
self,
query: E
) -> BoxStream<'e, Result<<Self::Database as Database>::QueryResult, Error>>where
E: Execute<'q, Self::Database> + 'q,
'c: 'e,
fn execute_many<'e, 'q: 'e, E>( self, query: E ) -> BoxStream<'e, Result<<Self::Database as Database>::QueryResult, Error>>where E: Execute<'q, Self::Database> + 'q, 'c: 'e,
Execute multiple queries and return the rows affected from each query, in a stream.
source§fn fetch<'e, 'q: 'e, E>(
self,
query: E
) -> BoxStream<'e, Result<<Self::Database as Database>::Row, Error>>where
E: Execute<'q, Self::Database> + 'q,
'c: 'e,
fn fetch<'e, 'q: 'e, E>( self, query: E ) -> BoxStream<'e, Result<<Self::Database as Database>::Row, Error>>where E: Execute<'q, Self::Database> + 'q, 'c: 'e,
Execute the query and return the generated results as a stream.
source§fn fetch_all<'e, 'q: 'e, E>(
self,
query: E
) -> BoxFuture<'e, Result<Vec<<Self::Database as Database>::Row>, Error>>where
E: Execute<'q, Self::Database> + 'q,
'c: 'e,
fn fetch_all<'e, 'q: 'e, E>( self, query: E ) -> BoxFuture<'e, Result<Vec<<Self::Database as Database>::Row>, Error>>where E: Execute<'q, Self::Database> + 'q, 'c: 'e,
Execute the query and return all the generated results, collected into a
Vec
.source§impl<'c> Executor<'c> for &'c mut MigrationContext<Sqlite>
impl<'c> Executor<'c> for &'c mut MigrationContext<Sqlite>
type Database = Sqlite
source§fn fetch_many<'e, 'q: 'e, E>(
self,
query: E
) -> BoxStream<'e, Result<Either<<Self::Database as Database>::QueryResult, <Self::Database as Database>::Row>, Error>>where
E: Execute<'q, Self::Database> + 'q,
'c: 'e,
fn fetch_many<'e, 'q: 'e, E>( self, query: E ) -> BoxStream<'e, Result<Either<<Self::Database as Database>::QueryResult, <Self::Database as Database>::Row>, Error>>where E: Execute<'q, Self::Database> + 'q, 'c: 'e,
Execute multiple queries and return the generated results as a stream
from each query, in a stream.
source§fn fetch_optional<'e, 'q: 'e, E>(
self,
query: E
) -> BoxFuture<'e, Result<Option<<Self::Database as Database>::Row>, Error>>where
E: Execute<'q, Self::Database> + 'q,
'c: 'e,
fn fetch_optional<'e, 'q: 'e, E>( self, query: E ) -> BoxFuture<'e, Result<Option<<Self::Database as Database>::Row>, Error>>where E: Execute<'q, Self::Database> + 'q, 'c: 'e,
Execute the query and returns at most one row.
source§fn prepare_with<'e, 'q: 'e>(
self,
sql: &'q str,
parameters: &'e [<Self::Database as Database>::TypeInfo]
) -> BoxFuture<'e, Result<<Self::Database as HasStatement<'q>>::Statement, Error>>where
'c: 'e,
fn prepare_with<'e, 'q: 'e>( self, sql: &'q str, parameters: &'e [<Self::Database as Database>::TypeInfo] ) -> BoxFuture<'e, Result<<Self::Database as HasStatement<'q>>::Statement, Error>>where 'c: 'e,
Prepare the SQL query, with parameter type information, to inspect the
type information about its parameters and results. Read more
source§fn execute<'e, 'q: 'e, E>(
self,
query: E
) -> BoxFuture<'e, Result<<Self::Database as Database>::QueryResult, Error>>where
E: Execute<'q, Self::Database> + 'q,
'c: 'e,
fn execute<'e, 'q: 'e, E>( self, query: E ) -> BoxFuture<'e, Result<<Self::Database as Database>::QueryResult, Error>>where E: Execute<'q, Self::Database> + 'q, 'c: 'e,
Execute the query and return the total number of rows affected.
source§fn execute_many<'e, 'q: 'e, E>(
self,
query: E
) -> BoxStream<'e, Result<<Self::Database as Database>::QueryResult, Error>>where
E: Execute<'q, Self::Database> + 'q,
'c: 'e,
fn execute_many<'e, 'q: 'e, E>( self, query: E ) -> BoxStream<'e, Result<<Self::Database as Database>::QueryResult, Error>>where E: Execute<'q, Self::Database> + 'q, 'c: 'e,
Execute multiple queries and return the rows affected from each query, in a stream.
source§fn fetch<'e, 'q: 'e, E>(
self,
query: E
) -> BoxStream<'e, Result<<Self::Database as Database>::Row, Error>>where
E: Execute<'q, Self::Database> + 'q,
'c: 'e,
fn fetch<'e, 'q: 'e, E>( self, query: E ) -> BoxStream<'e, Result<<Self::Database as Database>::Row, Error>>where E: Execute<'q, Self::Database> + 'q, 'c: 'e,
Execute the query and return the generated results as a stream.
source§fn fetch_all<'e, 'q: 'e, E>(
self,
query: E
) -> BoxFuture<'e, Result<Vec<<Self::Database as Database>::Row>, Error>>where
E: Execute<'q, Self::Database> + 'q,
'c: 'e,
fn fetch_all<'e, 'q: 'e, E>( self, query: E ) -> BoxFuture<'e, Result<Vec<<Self::Database as Database>::Row>, Error>>where E: Execute<'q, Self::Database> + 'q, 'c: 'e,
Execute the query and return all the generated results, collected into a
Vec
.Auto Trait Implementations§
impl<Db> !RefUnwindSafe for MigrationContext<Db>
impl<Db> Send for MigrationContext<Db>
impl<Db> Sync for MigrationContext<Db>where <Db as Database>::Connection: Sync,
impl<Db> Unpin for MigrationContext<Db>where <Db as Database>::Connection: Unpin,
impl<Db> !UnwindSafe for MigrationContext<Db>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more