SQLHSTMT

Struct SQLHSTMT 

Source
pub struct SQLHSTMT<'conn, 'desc, 'buf, V: OdbcVersion = SQL_OV_ODBC3_80>(/* private fields */);
Expand description

Statement handle consists of all of the information associated with a SQL statement, such as any result sets created by the statement and parameters used in the execution of the statement. A statement is associated with a single connection, and there can be multiple statements on that connection. The statement handle contains statement information, such as:

  • The statement’s state
  • The current statement-level diagnostics
  • The addresses of the application variables bound to the statement’s parameters and result set columns
  • The current settings of each statement attribute

Statement handles are used in most ODBC functions. Notably, they are used:

  • to bind parameters and result set columns (SQLBindParameter and SQLBindCol)
  • to prepare and execute statements (SQLPrepare, SQLExecute, and SQLExecDirect)
  • to retrieve metadata (SQLColAttribute and SQLDescribeCol)
  • to fetch results (SQLFetch), and retrieve diagnostics (SQLGetDiagField and SQLGetDiagRec)
  • in catalog functions (SQLColumns, SQLTables, …)
  • in number of other functions.

Statement handles are allocated with SQLAllocHandle and freed with SQLFreeHandle.

§Documentation

https://docs.microsoft.com/en-us/sql/odbc/reference/develop-app/statement-handles

Implementations§

Source§

impl<'desc, 'buf, V: OdbcVersion> SQLHSTMT<'_, 'desc, 'buf, V>

Source

pub fn SQLExecDirectA(&self, StatementText: &OdbcStr<SQLCHAR>) -> SQLRETURN

Executes a preparable statement, using the current values of the parameter marker variables if any parameters exist in the statement. SQLExecDirect is the fastest way to submit an SQL statement for one-time execution.

For complete documentation on SQLExecDirectA, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_NEED_DATA, SQL_STILL_EXECUTING, SQL_ERROR, SQL_NO_DATA, SQL_INVALID_HANDLE, or SQL_PARAM_DATA_AVAILABLE.

Source

pub fn SQLExecDirectW(&self, StatementText: &OdbcStr<SQLWCHAR>) -> SQLRETURN

Executes a preparable statement, using the current values of the parameter marker variables if any parameters exist in the statement. SQLExecDirect is the fastest way to submit an SQL statement for one-time execution.

For complete documentation on SQLExecDirectW, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_NEED_DATA, SQL_STILL_EXECUTING, SQL_ERROR, SQL_NO_DATA, SQL_INVALID_HANDLE, or SQL_PARAM_DATA_AVAILABLE.

Source

pub fn SQLExecute(&self) -> SQLRETURN

Executes a prepared statement, using the current values of the parameter marker variables if any parameter markers exist in the statement.

For complete documentation on SQLExecute, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_NEED_DATA, SQL_STILL_EXECUTING, SQL_ERROR, SQL_NO_DATA, SQL_INVALID_HANDLE, or SQL_PARAM_DATA_AVAILABLE.

Source

pub fn SQLFetch(&self) -> SQLRETURN

Fetches the next rowset of data from the result set and returns data for all bound columns.

For complete documentation on SQLFetch, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_NO_DATA, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

Source

pub fn SQLFetchScroll( &self, FetchOrientation: SQLSMALLINT, FetchOffset: SQLLEN, ) -> SQLRETURN

Fetches the specified rowset of data from the result set and returns data for all bound columns. Rowsets can be specified at an absolute or relative position or by bookmark.

For complete documentation on SQLFetchScroll, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_NO_DATA, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

Source

pub fn SQLSetPos( &self, RowNumber: SQLSETPOSIROW, Operation: Operation, LockType: LockType, ) -> SQLRETURN

Sets the cursor position in a rowset and allows an application to refresh data in the rowset or to update or delete data in the result set.

For complete documentation on SQLSetPos, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_NEED_DATA, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

Trait Implementations§

Source§

impl<'env, 'conn, V: OdbcVersion> Allocate<'conn, SQLHDBC<'env, C4, V>> for SQLHSTMT<'conn, '_, '_, 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> AsSQLHANDLE for SQLHSTMT<'_, '_, '_, V>

Source§

impl<'conn, 'desc, 'buf, V: Debug + OdbcVersion> Debug for SQLHSTMT<'conn, 'desc, 'buf, V>

Source§

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

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

impl<V: OdbcVersion> Diagnostics for SQLHSTMT<'_, '_, '_, 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<'conn, 'desc, 'buf, V: OdbcVersion> Handle for SQLHSTMT<'conn, 'desc, 'buf, V>

