pub trait Query<'conn>: Sized {
type Arguments;
// Required methods
fn execute(
self,
client: &SpiClient<'conn>,
limit: Option<c_long>,
args: Self::Arguments,
) -> SpiResult<SpiTupleTable<'conn>>;
fn try_open_cursor(
self,
client: &SpiClient<'conn>,
args: Self::Arguments,
) -> SpiResult<SpiCursor<'conn>>;
// Provided method
fn open_cursor(
self,
client: &SpiClient<'conn>,
args: Self::Arguments,
) -> SpiCursor<'conn> { ... }
}
Expand description
A generalized interface to what constitutes a query
Its primary purpose is to abstract away differences between one-off statements and prepared statements, but it can potentially be implemented for other types, provided they can be converted into a query.
Required Associated Types§
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.