Statement

Trait Statement 

Source
pub trait Statement<'desc, 'buf, V: OdbcVersion>: Handle {
    type ARD: Descriptor<'buf, AppDesc<'buf>, V>;
    type APD: Descriptor<'buf, AppDesc<'buf>, V>;
    type IRD: Descriptor<'buf, IRD, V>;
    type IPD: Descriptor<'buf, IPD, V>;
    type ExplicitARD: Descriptor<'buf, AppDesc<'buf>, V>;
    type ExplicitAPD: Descriptor<'buf, AppDesc<'buf>, V>;

Show 52 methods // Required methods fn bind_col<TT: Ident, B>(&self, TargetValuePtr: Option<&'buf B>) where B: ?Sized + DeferredBuf<Self::ARD, TT, V>; fn bind_param<TT: Ident, B>(&self, TargetValuePtr: Option<&'buf B>) where B: ?Sized + DeferredBuf<Self::APD, TT, V>; fn bind_strlen_or_ind( &self, StrLen_or_IndPtr: Option<&'buf UnsafeCell<StrLenOrInd>>, ); // Provided methods 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> { ... } 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> { ... } fn SQLBulkOperations(&self, Operation: BulkOperation) -> SQLRETURN { ... } fn SQLCloseCursor(&self) -> SQLRETURN { ... } 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> { ... } 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> { ... } fn SQLColumnPrivilegesA( &self, CatalogName: &OdbcStr<SQLCHAR>, SchemaName: &OdbcStr<SQLCHAR>, TableName: &OdbcStr<SQLCHAR>, ColumnName: &OdbcStr<SQLCHAR>, ) -> SQLRETURN { ... } fn SQLColumnPrivilegesW( &self, CatalogName: &OdbcStr<SQLWCHAR>, SchemaName: &OdbcStr<SQLWCHAR>, TableName: &OdbcStr<SQLWCHAR>, ColumnName: &OdbcStr<SQLWCHAR>, ) -> SQLRETURN { ... } fn SQLColumnsA( &self, CatalogName: &OdbcStr<SQLCHAR>, SchemaName: &OdbcStr<SQLCHAR>, TableName: &OdbcStr<SQLCHAR>, ColumnName: &OdbcStr<SQLCHAR>, ) -> SQLRETURN { ... } fn SQLColumnsW( &self, CatalogName: &OdbcStr<SQLWCHAR>, SchemaName: &OdbcStr<SQLWCHAR>, TableName: &OdbcStr<SQLWCHAR>, ColumnName: &OdbcStr<SQLWCHAR>, ) -> SQLRETURN { ... } 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 { ... } 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 { ... } 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 { ... } fn SQLForeignKeysA( &self, PKCatalogName: &OdbcStr<SQLCHAR>, PKSchemaName: &OdbcStr<SQLCHAR>, PKTableName: &OdbcStr<SQLCHAR>, FKCatalogName: &OdbcStr<SQLCHAR>, FKSchemaName: &OdbcStr<SQLCHAR>, FKTableName: &OdbcStr<SQLCHAR>, ) -> SQLRETURN { ... } fn SQLForeignKeysW( &self, PKCatalogName: &OdbcStr<SQLWCHAR>, PKSchemaName: &OdbcStr<SQLWCHAR>, PKTableName: &OdbcStr<SQLWCHAR>, FKCatalogName: &OdbcStr<SQLWCHAR>, FKSchemaName: &OdbcStr<SQLWCHAR>, FKTableName: &OdbcStr<SQLWCHAR>, ) -> SQLRETURN { ... } fn SQLFreeStmt(&self, Option: FreeStmtOption) -> SQLRETURN { ... } fn SQLGetCursorNameA( &self, CursorName: &mut OdbcStr<MaybeUninit<SQLCHAR>>, NameLengthPtr: &mut impl AsMutPtr<SQLSMALLINT>, ) -> SQLRETURN { ... } fn SQLGetCursorNameW( &self, CursorName: &mut OdbcStr<MaybeUninit<SQLWCHAR>>, NameLengthPtr: &mut impl AsMutPtr<SQLSMALLINT>, ) -> SQLRETURN { ... } 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 where B: AsMutSQLPOINTER + ?Sized + CData<TT, V>, MaybeUninit<StrLenOrInd>: StrLen<SQLLEN> { ... } 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> { ... } 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> { ... } fn SQLGetTypeInfoA<ST: SqlType<V>>(&self, DataType: ST) -> SQLRETURN { ... } fn SQLGetTypeInfoW<ST: SqlType<V>>(&self, DataType: ST) -> SQLRETURN { ... } fn SQLMoreResults(&self) -> SQLRETURN { ... } fn SQLNumParams( &self, ParameterCountPtr: &mut impl AsMutPtr<SQLSMALLINT>, ) -> SQLRETURN { ... } fn SQLNumResultCols( &self, ColumnCountPtr: &mut impl AsMutPtr<SQLSMALLINT>, ) -> SQLRETURN { ... } fn SQLParamData( &self, ValuePtrPtr: &mut MaybeUninit<SQLPOINTER>, ) -> SQLRETURN { ... } fn SQLPrepareA(&self, StatementText: &OdbcStr<SQLCHAR>) -> SQLRETURN { ... } fn SQLPrepareW(&self, StatementText: &OdbcStr<SQLWCHAR>) -> SQLRETURN { ... } fn SQLPrimaryKeysA( &self, CatalogName: &OdbcStr<SQLCHAR>, SchemaName: &OdbcStr<SQLCHAR>, TableName: &OdbcStr<SQLCHAR>, ) -> SQLRETURN { ... } fn SQLPrimaryKeysW( &self, CatalogName: &OdbcStr<SQLWCHAR>, SchemaName: &OdbcStr<SQLWCHAR>, TableName: &OdbcStr<SQLWCHAR>, ) -> SQLRETURN { ... } fn SQLProcedureColumnsA( &self, CatalogName: &OdbcStr<SQLCHAR>, SchemaName: &OdbcStr<SQLCHAR>, ProcName: &OdbcStr<SQLCHAR>, ColumnName: &OdbcStr<SQLCHAR>, ) -> SQLRETURN { ... } fn SQLProcedureColumnsW( &self, CatalogName: &OdbcStr<SQLWCHAR>, SchemaName: &OdbcStr<SQLWCHAR>, ProcName: &OdbcStr<SQLWCHAR>, ColumnName: &OdbcStr<SQLWCHAR>, ) -> SQLRETURN { ... } fn SQLProceduresA( &self, CatalogName: &OdbcStr<SQLCHAR>, SchemaName: &OdbcStr<SQLCHAR>, ProcName: &OdbcStr<SQLCHAR>, ) -> SQLRETURN { ... } fn SQLProceduresW( &self, CatalogName: &OdbcStr<SQLWCHAR>, SchemaName: &OdbcStr<SQLWCHAR>, ProcName: &OdbcStr<SQLWCHAR>, ) -> SQLRETURN { ... } unsafe fn SQLPutData<TT: Ident, B>(&self, DataPtr: Option<&B>) -> SQLRETURN where B: AsSQLPOINTER + ?Sized + CData<TT, V> { ... } fn SQLRowCount(&self, RowCountPtr: &mut impl AsMutPtr<SQLLEN>) -> SQLRETURN { ... } fn SQLSetCursorNameA(&self, CursorName: &OdbcStr<SQLCHAR>) -> SQLRETURN { ... } fn SQLSetCursorNameW(&self, CursorName: &OdbcStr<SQLWCHAR>) -> SQLRETURN { ... } fn SQLSetStmtAttrA<A: Ident<Type = SQLINTEGER>, T>( &self, Attribute: A, ValuePtr: T, ) -> SQLRETURN where T: AttrSet<A> + Ansi + StmtAttr<'desc, 'buf, Self, A, V> { ... } fn SQLSetStmtAttrW<A: Ident<Type = SQLINTEGER>, T>( &self, Attribute: A, ValuePtr: T, ) -> SQLRETURN where T: AttrSet<A> + Unicode + StmtAttr<'desc, 'buf, Self, A, V> { ... } fn SQLSpecialColumnsA( &self, IdentifierType: IdentifierType, CatalogName: &OdbcStr<SQLCHAR>, SchemaName: &OdbcStr<SQLCHAR>, TableName: &OdbcStr<SQLCHAR>, Scope: Scope, Nullable: NullAllowed, ) -> SQLRETURN { ... } fn SQLSpecialColumnsW( &self, IdentifierType: IdentifierType, CatalogName: &OdbcStr<SQLWCHAR>, SchemaName: &OdbcStr<SQLWCHAR>, TableName: &OdbcStr<SQLWCHAR>, Scope: Scope, Nullable: NullAllowed, ) -> SQLRETURN { ... } fn SQLStatisticsA( &self, CatalogName: &OdbcStr<SQLCHAR>, SchemaName: &OdbcStr<SQLCHAR>, TableName: &OdbcStr<SQLCHAR>, Unique: Unique, Reserved: Reserved, ) -> SQLRETURN { ... } fn SQLStatisticsW( &self, CatalogName: &OdbcStr<SQLWCHAR>, SchemaName: &OdbcStr<SQLWCHAR>, TableName: &OdbcStr<SQLWCHAR>, Unique: Unique, Reserved: Reserved, ) -> SQLRETURN { ... } fn SQLTablePrivilegesA( &self, CatalogName: &OdbcStr<SQLCHAR>, SchemaName: &OdbcStr<SQLCHAR>, TableName: &OdbcStr<SQLCHAR>, ) -> SQLRETURN { ... } fn SQLTablePrivilegesW( &self, CatalogName: &OdbcStr<SQLWCHAR>, SchemaName: &OdbcStr<SQLWCHAR>, TableName: &OdbcStr<SQLWCHAR>, ) -> SQLRETURN { ... } fn SQLTablesA( &self, CatalogName: &OdbcStr<SQLCHAR>, SchemaName: &OdbcStr<SQLCHAR>, TableName: &OdbcStr<SQLCHAR>, TableType: &OdbcStr<SQLCHAR>, ) -> SQLRETURN { ... } fn SQLTablesW( &self, CatalogName: &OdbcStr<SQLWCHAR>, SchemaName: &OdbcStr<SQLWCHAR>, TableName: &OdbcStr<SQLWCHAR>, TableType: &OdbcStr<SQLWCHAR>, ) -> SQLRETURN { ... }
}

