Diagnostics

Trait Diagnostics 

Source
pub trait Diagnostics: Handle {
    // Provided methods
    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> { ... }
    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> { ... }
    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 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 { ... }
}

Provided Methods§

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.

For complete documentation on SQLGetDiagFieldA, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, SQL_INVALID_HANDLE, or SQL_NO_DATA.

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.

For complete documentation on SQLGetDiagFieldW, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, SQL_INVALID_HANDLE, or SQL_NO_DATA.

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.

For complete documentation on SQLGetDiagRecA, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLGetDiagRecW, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<C: ConnState, V: OdbcVersion> Diagnostics for SQLHDBC<'_, C, V>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<V: OdbcVersion> Diagnostics for SQLHENV<V>

Source§

impl<V: OdbcVersion> Diagnostics for SQLHSTMT<'_, '_, '_, V>

Source§

impl<V: OdbcVersion> Diagnostics for UnsafeSQLHSTMT<'_, '_, '_, V>