odbc_api::parameter

Struct BlobParam

Source
pub struct BlobParam<'a> { /* private fields */ }
Expand description

Parameter type which can be used to bind a self::Blob as parameter to a statement in order for its contents to be streamed to the database at statement execution time.

Implementations§

Source§

impl<'a> BlobParam<'a>

Source

pub fn new(blob: &'a mut impl Blob) -> Self

Trait Implementations§

Source§

impl DelayedInput for BlobParam<'_>

Source§

fn cdata_type(&self) -> CDataType

Then streaming data to the “data source” the driver converts the data from this type.
Source§

fn indicator_ptr(&self) -> *const isize

Either odbc_sys::DATA_AT_EXEC in case of streaming from a stream of unknown length (e.g. stdin) or the result of odbc_sys::len_data_at_exec if the length of the stream is known in advance (e.g. a File).
Source§

fn stream_ptr(&mut self) -> *mut c_void

Pointer to reference of crate::parameter::Blob the stream or an application defined value identifying the stream.
Source§

impl HasDataType for BlobParam<'_>

Source§

fn data_type(&self) -> DataType

The SQL data as which the parameter is bound to ODBC.
Source§

impl ParameterCollection for BlobParam<'_>

Source§

fn parameter_set_size(&self) -> usize

Number of values per parameter in the collection. This can be different from the maximum batch size a buffer may be able to hold. Returning 0 will cause the the query not to be executed.
Source§

unsafe fn bind_parameters_to( &mut self, stmt: &mut impl Statement, ) -> Result<(), Error>

Bind the parameters to a statement Read more
Source§

impl ParameterTupleElement for &mut BlobParam<'_>

Source§

unsafe fn bind_to( &mut self, parameter_number: u16, stmt: &mut impl Statement, ) -> Result<(), Error>

Bind the parameter in question to a specific parameter_number. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for BlobParam<'a>

§

impl<'a> !RefUnwindSafe for BlobParam<'a>

§

impl<'a> !Send for BlobParam<'a>

§

impl<'a> !Sync for BlobParam<'a>

§

impl<'a> Unpin for BlobParam<'a>

§

impl<'a> !UnwindSafe for BlobParam<'a>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.