pub struct PgPrepared { /* private fields */ }Expand description
A compiled PostgreSQL prepared statement.
Obtain via oxisql_core::Connection::prepare on a crate::PgConnection.
The statement is compiled once by the server and re-used for every subsequent execution, avoiding repeated parse/plan cycles.
Trait Implementations§
Source§impl PreparedStatement for PgPrepared
impl PreparedStatement for PgPrepared
Source§fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
params: &'life1 [&'life2 dyn ToSqlValue],
) -> Pin<Box<dyn Future<Output = Result<u64, OxiSqlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
params: &'life1 [&'life2 dyn ToSqlValue],
) -> Pin<Box<dyn Future<Output = Result<u64, OxiSqlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute the prepared statement (DML/DDL) and return the row count.
Source§fn query<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
params: &'life1 [&'life2 dyn ToSqlValue],
) -> Pin<Box<dyn Future<Output = Result<Vec<Row>, OxiSqlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn query<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
params: &'life1 [&'life2 dyn ToSqlValue],
) -> Pin<Box<dyn Future<Output = Result<Vec<Row>, OxiSqlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute the prepared statement as a SELECT and return all rows.
Auto Trait Implementations§
impl !RefUnwindSafe for PgPrepared
impl !UnwindSafe for PgPrepared
impl Freeze for PgPrepared
impl Send for PgPrepared
impl Sync for PgPrepared
impl Unpin for PgPrepared
impl UnsafeUnpin for PgPrepared
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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