Skip to main content

Prepared

Trait Prepared 

Source
pub trait Prepared:
    Any
    + Send
    + Sync
    + Display
    + Debug {
    // Required methods
    fn as_any(self: Box<Self>) -> Box<dyn Any>;
    fn clear_bindings(&mut self) -> Result<&mut Self>
       where Self: Sized;
    fn bind(&mut self, value: impl AsValue) -> Result<&mut Self>
       where Self: Sized;
    fn bind_index(
        &mut self,
        value: impl AsValue,
        index: u64,
    ) -> Result<&mut Self>
       where Self: Sized;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

Parameterized, backend-prepared query handle.

Enables pre-parsing and parameter binding.

§Semantics

  • bind: Append value.
  • bind_index: Set value at 0-based index.

Required Methods§

Source

fn as_any(self: Box<Self>) -> Box<dyn Any>

Source

fn clear_bindings(&mut self) -> Result<&mut Self>
where Self: Sized,

Clear all bindings.

Source

fn bind(&mut self, value: impl AsValue) -> Result<&mut Self>
where Self: Sized,

Bind next value.

Source

fn bind_index(&mut self, value: impl AsValue, index: u64) -> Result<&mut Self>
where Self: Sized,

Bind value at index.

Provided Methods§

Source

fn is_empty(&self) -> bool

True if the query has no meaningful value (the meaning depends on the driver).

Implementors§