pub struct SQLHDESC<'conn, DT, V: OdbcVersion = SQL_OV_ODBC3_80>(/* private fields */);Expand description
A descriptor is a collection of metadata that describes the parameters of an SQL statement or the columns of a result set. Thus, a descriptor can fill four roles:
- (APD)Application Parameter Descriptor: Contains information about the application buffers bound to the parameters in an SQL statement, such as their addresses, lengths, and C data types.
- (IPD)Implementation Parameter Descriptor: Contains information about the parameters in an SQL statement, such as their SQL data types, lengths, and nullability.
- (ARD)Application Row Descriptor: Contains information about the application buffers bound to the columns in a result set, such as their addresses, lengths, and C data types.
- (IRD)Implementation Row Descriptor: Contains information about the columns in a result set, such as their SQL data types, lengths, and nullability.
Four descriptors are allocated automatically when a statement is allocated, but applications can also allocate descriptors with SQLAllocHandle. They are allocated on a connection and can be associated with one or more statements on that connection to fulfill the role of an APD or ARD on those statements.
§Documentation
https://docs.microsoft.com/en-us/sql/odbc/reference/develop-app/descriptor-handles
Trait Implementations§
Source§impl<'env, 'conn, 'buf, V: OdbcVersion> Allocate<'conn, SQLHDBC<'env, C4, V>> for SQLHDESC<'conn, AppDesc<'buf>, V>
impl<'env, 'conn, 'buf, V: OdbcVersion> Allocate<'conn, SQLHDBC<'env, C4, V>> for SQLHDESC<'conn, AppDesc<'buf>, V>
Source§unsafe fn from_raw(handle: NonNull<RawHandle>) -> Self
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)
fn SQLAllocHandle(InputHandle: &'src SRC) -> (Result<Self, ()>, SQLRETURN)
Allocates an environment, connection, statement, or descriptor handle. Read more
Source§fn SQLFreeHandle(self)
fn SQLFreeHandle(self)
Frees resources associated with a specific environment, connection, statement, or descriptor handle. Read more
Source§impl<V: OdbcVersion, T> AsSQLHANDLE for SQLHDESC<'_, T, V>
impl<V: OdbcVersion, T> AsSQLHANDLE for SQLHDESC<'_, T, V>
fn as_SQLHANDLE(&self) -> SQLHANDLE
Source§impl<'conn, 'buf, DT: DescType<'buf>, A: Ident, T> DescField<'buf, SQLHDESC<'conn, DT>, DT, A, SQL_OV_ODBC3_80> for Twhere
T: DescField<'buf, SQLHDESC<'conn, DT, <SQL_OV_ODBC3_80 as OdbcVersion>::PrevVersion>, DT, A, <SQL_OV_ODBC3_80 as OdbcVersion>::PrevVersion> + Scalar,
impl<'conn, 'buf, DT: DescType<'buf>, A: Ident, T> DescField<'buf, SQLHDESC<'conn, DT>, DT, A, SQL_OV_ODBC3_80> for Twhere
T: DescField<'buf, SQLHDESC<'conn, DT, <SQL_OV_ODBC3_80 as OdbcVersion>::PrevVersion>, DT, A, <SQL_OV_ODBC3_80 as OdbcVersion>::PrevVersion> + Scalar,
fn update_handle(&self, _: &D)where
Self: AttrSet<A>,
Source§impl<'conn, 'buf, DT: DescType<'buf>, A: Ident, T> DescField<'buf, SQLHDESC<'conn, DT, SQL_OV_ODBC4>, DT, A, SQL_OV_ODBC4> for Twhere
T: DescField<'buf, SQLHDESC<'conn, DT, <SQL_OV_ODBC4 as OdbcVersion>::PrevVersion>, DT, A, <SQL_OV_ODBC4 as OdbcVersion>::PrevVersion> + Scalar,
impl<'conn, 'buf, DT: DescType<'buf>, A: Ident, T> DescField<'buf, SQLHDESC<'conn, DT, SQL_OV_ODBC4>, DT, A, SQL_OV_ODBC4> for Twhere
T: DescField<'buf, SQLHDESC<'conn, DT, <SQL_OV_ODBC4 as OdbcVersion>::PrevVersion>, DT, A, <SQL_OV_ODBC4 as OdbcVersion>::PrevVersion> + Scalar,
fn update_handle(&self, _: &D)where
Self: AttrSet<A>,
Source§impl<'conn, 'buf, DT: DescType<'buf>, V: OdbcVersion> Descriptor<'buf, DT, V> for SQLHDESC<'conn, DT, V>
impl<'conn, 'buf, DT: DescType<'buf>, V: OdbcVersion> Descriptor<'buf, DT, V> for SQLHDESC<'conn, DT, V>
Source§fn SQLCopyDesc<DT2: DescType<'buf>>(
&self,
TargetDescHandle: &SQLHDESC<'_, DT2, V>,
) -> SQLRETURN
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>>,
) -> SQLRETURNwhere
T: AttrGet<A> + Ansi + ?Sized + DescField<'buf, Self, DT, A, V>,
MaybeUninit<T::StrLen>: StrLen<SQLINTEGER>,
fn SQLGetDescFieldA<A: Ident<Type = SQLSMALLINT>, T>(
&self,
RecNumber: SQLSMALLINT,
FieldIdentifier: A,
ValuePtr: Option<&mut T>,
StringLengthPtr: Option<&mut MaybeUninit<T::StrLen>>,
) -> SQLRETURNwhere
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>>,
) -> SQLRETURNwhere
T: AttrGet<A> + Unicode + ?Sized + DescField<'buf, Self, DT, A, V>,
MaybeUninit<T::StrLen>: StrLen<SQLINTEGER>,
fn SQLGetDescFieldW<A: Ident<Type = SQLSMALLINT>, T>(
&self,
RecNumber: SQLSMALLINT,
FieldIdentifier: A,
ValuePtr: Option<&mut T>,
StringLengthPtr: Option<&mut MaybeUninit<T::StrLen>>,
) -> SQLRETURNwhere
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
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
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
fn SQLSetDescFieldA<A: Ident<Type = SQLSMALLINT>, T>( &self, RecNumber: SQLSMALLINT, FieldIdentifier: A, ValuePtr: Option<T>, ) -> SQLRETURN
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
fn SQLSetDescFieldW<A: Ident<Type = SQLSMALLINT>, T>( &self, RecNumber: SQLSMALLINT, FieldIdentifier: A, ValuePtr: Option<T>, ) -> SQLRETURN
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>,
) -> SQLRETURNwhere
&'buf PTR: IntoSQLPOINTER,
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>,
) -> SQLRETURNwhere
&'buf PTR: IntoSQLPOINTER,
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 SQLHDESC<'_, DT, V>
impl<DT, V: OdbcVersion> Diagnostics for SQLHDESC<'_, 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>>,
) -> SQLRETURNwhere
T: AttrGet<A> + Ansi + ?Sized + DiagField<Self, A>,
MaybeUninit<T::StrLen>: StrLen<SQLSMALLINT>,
fn SQLGetDiagFieldA<A: Ident<Type = SQLSMALLINT>, T>(
&self,
RecNumber: NonZeroI16,
DiagIdentifier: A,
DiagInfoPtr: Option<&mut T>,
StringLengthPtr: Option<&mut MaybeUninit<T::StrLen>>,
) -> SQLRETURNwhere
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>>,
) -> SQLRETURNwhere
T: AttrGet<A> + Unicode + ?Sized + DiagField<Self, A>,
MaybeUninit<T::StrLen>: StrLen<SQLSMALLINT>,
fn SQLGetDiagFieldW<A: Ident<Type = SQLSMALLINT>, T>(
&self,
RecNumber: NonZeroI16,
DiagIdentifier: A,
DiagInfoPtr: Option<&mut T>,
StringLengthPtr: Option<&mut MaybeUninit<T::StrLen>>,
) -> SQLRETURNwhere
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
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
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<DT, V: OdbcVersion> Handle for SQLHDESC<'_, DT, V>
impl<DT, V: OdbcVersion> Handle for SQLHDESC<'_, DT, V>
type Ident = SQL_HANDLE_DESC
impl<'conn, 'buf, DT: DescType<'buf>, A: Ident, T: Scalar> DescField<'buf, SQLHDESC<'conn, DT>, DT, A, SQL_OV_ODBC3_80> for [T]where
[T]: DescField<'buf, SQLHDESC<'conn, DT, <SQL_OV_ODBC3_80 as OdbcVersion>::PrevVersion>, DT, A, <SQL_OV_ODBC3_80 as OdbcVersion>::PrevVersion>,
impl<'conn, 'buf, DT: DescType<'buf>, A: Ident, CH: OdbcChar> DescField<'buf, SQLHDESC<'conn, DT>, DT, A, SQL_OV_ODBC3_80> for OdbcStr<CH>where
OdbcStr<CH>: DescField<'buf, SQLHDESC<'conn, DT, <SQL_OV_ODBC3_80 as OdbcVersion>::PrevVersion>, DT, A, <SQL_OV_ODBC3_80 as OdbcVersion>::PrevVersion>,
impl<'conn, 'buf, DT: DescType<'buf>, A: Ident, T: Scalar> DescField<'buf, SQLHDESC<'conn, DT, SQL_OV_ODBC4>, DT, A, SQL_OV_ODBC4> for [T]where
[T]: DescField<'buf, SQLHDESC<'conn, DT, <SQL_OV_ODBC4 as OdbcVersion>::PrevVersion>, DT, A, <SQL_OV_ODBC4 as OdbcVersion>::PrevVersion>,
impl<'conn, 'buf, DT: DescType<'buf>, A: Ident, CH: OdbcChar> DescField<'buf, SQLHDESC<'conn, DT, SQL_OV_ODBC4>, DT, A, SQL_OV_ODBC4> for OdbcStr<CH>where
OdbcStr<CH>: DescField<'buf, SQLHDESC<'conn, DT, <SQL_OV_ODBC4 as OdbcVersion>::PrevVersion>, DT, A, <SQL_OV_ODBC4 as OdbcVersion>::PrevVersion>,
impl<DT, V: OdbcVersion> Send for SQLHDESC<'_, DT, V>
Auto Trait Implementations§
impl<'conn, DT, V> Freeze for SQLHDESC<'conn, DT, V>
impl<'conn, DT, V> RefUnwindSafe for SQLHDESC<'conn, DT, V>where
V: RefUnwindSafe,
DT: RefUnwindSafe,
impl<'conn, DT, V = SQL_OV_ODBC3_80> !Sync for SQLHDESC<'conn, DT, V>
impl<'conn, DT, V> Unpin for SQLHDESC<'conn, DT, V>
impl<'conn, DT, V> UnwindSafe for SQLHDESC<'conn, DT, V>where
V: UnwindSafe,
DT: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more