UnsafeSQLHDESC

Struct UnsafeSQLHDESC 

Source
pub struct UnsafeSQLHDESC<'conn, T, V: OdbcVersion = SQL_OV_ODBC3_80> { /* private fields */ }
Expand description

SQLHDESC which allows for the use of ODBC API whose safety cannot be determined by the type system (e.g. SQL_DESC_BIND_OFFSET_PTR)

Trait Implementations§

Source§

impl<'env, 'conn, 'buf, V: OdbcVersion> Allocate<'conn, SQLHDBC<'env, C4, V>> for UnsafeSQLHDESC<'conn, AppDesc<'buf>, V>

Source§

unsafe fn from_raw(handle: NonNull<RawHandle>) -> Self

Creates handle from a raw pointer Read more
Source§

fn SQLAllocHandle(InputHandle: &'src SRC) -> (Result<Self, ()>, SQLRETURN)

Allocates an environment, connection, statement, or descriptor handle. Read more
Source§

fn SQLFreeHandle(self)

Frees resources associated with a specific environment, connection, statement, or descriptor handle. Read more
Source§

impl<V: OdbcVersion, T> AsSQLHANDLE for UnsafeSQLHDESC<'_, T, V>

Source§

impl<'conn, T: Debug, V: Debug + OdbcVersion> Debug for UnsafeSQLHDESC<'conn, T, V>

Source§

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

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

impl<'conn, 'buf, DT: DescType<'buf>, A: Ident, T> DescField<'buf, UnsafeSQLHDESC<'conn, DT>, DT, A, SQL_OV_ODBC3_80> for T

Source§

fn update_handle(&self, _: &D)
where Self: AttrSet<A>,

Source§

impl<'conn, 'buf, DT: DescType<'buf>, A: Ident, T> DescField<'buf, UnsafeSQLHDESC<'conn, DT, SQL_OV_ODBC4>, DT, A, SQL_OV_ODBC4> for T

Source§

fn update_handle(&self, _: &D)
where Self: AttrSet<A>,

Source§

impl<'conn, 'buf, DT: DescType<'buf>, V: OdbcVersion> Descriptor<'buf, DT, V> for UnsafeSQLHDESC<'conn, DT, V>

Source§

fn SQLCopyDesc<DT2: DescType<'buf>>( &self, TargetDescHandle: &SQLHDESC<'_, DT2, V>, ) -> SQLRETURN

Copies descriptor information from one descriptor handle to another. Read more
Source§

fn SQLGetDescFieldA<A: Ident<Type = SQLSMALLINT>, T>( &self, RecNumber: SQLSMALLINT, FieldIdentifier: A, ValuePtr: Option<&mut T>, StringLengthPtr: Option<&mut MaybeUninit<T::StrLen>>, ) -> SQLRETURN
where T: AttrGet<A> + Ansi + ?Sized + DescField<'buf, Self, DT, A, V>, MaybeUninit<T::StrLen>: StrLen<SQLINTEGER>,

Returns the current setting or value of a single field of a descriptor record. Read more
Source§

fn SQLGetDescFieldW<A: Ident<Type = SQLSMALLINT>, T>( &self, RecNumber: SQLSMALLINT, FieldIdentifier: A, ValuePtr: Option<&mut T>, StringLengthPtr: Option<&mut MaybeUninit<T::StrLen>>, ) -> SQLRETURN
where T: AttrGet<A> + Unicode + ?Sized + DescField<'buf, Self, DT, A, V>, MaybeUninit<T::StrLen>: StrLen<SQLINTEGER>,

Returns the current setting or value of a single field of a descriptor record. Read more
Source§

