pub struct PreparedStatementHandle { /* private fields */ }

Implementations§

source§

impl PreparedStatementHandle

Safety

  • All parameter indices must be in range
source

pub unsafe fn from_raw( raw: duckdb_prepared_statement, parent: Arc<ConnectionHandle> ) -> Arc<Self>

Safety

Takes ownership

source

pub unsafe fn destroy(&mut self)

Safety

Does not consider utilization. Normally, let Rust handle this automatically.

source

pub fn nparams(&self) -> u64

source

pub unsafe fn param_type(&self, param_idx: u64) -> TypeId

Safety
  • param_idx must be in range
source

pub fn clear_bindings(&self) -> Result<(), ()>

source

pub unsafe fn bind_bool(&self, param_idx: u64, val: bool) -> Result<(), ()>

source

pub unsafe fn bind_i8(&self, param_idx: u64, val: i8) -> Result<(), ()>

source

pub unsafe fn bind_i16(&self, param_idx: u64, val: i16) -> Result<(), ()>

source

pub unsafe fn bind_i32(&self, param_idx: u64, val: i32) -> Result<(), ()>

source

pub unsafe fn bind_i64(&self, param_idx: u64, val: i64) -> Result<(), ()>

source

pub unsafe fn bind_i128(&self, param_idx: u64, val: i128) -> Result<(), ()>

source

pub unsafe fn bind_decimal( &self, param_idx: u64, val: DuckDbDecimal ) -> Result<(), ()>

source

pub unsafe fn bind_u8(&self, param_idx: u64, val: u8) -> Result<(), ()>

source

pub unsafe fn bind_u16(&self, param_idx: u64, val: u16) -> Result<(), ()>

source

pub unsafe fn bind_u32(&self, param_idx: u64, val: u32) -> Result<(), ()>

source

pub unsafe fn bind_u64(&self, param_idx: u64, val: u64) -> Result<(), ()>

source

pub unsafe fn bind_f32(&self, param_idx: u64, val: f32) -> Result<(), ()>

source

pub unsafe fn bind_f64(&self, param_idx: u64, val: f64) -> Result<(), ()>

source

pub unsafe fn bind_date(&self, param_idx: u64, val: Date) -> Result<(), ()>

source

pub unsafe fn bind_time(&self, param_idx: u64, val: Time) -> Result<(), ()>

source

pub unsafe fn bind_timestamp( &self, param_idx: u64, val: PrimitiveDateTime ) -> Result<(), ()>

source

pub unsafe fn bind_interval( &self, param_idx: u64, val: Duration ) -> Result<(), ()>

source

pub unsafe fn bind_varchar(&self, param_idx: u64, val: &CStr) -> Result<(), ()>

source

pub unsafe fn bind_varchar_str( &self, param_idx: u64, val: &str ) -> Result<(), ()>

source

pub unsafe fn bind_blob(&self, param_idx: u64, data: &[u8]) -> Result<(), ()>

source

pub unsafe fn bind_null(&self, param_idx: u64) -> Result<(), ()>

source

pub fn execute(self: &Arc<Self>) -> Result<ArrowResultHandle, String>

Trait Implementations§

source§

impl Debug for PreparedStatementHandle

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Deref for PreparedStatementHandle

§

type Target = *mut _duckdb_prepared_statement

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl Drop for PreparedStatementHandle

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.