Source§

type Ident = <UnsafeSQLHSTMT<'conn, 'desc, 'buf, V> as Handle>::Ident

Source§

impl<'conn, 'desc, 'buf, V: OdbcVersion> Statement<'desc, 'buf, V> for SQLHSTMT<'conn, 'desc, 'buf, V>

Source§

type ARD = RefSQLHDESC<'conn, AppDesc<'buf>, V>

Source§

type APD = RefSQLHDESC<'conn, AppDesc<'buf>, V>

Source§

type IRD = RefSQLHDESC<'conn, IRD, V>

Source§

type IPD = RefSQLHDESC<'conn, IPD, V>

Source§

type ExplicitARD = SQLHDESC<'conn, AppDesc<'buf>, V>

Source§

type ExplicitAPD = SQLHDESC<'conn, AppDesc<'buf>, V>

Source§

fn bind_col<TT: Ident, B>(&self, _: Option<&'buf B>)
where B: ?Sized + DeferredBuf<Self::ARD, TT, V>,

Source§

fn bind_param<TT: Ident, B>(&self, _: Option<&'buf B>)
where B: ?Sized + DeferredBuf<Self::APD, TT, V>,

Source§

fn bind_strlen_or_ind( &self, StrLen_or_IndPtr: Option<&'buf UnsafeCell<StrLenOrInd>>, )

Source§

fn SQLBindCol<TT: Ident<Type = SQLSMALLINT>, B>( &self, ColumnNumber: SQLUSMALLINT, TargetType: TT, TargetValuePtr: Option<&'buf B>, StrLen_or_IndPtr: Option<&'buf UnsafeCell<StrLenOrInd>>, ) -> SQLRETURN
where B: ?Sized + DeferredBuf<Self::ARD, TT, V>,

Binds application data buffers to columns in the result set. Read more
Source§

fn SQLBindParameter<TT: Ident<Type = SQLSMALLINT>, ST: SqlType<V>, B>( &self, ParameterNumber: SQLUSMALLINT, InputOutputType: IOType, ValueType: TT, ParameterType: ST, ColumnSize: SQLULEN, DecimalDigits: SQLSMALLINT, ParameterValuePtr: Option<&'buf B>, StrLen_or_IndPtr: Option<&'buf UnsafeCell<StrLenOrInd>>, ) -> SQLRETURN
where B: ?Sized + DeferredBuf<Self::APD, TT, V>,

Binds a buffer to a parameter marker in an SQL statement. SQLBindParameter supports binding to a Unicode C data type, even if the underlying driver does not support Unicode data. Read more
Source§

fn SQLBulkOperations(&self, Operation: BulkOperation) -> SQLRETURN

Performs bulk insertions and bulk bookmark operations, including update, delete, and fetch by bookmark. Read more
Source§

fn SQLCloseCursor(&self) -> SQLRETURN

Closes a cursor that has been opened on a statement and discards pending results. Read more
Source§

fn SQLColAttributeA<A: Ident<Type = SQLUSMALLINT>, T>( &self, ColumnNumber: SQLUSMALLINT, FieldIdentifier: A, CharacterAttributePtr: Option<&mut T>, StringLengthPtr: Option<&mut MaybeUninit<T::StrLen>>, NumericAttributePtr: &mut impl AsMutPtr<SQLLEN>, ) -> SQLRETURN
where T: AttrGet<A> + Ansi + ?Sized + ColAttr<A, V>, MaybeUninit<T::StrLen>: StrLen<SQLSMALLINT>,

Returns descriptor information for a column in a result set. Descriptor information is returned as a character string, a descriptor-dependent value, or an integer value. Read more
Source§

fn SQLColAttributeW<A: Ident<Type = SQLUSMALLINT>, T>( &self, ColumnNumber: SQLUSMALLINT, FieldIdentifier: A, CharacterAttributePtr: Option<&mut T>, StringLengthPtr: Option<&mut MaybeUninit<T::StrLen>>, NumericAttributePtr: &mut impl AsMutPtr<SQLLEN>, ) -> SQLRETURN
where T: AttrGet<A> + Unicode + ?Sized + ColAttr<A, V>, MaybeUninit<T::StrLen>: StrLen<SQLSMALLINT>,

Returns descriptor information for a column in a result set. Descriptor information is returned as a character string, a descriptor-dependent value, or an integer value. Read more
Source§

fn SQLColumnPrivilegesA( &self, CatalogName: &OdbcStr<SQLCHAR>, SchemaName: &OdbcStr<SQLCHAR>, TableName: &OdbcStr<SQLCHAR>, ColumnName: &OdbcStr<SQLCHAR>, ) -> SQLRETURN

Returns a list of columns and associated privileges for the specified table. The driver returns the information as a result set on the specified self. Read more
Source§

fn SQLColumnPrivilegesW( &self, CatalogName: &OdbcStr<SQLWCHAR>, SchemaName: &OdbcStr<SQLWCHAR>, TableName: &OdbcStr<SQLWCHAR>, ColumnName: &OdbcStr<SQLWCHAR>, ) -> SQLRETURN

Returns a list of columns and associated privileges for the specified table. The driver returns the information as a result set on the specified self. Read more
Source§

fn SQLColumnsA( &self, CatalogName: &OdbcStr<SQLCHAR>, SchemaName: &OdbcStr<SQLCHAR>, TableName: &OdbcStr<SQLCHAR>, ColumnName: &OdbcStr<SQLCHAR>, ) -> SQLRETURN

Returns the list of column names in specified tables. The driver returns this information as a result set on the specified self. Read more
Source§

fn SQLColumnsW( &self, CatalogName: &OdbcStr<SQLWCHAR>, SchemaName: &OdbcStr<SQLWCHAR>, TableName: &OdbcStr<SQLWCHAR>, ColumnName: &OdbcStr<SQLWCHAR>, ) -> SQLRETURN

Returns the list of column names in specified tables. The driver returns this information as a result set on the specified self. Read more
Source§

fn SQLDescribeColA( &self, ColumnNumber: SQLUSMALLINT, ColumnName: &mut OdbcStr<MaybeUninit<SQLCHAR>>, NameLengthPtr: &mut impl AsMutPtr<SQLSMALLINT>, DataTypePtr: &mut impl AsMutPtr<SQLSMALLINT>, ColumnSizePtr: &mut impl AsMutPtr<SQLULEN>, DecimalDigitsPtr: &mut impl AsMutPtr<SQLSMALLINT>, NullablePtr: &mut impl AsMutPtr<NullAllowed>, ) -> SQLRETURN

Returns the result descriptor - column name,type, column size, decimal digits, and nullability - for one column in the result set. This information also is available in the fields of the IRD. Read more
Source§

fn SQLDescribeColW( &self, ColumnNumber: SQLUSMALLINT, ColumnName: &mut OdbcStr<MaybeUninit<SQLWCHAR>>, NameLengthPtr: &mut impl AsMutPtr<SQLSMALLINT>, DataTypePtr: &mut impl AsMutPtr<SQLSMALLINT>, ColumnSizePtr: &mut impl AsMutPtr<SQLULEN>, DecimalDigitsPtr: &mut impl AsMutPtr<SQLSMALLINT>, NullablePtr: &mut impl AsMutPtr<NullAllowed>, ) -> SQLRETURN

Returns the result descriptor - column name,type, column size, decimal digits, and nullability - for one column in the result set. This information also is available in the fields of the IRD. Read more
Source§

fn SQLDescribeParam( &self, ParameterNumber: SQLUSMALLINT, DataTypePtr: &mut impl AsMutPtr<SQLSMALLINT>, ParameterSizePtr: &mut impl AsMutPtr<SQLULEN>, DecimalDigitsPtr: &mut impl AsMutPtr<SQLSMALLINT>, NullablePtr: &mut impl AsMutPtr<NullAllowed>, ) -> SQLRETURN

Returns the description of a parameter marker associated with a prepared SQL statement. This information is also available in the fields of the IPD. Read more
Source§

fn SQLForeignKeysA( &self, PKCatalogName: &OdbcStr<SQLCHAR>, PKSchemaName: &OdbcStr<SQLCHAR>, PKTableName: &OdbcStr<SQLCHAR>, FKCatalogName: &OdbcStr<SQLCHAR>, FKSchemaName: &OdbcStr<SQLCHAR>, FKTableName: &OdbcStr<SQLCHAR>, ) -> SQLRETURN

Can return: Read more
Source§

fn SQLForeignKeysW( &self, PKCatalogName: &OdbcStr<SQLWCHAR>, PKSchemaName: &OdbcStr<SQLWCHAR>, PKTableName: &OdbcStr<SQLWCHAR>, FKCatalogName: &OdbcStr<SQLWCHAR>, FKSchemaName: &OdbcStr<SQLWCHAR>, FKTableName: &OdbcStr<SQLWCHAR>, ) -> SQLRETURN

Can return: Read more
Source§

fn SQLFreeStmt(&self, Option: FreeStmtOption) -> SQLRETURN

Stops processing associated with a specific statement, closes any open cursors associated with the statement, discards pending results, or, optionally, frees all resources associated with the statement handle. Read more
Source§

fn SQLGetCursorNameA( &self, CursorName: &mut OdbcStr<MaybeUninit<SQLCHAR>>, NameLengthPtr: &mut impl AsMutPtr<SQLSMALLINT>, ) -> SQLRETURN

Returns the cursor name associated with a specified statement. Read more
Source§

fn SQLGetCursorNameW( &self, CursorName: &mut OdbcStr<MaybeUninit<SQLWCHAR>>, NameLengthPtr: &mut impl AsMutPtr<SQLSMALLINT>, ) -> SQLRETURN

Returns the cursor name associated with a specified statement. Read more
Source§

fn SQLGetData<TT: Ident<Type = SQLSMALLINT>, B>( &self, Col_or_Param_Num: SQLUSMALLINT, TargetType: TT, TargetValuePtr: &mut B, StrLen_or_IndPtr: Option<&mut MaybeUninit<StrLenOrInd>>, ) -> SQLRETURN

Retrieves data for a single column in the result set or for a single parameter after SQLParamData returns SQL_PARAM_DATA_AVAILABLE. It can be called multiple times to retrieve variable-length data in parts. Read more
Source§

fn SQLGetStmtAttrA<'stmt, A: Ident<Type = SQLINTEGER>, T>( &'stmt self, Attribute: A, ValuePtr: Option<&mut T>, StringLengthPtr: Option<&mut MaybeUninit<T::StrLen>>, ) -> SQLRETURN
where T: AttrGet<A> + Ansi + Ref<'stmt> + ?Sized + StmtAttr<'desc, 'buf, Self, A, V>, MaybeUninit<T::StrLen>: StrLen<SQLINTEGER>,

Returns the current setting of a statement attribute. Read more
Source§

fn SQLGetStmtAttrW<'stmt, A: Ident<Type = SQLINTEGER>, T>( &'stmt self, Attribute: A, ValuePtr: Option<&mut T>, StringLengthPtr: Option<&mut MaybeUninit<T::StrLen>>, ) -> SQLRETURN
where T: AttrGet<A> + Unicode + Ref<'stmt> + ?Sized + StmtAttr<'desc, 'buf, Self, A, V>, MaybeUninit<T::StrLen>: StrLen<SQLINTEGER>,

Returns the current setting of a statement attribute. Read more
Source§

fn SQLGetTypeInfoA<ST: SqlType<V>>(&self, DataType: ST) -> SQLRETURN

Returns information about data types supported by the data source. The driver returns the information in the form of an SQL result set. The data types are intended for use in Data Definition Language (DDL) statements. Read more
Source§

fn SQLGetTypeInfoW<ST: SqlType<V>>(&self, DataType: ST) -> SQLRETURN

Returns information about data types supported by the data source. The driver returns the information in the form of an SQL result set. The data types are intended for use in Data Definition Language (DDL) statements. Read more
Source§

fn SQLMoreResults(&self) -> SQLRETURN

Determines whether more results are available on a statement containing SELECT, UPDATE, INSERT, or DELETE statements and, if so, initializes processing for those results. Read more
Source§

fn SQLNumParams( &self, ParameterCountPtr: &mut impl AsMutPtr<SQLSMALLINT>, ) -> SQLRETURN

Returns the number of parameters in an SQL statement. Read more
Source§

fn SQLNumResultCols( &self, ColumnCountPtr: &mut impl AsMutPtr<SQLSMALLINT>, ) -> SQLRETURN

Returns the number of columns in a result set. Read more
Source§

fn SQLParamData(&self, ValuePtrPtr: &mut MaybeUninit<SQLPOINTER>) -> SQLRETURN

Used together with SQLPutData to supply parameter data at statement execution time, and with SQLGetData to retrieve streamed output parameter data. Read more
Source§

fn SQLPrepareA(&self, StatementText: &OdbcStr<SQLCHAR>) -> SQLRETURN

Prepares an SQL string for execution. Read more
Source§

fn SQLPrepareW(&self, StatementText: &OdbcStr<SQLWCHAR>) -> SQLRETURN

Prepares an SQL string for execution. Read more
Source§

fn SQLPrimaryKeysA( &self, CatalogName: &OdbcStr<SQLCHAR>, SchemaName: &OdbcStr<SQLCHAR>, TableName: &OdbcStr<SQLCHAR>, ) -> SQLRETURN

Returns the column names that make up the primary key for a table. The driver returns the information as a result set. This function does not support returning primary keys from multiple tables in a single call. Read more
Source§

fn SQLPrimaryKeysW( &self, CatalogName: &OdbcStr<SQLWCHAR>, SchemaName: &OdbcStr<SQLWCHAR>, TableName: &OdbcStr<SQLWCHAR>, ) -> SQLRETURN

Returns the column names that make up the primary key for a table. The driver returns the information as a result set. This function does not support returning primary keys from multiple tables in a single call. Read more
Source§

fn SQLProcedureColumnsA( &self, CatalogName: &OdbcStr<SQLCHAR>, SchemaName: &OdbcStr<SQLCHAR>, ProcName: &OdbcStr<SQLCHAR>, ColumnName: &OdbcStr<SQLCHAR>, ) -> SQLRETURN

Returns the list of input and output parameters, as well as the columns that make up the result set for the specified procedures. The driver returns the information as a result set on the specified statement. Read more
Source§

fn SQLProcedureColumnsW( &self, CatalogName: &OdbcStr<SQLWCHAR>, SchemaName: &OdbcStr<SQLWCHAR>, ProcName: &OdbcStr<SQLWCHAR>, ColumnName: &OdbcStr<SQLWCHAR>, ) -> SQLRETURN

Returns the list of input and output parameters, as well as the columns that make up the result set for the specified procedures. The driver returns the information as a result set on the specified statement. Read more
Source§

fn SQLProceduresA( &self, CatalogName: &OdbcStr<SQLCHAR>, SchemaName: &OdbcStr<SQLCHAR>, ProcName: &OdbcStr<SQLCHAR>, ) -> SQLRETURN

Returns the list of procedure names stored in a specific data source. Procedure is a generic term used to describe an executable object, or a named entity that can be invoked using input and output parameters. For more information on procedures, see the Procedures. Read more
Source§

fn SQLProceduresW( &self, CatalogName: &OdbcStr<SQLWCHAR>, SchemaName: &OdbcStr<SQLWCHAR>, ProcName: &OdbcStr<SQLWCHAR>, ) -> SQLRETURN

Returns the list of procedure names stored in a specific data source. Procedure is a generic term used to describe an executable object, or a named entity that can be invoked using input and output parameters. For more information on procedures, see the Procedures. Read more
Source§

unsafe fn SQLPutData<TT: Ident, B>(&self, DataPtr: Option<&B>) -> SQLRETURN
where B: AsSQLPOINTER + ?Sized + CData<TT, V>,

Allows an application to send data for a parameter or column to the driver at statement execution time. This function can be used to send character or binary data values in parts to a column with a character, binary, or data source-specific data type (for example, parameters of the SQL_LONGVARBINARY or SQL_LONGVARCHAR types). SQLPutData supports binding to a Unicode C data type, even if the underlying driver does not support Unicode data. Read more
Source§

fn SQLRowCount(&self, RowCountPtr: &mut impl AsMutPtr<SQLLEN>) -> SQLRETURN

Returns the number of rows affected by an UPDATE, INSERT, or DELETE statement; an SQL_ADD, SQL_UPDATE_BY_BOOKMARK, or SQL_DELETE_BY_BOOKMARK operation in SQLBulkOperations; or an SQL_UPDATE or SQL_DELETE operation in SQLSetPos. Read more
Source§

fn SQLSetCursorNameA(&self, CursorName: &OdbcStr<SQLCHAR>) -> SQLRETURN

Associates a cursor name with an active statement. If an application does not call SQLSetCursorName, the driver generates cursor names as needed for SQL statement processing. Read more
Source§

fn SQLSetCursorNameW(&self, CursorName: &OdbcStr<SQLWCHAR>) -> SQLRETURN

Associates a cursor name with an active statement. If an application does not call SQLSetCursorName, the driver generates cursor names as needed for SQL statement processing. Read more
Source§

fn SQLSetStmtAttrA<A: Ident<Type = SQLINTEGER>, T>( &self, Attribute: A, ValuePtr: T, ) -> SQLRETURN
where T: AttrSet<A> + Ansi + StmtAttr<'desc, 'buf, Self, A, V>,

Sets attributes related to a statement. Read more
Source§

fn SQLSetStmtAttrW<A: Ident<Type = SQLINTEGER>, T>( &self, Attribute: A, ValuePtr: T, ) -> SQLRETURN
where T: AttrSet<A> + Unicode + StmtAttr<'desc, 'buf, Self, A, V>,

Sets attributes related to a statement. Read more
Source§

fn SQLSpecialColumnsA( &self, IdentifierType: IdentifierType, CatalogName: &OdbcStr<SQLCHAR>, SchemaName: &OdbcStr<SQLCHAR>, TableName: &OdbcStr<SQLCHAR>, Scope: Scope, Nullable: NullAllowed, ) -> SQLRETURN

Retrieves the following information about columns within a specified table: Read more
Source§

fn SQLSpecialColumnsW( &self, IdentifierType: IdentifierType, CatalogName: &OdbcStr<SQLWCHAR>, SchemaName: &OdbcStr<SQLWCHAR>, TableName: &OdbcStr<SQLWCHAR>, Scope: Scope, Nullable: NullAllowed, ) -> SQLRETURN

Retrieves the following information about columns within a specified table: Read more
Source§

fn SQLStatisticsA( &self, CatalogName: &OdbcStr<SQLCHAR>, SchemaName: &OdbcStr<SQLCHAR>, TableName: &OdbcStr<SQLCHAR>, Unique: Unique, Reserved: Reserved, ) -> SQLRETURN

Retrieves a list of statistics about a single table and the indexes associated with the table. The driver returns the information as a result set. Read more
Source§

fn SQLStatisticsW( &self, CatalogName: &OdbcStr<SQLWCHAR>, SchemaName: &OdbcStr<SQLWCHAR>, TableName: &OdbcStr<SQLWCHAR>, Unique: Unique, Reserved: Reserved, ) -> SQLRETURN

Retrieves a list of statistics about a single table and the indexes associated with the table. The driver returns the information as a result set. Read more
Source§

fn SQLTablePrivilegesA( &self, CatalogName: &OdbcStr<SQLCHAR>, SchemaName: &OdbcStr<SQLCHAR>, TableName: &OdbcStr<SQLCHAR>, ) -> SQLRETURN

Returns a list of tables and the privileges associated with each table. The driver returns the information as a result set on the specified statement. Read more
Source§

fn SQLTablePrivilegesW( &self, CatalogName: &OdbcStr<SQLWCHAR>, SchemaName: &OdbcStr<SQLWCHAR>, TableName: &OdbcStr<SQLWCHAR>, ) -> SQLRETURN

Returns a list of tables and the privileges associated with each table. The driver returns the information as a result set on the specified statement. Read more
Source§

fn SQLTablesA( &self, CatalogName: &OdbcStr<SQLCHAR>, SchemaName: &OdbcStr<SQLCHAR>, TableName: &OdbcStr<SQLCHAR>, TableType: &OdbcStr<SQLCHAR>, ) -> SQLRETURN

Returns the list of table, catalog, or schema names, and table types, stored in a specific data source. The driver returns the information as a result set. Read more
Source§

fn SQLTablesW( &self, CatalogName: &OdbcStr<SQLWCHAR>, SchemaName: &OdbcStr<SQLWCHAR>, TableName: &OdbcStr<SQLWCHAR>, TableType: &OdbcStr<SQLWCHAR>, ) -> SQLRETURN

Returns the list of table, catalog, or schema names, and table types, stored in a specific data source. The driver returns the information as a result set. Read more
Source§

impl<V: OdbcVersion> DiagField<SQLHSTMT<'_, '_, '_, V>, SQL_DIAG_COLUMN_NUMBER> for DiagColumnNumber

Source§

impl<V: OdbcVersion> DiagField<SQLHSTMT<'_, '_, '_, V>, SQL_DIAG_CURSOR_ROW_COUNT> for SQLLEN

Source§

impl<V: OdbcVersion> DiagField<SQLHSTMT<'_, '_, '_, V>, SQL_DIAG_DYNAMIC_FUNCTION> for OdbcStr<SQLCHAR>

Source§

impl<V: OdbcVersion> DiagField<SQLHSTMT<'_, '_, '_, V>, SQL_DIAG_DYNAMIC_FUNCTION_CODE> for DiagDynamicFunctionCode

Source§

impl<V: OdbcVersion> DiagField<SQLHSTMT<'_, '_, '_, V>, SQL_DIAG_ROW_COUNT> for SQLLEN

Source§

impl<V: OdbcVersion> DiagField<SQLHSTMT<'_, '_, '_, V>, SQL_DIAG_ROW_NUMBER> for DiagRowNumber

Source§

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

Source§

impl<'conn, 'desc, 'buf, A: Ident, T: Scalar> StmtAttr<'desc, 'buf, SQLHSTMT<'conn, 'desc, 'buf>, A, SQL_OV_ODBC3_80> for [T]
where [T]: StmtAttr<'desc, 'buf, SQLHSTMT<'conn, 'desc, 'buf, <SQL_OV_ODBC3_80 as OdbcVersion>::PrevVersion>, A, <SQL_OV_ODBC3_80 as OdbcVersion>::PrevVersion>,

Source§

impl<'conn, 'desc, 'buf, A: Ident, CH: OdbcChar> StmtAttr<'desc, 'buf, SQLHSTMT<'conn, 'desc, 'buf>, A, SQL_OV_ODBC3_80> for OdbcStr<CH>
where OdbcStr<CH>: StmtAttr<'desc, 'buf, SQLHSTMT<'conn, 'desc, 'buf, <SQL_OV_ODBC3_80 as OdbcVersion>::PrevVersion>, A, <SQL_OV_ODBC3_80 as OdbcVersion>::PrevVersion>,

Source§

impl<'conn, 'desc, 'buf, A: Ident, T> StmtAttr<'desc, 'buf, SQLHSTMT<'conn, 'desc, 'buf>, A, SQL_OV_ODBC3_80> for T
where T: StmtAttr<'desc, 'buf, SQLHSTMT<'conn, 'desc, 'buf, <SQL_OV_ODBC3_80 as OdbcVersion>::PrevVersion>, A, <SQL_OV_ODBC3_80 as OdbcVersion>::PrevVersion> + Scalar,

Source§

impl<'conn, 'desc, 'buf, A: Ident, T: Scalar> StmtAttr<'desc, 'buf, SQLHSTMT<'conn, 'desc, 'buf, SQL_OV_ODBC4>, A, SQL_OV_ODBC4> for [T]
where [T]: StmtAttr<'desc, 'buf, SQLHSTMT<'conn, 'desc, 'buf, <SQL_OV_ODBC4 as OdbcVersion>::PrevVersion>, A, <SQL_OV_ODBC4 as OdbcVersion>::PrevVersion>,

Source§

impl<'conn, 'desc, 'buf, A: Ident, CH: OdbcChar> StmtAttr<'desc, 'buf, SQLHSTMT<'conn, 'desc, 'buf, SQL_OV_ODBC4>, A, SQL_OV_ODBC4> for OdbcStr<CH>
where OdbcStr<CH>: StmtAttr<'desc, 'buf, SQLHSTMT<'conn, 'desc, 'buf, <SQL_OV_ODBC4 as OdbcVersion>::PrevVersion>, A, <SQL_OV_ODBC4 as OdbcVersion>::PrevVersion>,

Source§

impl<'conn, 'desc, 'buf, A: Ident, T> StmtAttr<'desc, 'buf, SQLHSTMT<'conn, 'desc, 'buf, SQL_OV_ODBC4>, A, SQL_OV_ODBC4> for T
where T: StmtAttr<'desc, 'buf, SQLHSTMT<'conn, 'desc, 'buf, <SQL_OV_ODBC4 as OdbcVersion>::PrevVersion>, A, <SQL_OV_ODBC4 as OdbcVersion>::PrevVersion> + Scalar,

Source§

impl<'conn, 'desc, 'buf, V: OdbcVersion> StmtAttr<'desc, 'buf, SQLHSTMT<'conn, 'desc, 'buf, V>, SQL_ATTR_APP_PARAM_DESC, V> for MaybeUninit<RefSQLHDESC<'conn, AppDesc<'buf>, V>>

Source§

impl<'conn, 'desc, 'buf, V: OdbcVersion> StmtAttr<'desc, 'buf, SQLHSTMT<'conn, 'desc, 'buf, V>, SQL_ATTR_APP_ROW_DESC, V> for MaybeUninit<RefSQLHDESC<'conn, AppDesc<'buf>, V>>

Source§

impl<'conn, 'desc, 'buf, V: OdbcVersion> StmtAttr<'desc, 'buf, SQLHSTMT<'conn, 'desc, 'buf, V>, SQL_ATTR_IMP_PARAM_DESC, V> for MaybeUninit<RefSQLHDESC<'conn, IPD, V>>

Source§

impl<'conn, 'desc, 'buf, V: OdbcVersion> StmtAttr<'desc, 'buf, SQLHSTMT<'conn, 'desc, 'buf, V>, SQL_ATTR_IMP_ROW_DESC, V> for MaybeUninit<RefSQLHDESC<'conn, IRD, V>>

Auto Trait Implementations§

§

impl<'conn, 'desc, 'buf, V = SQL_OV_ODBC3_80> !Freeze for SQLHSTMT<'conn, 'desc, 'buf, V>

§

impl<'conn, 'desc, 'buf, V = SQL_OV_ODBC3_80> !RefUnwindSafe for SQLHSTMT<'conn, 'desc, 'buf, V>

§

impl<'conn, 'desc, 'buf, V = SQL_OV_ODBC3_80> !Sync for SQLHSTMT<'conn, 'desc, 'buf, V>

§

impl<'conn, 'desc, 'buf, V> Unpin for SQLHSTMT<'conn, 'desc, 'buf, V>
where V: Unpin,

§

impl<'conn, 'desc, 'buf, V> UnwindSafe for SQLHSTMT<'conn, 'desc, 'buf, V>

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<'desc, 'buf, S> Async<SQL_OV_ODBC3_80> for S
where S: Statement<'desc, 'buf, SQL_OV_ODBC3_80>,

Source§

fn SQLCompleteAsync( &mut self, AsyncRetCodePtr: &mut impl AsMutPtr<RETCODE>, ) -> SQLRETURN

Can be used to determine when an asynchronous function is complete using either notification- or polling-based processing. For more information about asynchronous operations, see Asynchronous Execution. SQLCompleteAsync is only implemented in the ODBC Driver Manager. In notification based asynchronous processing mode, SQLCompleteAsync must be called after the Driver Manager raises the event object used for notification. SQLCompleteAsync completes the asynchronous processing and the asynchronous function will generate a return code. In polling based asynchronous processing mode, SQLCompleteAsync is an alternative to calling the original asynchronous function, without needing to specify the arguments in the original asynchronous function call. SQLCompleteAsync can be used regardless whether the ODBC Cursor Library is enabled. Read more
Source§

impl<'desc, 'buf, S> Async<SQL_OV_ODBC4> for S
where S: Statement<'desc, 'buf, SQL_OV_ODBC4>,

Source§

fn SQLCompleteAsync( &mut self, AsyncRetCodePtr: &mut impl AsMutPtr<RETCODE>, ) -> SQLRETURN

Can be used to determine when an asynchronous function is complete using either notification- or polling-based processing. For more information about asynchronous operations, see Asynchronous Execution. SQLCompleteAsync is only implemented in the ODBC Driver Manager. In notification based asynchronous processing mode, SQLCompleteAsync must be called after the Driver Manager raises the event object used for notification. SQLCompleteAsync completes the asynchronous processing and the asynchronous function will generate a return code. In polling based asynchronous processing mode, SQLCompleteAsync is an alternative to calling the original asynchronous function, without needing to specify the arguments in the original asynchronous function call. SQLCompleteAsync can be used regardless whether the ODBC Cursor Library is enabled. 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<'desc, 'buf, S> Cancel<SQL_OV_ODBC3_80> for S
where S: Statement<'desc, 'buf, SQL_OV_ODBC3_80>,

Source§

fn SQLCancel(&self) -> SQLRETURN
where Self: Handle<Ident = SQL_HANDLE_STMT>,

Cancels the processing on a statement. To cancel processing on a connection or statement, use SQLCancelHandle Function. Read more
Source§

fn SQLCancelHandle(&self) -> SQLRETURN

Cancels the processing on a connection or statement. The Driver Manager maps a call to SQLCancelHandle to a call to SQLCancel when HandleType is SQL_HANDLE_STMT. Read more
Source§

impl<'desc, 'buf, S> Cancel<SQL_OV_ODBC4> for S
where S: Statement<'desc, 'buf, SQL_OV_ODBC4>,

Source§

fn SQLCancel(&self) -> SQLRETURN
where Self: Handle<Ident = SQL_HANDLE_STMT>,

Cancels the processing on a statement. To cancel processing on a connection or statement, use SQLCancelHandle Function. Read more
Source§

fn SQLCancelHandle(&self) -> SQLRETURN

Cancels the processing on a connection or statement. The Driver Manager maps a call to SQLCancelHandle to a call to SQLCancel when HandleType is SQL_HANDLE_STMT. 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.