fn SQLGetDescRecA<ST: SqlType<V>>( &self, RecNumber: SQLSMALLINT, Name: Option<&mut OdbcStr<MaybeUninit<SQLCHAR>>>, StringLengthPtr: &mut impl AsMutPtr<SQLSMALLINT>, TypePtr: &mut impl AsMutPtr<ST>, SubTypePtr: &mut impl AsMutPtr<DatetimeIntervalCode>, LengthPtr: &mut impl AsMutPtr<SQLLEN>, PrecisionPtr: &mut impl AsMutPtr<SQLSMALLINT>, ScalePtr: &mut impl AsMutPtr<SQLSMALLINT>, NullablePtr: &mut impl AsMutPtr<NullAllowed>, ) -> SQLRETURN

Returns the current settings or values of multiple fields of a descriptor record. The fields returned describe the name, data type, and storage of column or parameter data. Read more
Source§

fn SQLGetDescRecW<ST: SqlType<V>>( &self, RecNumber: SQLSMALLINT, Name: Option<&mut OdbcStr<MaybeUninit<SQLWCHAR>>>, StringLengthPtr: &mut impl AsMutPtr<SQLSMALLINT>, TypePtr: &mut impl AsMutPtr<ST>, SubTypePtr: &mut impl AsMutPtr<DatetimeIntervalCode>, LengthPtr: &mut impl AsMutPtr<SQLLEN>, PrecisionPtr: &mut impl AsMutPtr<SQLSMALLINT>, ScalePtr: &mut impl AsMutPtr<SQLSMALLINT>, NullablePtr: &mut impl AsMutPtr<NullAllowed>, ) -> SQLRETURN

Returns the current settings or values of multiple fields of a descriptor record. The fields returned describe the name, data type, and storage of column or parameter data. Read more
Source§

fn SQLSetDescFieldA<A: Ident<Type = SQLSMALLINT>, T>( &self, RecNumber: SQLSMALLINT, FieldIdentifier: A, ValuePtr: Option<T>, ) -> SQLRETURN
where T: AttrSet<A> + Ansi + DescField<'buf, Self, DT, A, V>,

Sets the value of a single field of a descriptor record. Read more
Source§

fn SQLSetDescFieldW<A: Ident<Type = SQLSMALLINT>, T>( &self, RecNumber: SQLSMALLINT, FieldIdentifier: A, ValuePtr: Option<T>, ) -> SQLRETURN
where T: AttrSet<A> + Unicode + DescField<'buf, Self, DT, A, V>,

Sets the value of a single field of a descriptor record. Read more
Source§