Required Associated Types§

Source

type ARD: Descriptor<'buf, AppDesc<'buf>, V>

Source

type APD: Descriptor<'buf, AppDesc<'buf>, V>

Source

type IRD: Descriptor<'buf, IRD, V>

Source

type IPD: Descriptor<'buf, IPD, V>

Source

type ExplicitARD: Descriptor<'buf, AppDesc<'buf>, V>

Source

type ExplicitAPD: Descriptor<'buf, AppDesc<'buf>, V>

Required Methods§

Source

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

Source

fn bind_param<TT: Ident, B>(&self, TargetValuePtr: 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>>, )

Provided Methods§

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.

For complete documentation on SQLBindCol, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLBindParameter, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

Source

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

Performs bulk insertions and bulk bookmark operations, including update, delete, and fetch by bookmark.

For complete documentation on SQLBulkOperations, see API reference.

§Returns

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

Source

fn SQLCloseCursor(&self) -> SQLRETURN

Closes a cursor that has been opened on a statement and discards pending results.

For complete documentation on SQLCloseCursor, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLColAttributeA, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLColAttributeW, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLColumnPrivilegesA, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLColumnPrivilegesW, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLColumnsA, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLColumnsW, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLDescribeColA, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLDescribeColW, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLDescribeParam, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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:

  • A list of foreign keys in the specified table (columns in the specified table that refer to primary keys in other tables).
  • A list of foreign keys in other tables that refer to the primary key in the specified table.

