Trait diesel::query_dsl::methods::ExecuteDsl
source · pub trait ExecuteDsl<Conn: Connection<Backend = DB>, DB: Backend = <Conn as Connection>::Backend>: Sized {
// Required method
fn execute(query: Self, conn: &mut Conn) -> QueryResult<usize>;
}
Expand description
The execute
method
This trait should not be relied on directly by most apps. Its behavior is
provided by RunQueryDsl
. However, you may need a where clause on this trait
to call execute
from generic code.
Required Methods§
sourcefn execute(query: Self, conn: &mut Conn) -> QueryResult<usize>
fn execute(query: Self, conn: &mut Conn) -> QueryResult<usize>
Execute this command
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl<V, T, QId, C, Op, const STATIC_QUERY_ID: bool> ExecuteDsl<C, Sqlite> for (No, InsertStatement<T, BatchInsert<V, T, QId, STATIC_QUERY_ID>, Op>)where
C: Connection<Backend = Sqlite>,
T: Table + QueryId + 'static,
T::FromClause: QueryFragment<Sqlite>,
Op: QueryFragment<Sqlite> + QueryId,
SqliteBatchInsertWrapper<V, T, QId, STATIC_QUERY_ID>: QueryFragment<Sqlite> + QueryId + CanInsertInSingleQuery<Sqlite>,
Available on crate feature sqlite
only.
impl<V, T, QId, C, Op, const STATIC_QUERY_ID: bool> ExecuteDsl<C, Sqlite> for (No, InsertStatement<T, BatchInsert<V, T, QId, STATIC_QUERY_ID>, Op>)where
C: Connection<Backend = Sqlite>,
T: Table + QueryId + 'static,
T::FromClause: QueryFragment<Sqlite>,
Op: QueryFragment<Sqlite> + QueryId,
SqliteBatchInsertWrapper<V, T, QId, STATIC_QUERY_ID>: QueryFragment<Sqlite> + QueryId + CanInsertInSingleQuery<Sqlite>,
Available on crate feature
sqlite
only.source§impl<V, T, QId, C, Op, const STATIC_QUERY_ID: bool> ExecuteDsl<C, Sqlite> for (Yes, InsertStatement<T, BatchInsert<Vec<ValuesClause<V, T>>, T, QId, STATIC_QUERY_ID>, Op>)where
C: Connection<Backend = Sqlite>,
T: Table + Copy + QueryId + 'static,
T::FromClause: QueryFragment<Sqlite>,
Op: Copy + QueryId + QueryFragment<Sqlite>,
V: InsertValues<Sqlite, T> + CanInsertInSingleQuery<Sqlite> + QueryId,
Available on crate feature sqlite
only.
impl<V, T, QId, C, Op, const STATIC_QUERY_ID: bool> ExecuteDsl<C, Sqlite> for (Yes, InsertStatement<T, BatchInsert<Vec<ValuesClause<V, T>>, T, QId, STATIC_QUERY_ID>, Op>)where
C: Connection<Backend = Sqlite>,
T: Table + Copy + QueryId + 'static,
T::FromClause: QueryFragment<Sqlite>,
Op: Copy + QueryId + QueryFragment<Sqlite>,
V: InsertValues<Sqlite, T> + CanInsertInSingleQuery<Sqlite> + QueryId,
Available on crate feature
sqlite
only.Implementors§
impl<Conn, DB, T> ExecuteDsl<Conn, DB> for T
impl<V, T, QId, C, Op, O, const STATIC_QUERY_ID: bool> ExecuteDsl<C, Sqlite> for InsertStatement<T, BatchInsert<Vec<ValuesClause<V, T>>, T, QId, STATIC_QUERY_ID>, Op>where
T: QuerySource,
C: Connection<Backend = Sqlite>,
V: ContainsDefaultableValue<Out = O>,
O: Default,
(O, Self): ExecuteDsl<C, Sqlite>,
Available on crate feature
sqlite
only.