fn SQLSetDescRec<ST: SqlType<V>, PTR>( &self, RecNumber: SQLSMALLINT, Type: ST, SubType: Option<DatetimeIntervalCode>, Length: SQLLEN, Precision: SQLSMALLINT, Scale: SQLSMALLINT, DataPtr: Option<&'buf PTR>, StringLengthPtr: &'buf mut impl AsMutPtr<SQLLEN>, IndicatorPtr: &'buf mut impl AsMutPtr<SQLLEN>, ) -> SQLRETURN

Sets multiple descriptor fields that affect the data type and buffer bound to a column or parameter data. Read more
Source§

impl<DT, V: OdbcVersion> Diagnostics for UnsafeSQLHDESC<'_, DT, V>

Source§

fn SQLGetDiagFieldA<A: Ident<Type = SQLSMALLINT>, T>( &self, RecNumber: NonZeroI16, DiagIdentifier: A, DiagInfoPtr: Option<&mut T>, StringLengthPtr: Option<&mut MaybeUninit<T::StrLen>>, ) -> SQLRETURN
where T: AttrGet<A> + Ansi + ?Sized + DiagField<Self, A>, MaybeUninit<T::StrLen>: StrLen<SQLSMALLINT>,

Returns the current value of a field of a record of the diagnostic data structure (associated with a specified handle) that contains error, warning, and status information. Read more
Source§

fn SQLGetDiagFieldW<A: Ident<Type = SQLSMALLINT>, T>( &self, RecNumber: NonZeroI16, DiagIdentifier: A, DiagInfoPtr: Option<&mut T>, StringLengthPtr: Option<&mut MaybeUninit<T::StrLen>>, ) -> SQLRETURN
where T: AttrGet<A> + Unicode + ?Sized + DiagField<Self, A>, MaybeUninit<T::StrLen>: StrLen<SQLSMALLINT>,

Returns the current value of a field of a record of the diagnostic data structure (associated with a specified handle) that contains error, warning, and status information. Read more
Source§

fn SQLGetDiagRecA( &self, RecNumber: NonZeroI16, SQLState: &mut MaybeUninit<SQLSTATE<SQLCHAR>>, NativeErrorPtr: &mut impl AsMutPtr<SQLINTEGER>, MessageText: &mut OdbcStr<MaybeUninit<SQLCHAR>>, TextLengthPtr: &mut impl AsMutPtr<SQLSMALLINT>, ) -> SQLRETURN

Returns the current values of multiple fields of a diagnostic record that contains error, warning, and status information. Unlike SQLGetDiagField, which returns one diagnostic field per call, SQLGetDiagRec returns several commonly used fields of a diagnostic record, including the SQLSTATE, the native error code, and the diagnostic message text. Read more
Source§

fn SQLGetDiagRecW( &self, RecNumber: NonZeroI16, SQLState: &mut MaybeUninit<SQLSTATE<SQLWCHAR>>, NativeErrorPtr: &mut impl AsMutPtr<SQLINTEGER>, MessageText: &mut OdbcStr<MaybeUninit<SQLWCHAR>>, TextLengthPtr: &mut impl AsMutPtr<SQLSMALLINT>, ) -> SQLRETURN

Returns the current values of multiple fields of a diagnostic record that contains error, warning, and status information. Unlike SQLGetDiagField, which returns one diagnostic field per call, SQLGetDiagRec returns several commonly used fields of a diagnostic record, including the SQLSTATE, the native error code, and the diagnostic message text. Read more
Source§

impl<V: OdbcVersion, DT> Drop for UnsafeSQLHDESC<'_, DT, V>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<V: OdbcVersion, T> Handle for UnsafeSQLHDESC<'_, T, V>

Source§

impl<'conn, 'buf, DT: DescType<'buf>, A: Ident, T: Scalar> DescField<'buf, UnsafeSQLHDESC<'conn, DT>, DT, A, SQL_OV_ODBC3_80> for [T]

Source§

impl<'conn, 'buf, DT: DescType<'buf>, A: Ident, CH: OdbcChar> DescField<'buf, UnsafeSQLHDESC<'conn, DT>, DT, A, SQL_OV_ODBC3_80> for OdbcStr<CH>

Source§

impl<'conn, 'buf, DT: DescType<'buf>, A: Ident, T: Scalar> DescField<'buf, UnsafeSQLHDESC<'conn, DT, SQL_OV_ODBC4>, DT, A, SQL_OV_ODBC4> for [T]

Source§

impl<'conn, 'buf, DT: DescType<'buf>, A: Ident, CH: OdbcChar> DescField<'buf, UnsafeSQLHDESC<'conn, DT, SQL_OV_ODBC4>, DT, A, SQL_OV_ODBC4> for OdbcStr<CH>

Source§

impl<DT, V: OdbcVersion> Send for UnsafeSQLHDESC<'_, DT, V>

Auto Trait Implementations§

§

impl<'conn, T, V> Freeze for UnsafeSQLHDESC<'conn, T, V>

§

impl<'conn, T, V> RefUnwindSafe for UnsafeSQLHDESC<'conn, T, V>

§

impl<'conn, T, V = SQL_OV_ODBC3_80> !Sync for UnsafeSQLHDESC<'conn, T, V>

§

impl<'conn, T, V> Unpin for UnsafeSQLHDESC<'conn, T, V>
where V: Unpin, T: Unpin,

§

impl<'conn, T, V> UnwindSafe for UnsafeSQLHDESC<'conn, T, V>
where V: UnwindSafe, T: UnwindSafe,

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.