The driver returns each list as a result set on the specified statement.

For complete documentation on SQLForeignKeysA, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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:

  • A list of foreign keys in the specified table (columns in the specified table that refer to primary keys in other tables).
  • A list of foreign keys in other tables that refer to the primary key in the specified table.

The driver returns each list as a result set on the specified statement.

For complete documentation on SQLForeignKeysW, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLFreeStmt, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

Source

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

Returns the cursor name associated with a specified statement.

For complete documentation on SQLGetCursorNameA, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

Source

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

Returns the cursor name associated with a specified statement.

For complete documentation on SQLGetCursorNameW, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLGetData, see API reference.

§Returns

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

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.

For complete documentation on SQLGetStmtAttrA, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLGetStmtAttrW, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLGetTypeInfoA, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLGetTypeInfoW, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLMoreResults, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_NO_DATA, SQL_ERROR, SQL_INVALID_HANDLE, OR SQL_PARAM_DATA_AVAILABLE.

Source

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

Returns the number of parameters in an SQL statement.

For complete documentation on SQLNumParams, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

Source

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

Returns the number of columns in a result set.

For complete documentation on SQLNumResultCols, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLParamData, see API reference.

§Returns

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

Source

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

Prepares an SQL string for execution.

For complete documentation on SQLPrepareA, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

Source

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

Prepares an SQL string for execution.

For complete documentation on SQLPrepareW, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLPrimaryKeysA, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLPrimaryKeysW, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLProcedureColumnsA, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLProcedureColumnsW, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLProceduresA, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLProceduresW, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLPutData, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLRowCount, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLSetCursorNameA, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLSetCursorNameW, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLSetStmtAttrA, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLSetStmtAttrW, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

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:

  • The optimal set of columns that uniquely identifies a row in the table.
  • Columns that are automatically updated when any value in the row is updated by a transaction.

For complete documentation on SQLSpecialColumnsA, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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:

  • The optimal set of columns that uniquely identifies a row in the table.
  • Columns that are automatically updated when any value in the row is updated by a transaction.

For complete documentation on SQLSpecialColumnsW, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLStatisticsA, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLStatisticsW, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLTablePrivilegesA, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLTablePrivilegesW, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLTablesA, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

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.

For complete documentation on SQLTablesW, see API reference.

§Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, 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<'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§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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