Expand description
ODBC types those representation is compatible with the ODBC C API.
This layer has not been created using automatic code generation. It is incomplete, i.e. it does
not contain every symbol or constant defined in the ODBC C headers. Symbols which are
deprecated since ODBC 3 have been left out intentionally. While some extra type safety has been
added by grouping some of C’s #define
constants into enum
-types it mostly offers the same
power (all) and safety guarantess(none) as the wrapped C-API.
ODBC 4.0 is still under development by Microsoft, so these symbols are deactivated by default
in the cargo.toml
Re-exports§
pub use CDataType::ULong as Bookmark;
Structs§
- Date
- SQL_DATE_STRUCT
- DaySecond
- SQL_DAY_SECOND_STRUCT
- Guid
- SQLGUID
- Interval
Struct - SQL_INTERVAL_STRUCT
- Lock
- Lock options in
crate::SQLSetPos
- Nullability
- Used by
SQLDescribeCol
. - Numeric
- Operation
- Operations used with
crate::SQLSetPos
- SqlData
Type - SqlReturn
- Indicates the overall success or failure of the function
- Time
- SQL_TIME_STRUCT
- Timestamp
- SQL_TIMESTAMP_STRUCT
- Year
Month - SQL_YEAR_MONTH_STRUCT
Enums§
- Async
Connection Behavior - Attr
Connection Pooling - Connection pool configuration
- Attr
CpMatch - Determines how a connection is chosen from a connection pool.
- Attr
Odbc Version - ODBC verions
- Bulk
Operation - Supported
BulkOperation
operations - CData
Type - The C data type is specified in the SQLBindCol and SQLGetData functions with the TargetType argument and in the SQLBindParameter function with the ValueType argument.
- Completion
Type - Completion types for
SQLEndTrans
- Connection
Attribute - Connection attributes for
SQLSetConnectAttr
- Dbc
- Desc
- Used in
SQLColAttributeW
. - Description
- Driver
Connect Option - Options for
SQLDriverConnect
- Dynamic
Diagnostic Identifier - Env
- Environment
Attribute - Governs behaviour of EnvironmentAttribute
- Fetch
Orientation - Codes used for FetchOrientation in
SQLFetchScroll
,SQLDataSources
and inSQLDrivers
- Free
Stmt Option - SQL Free Statement options
- Handle
Type - Represented in C headers as SQLSMALLINT
- Header
Diagnostic Identifier DiagIdentifier
forSQLGetDiagField
- Info
Type - Information requested by SQLGetInfo
- Interval
- Obj
- Param
Type - Used by
SQLBindParameter
. - Statement
Attribute - Statement attributes are characteristics of the statement. For example, whether to use bookmarks and what kind of cursor to use with the statement’s result set are statement attributes.
- Stmt
Constants§
- C_
TYPES_ EXTENDED - Extended C Types range 4000 and above. Range of -100 thru 200 is reserved by Driver Manager.
SQL_C_TYPES_EXTENDED
. - DATA_
AT_ EXEC - Use this as the indicator argument to
SQLBindParameter
in order to indicate that the data is send at statement execution time. - IS_
INTEGER - SQL_IS_INTEGER
- IS_
POINTER - SQL_IS_POINTER
- IS_
SMALLINT - SQL_IS_SMALLINT
- IS_
UINTEGER - SQL_IS_UINTEGER
- IS_
USMALLINT - SQL_IS_USMALLINT
- MAX_
MESSAGE_ LENGTH - Maximum message length
- MAX_
NUMERIC_ LEN - NO_
TOTAL - Indicates that the size of the value is not known. ODBC returns this value in indicator buffers for truncated values of unknown size.
- NTS
- NTSL
- NULL_
DATA - Indicates
NULL
values. - SQLSTATE_
SIZE - SQLSTATE_
SIZEW
Statics§
Functions§
- SQLAlloc
Handle ⚠ - Allocates an environment, connection, statement, or descriptor handle.
- SQLBind
Col ⚠ - Binds application data bufferst to columns in the result set.
- SQLBind
Parameter ⚠ - Binds a buffer to a parameter marker in an SQL statement
- SQLBrowse
ConnectW ⚠ - SQLBrowseConnect supports an iterative method of discovering and enumerating the attributes and attribute values required to connect to a data source. Each call to SQLBrowseConnect returns successive levels of attributes and attribute values.
- SQLBulk
Operations ⚠ - Performs bulk insertions and bulk bookmark operations, including update, delete, and fetch by bookmark.
- SQLCancel⚠
- Cancels the processing on a statement.
- SQLCancel
Handle ⚠ - Cancels the processing on a connection or statement.
- SQLClose
Cursor ⚠ - Closes a cursor that has been opened on a statement and discards pending results.
- SQLCol
Attribute ⚠ - 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.
- SQLCol
AttributeW ⚠ - 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.
- SQLColumn
PrivilegesW ⚠ - Returns a list of columns and associated privileges for the specified table. The driver returns the information as a result set on the specified StatementHandle.
- SQLColumns⚠
- Returns the list of column names in specified tables. The driver returns this information as a result set on the specified StatementHandle.
- SQLColumnsW⚠
- Returns the list of column names in specified tables. The driver returns this information as a result set on the specified StatementHandle.
- SQLComplete
Async ⚠ - Can be used to determine when an asynchronous function is complete using either notification- or polling-based processing.
- SQLConnect⚠
- SQLConnect establishes connections to a driver and a data source. The connection handle references storage of all information about the connection to the data source, including status, transaction state, and error information.
- SQLConnectW⚠
- SQLConnect establishes connections to a driver and a data source. The connection handle references storage of all information about the connection to the data source, including status, transaction state, and error information.
- SQLCopy
Desc ⚠ - Copies descriptor information from one descriptor handle to another.
- SQLData
Sources ⚠ - Returns information about a data source. This function is implemented only by the Driver Manager.
- SQLData
SourcesW ⚠ - Returns information about a data source. This function is implemented only by the Driver Manager.
- SQLDescribe
Col ⚠ - Returns the result descriptor for one column in the result set — column name, type, column size, decimal digits, and nullability.
- SQLDescribe
ColW ⚠ - Returns the result descriptor for one column in the result set — column name, type, column size, decimal digits, and nullability.
- SQLDescribe
Param ⚠ - Returns the description of a parameter marker associated with a prepared SQL statement. This information is also available in the fields of the IPD.
- SQLDisconnect⚠
- Closes the connection associated with a specific connection handle.
- SQLDriver
Connect ⚠ - An alternative to
SQLConnect
. It supports data sources that require more connection information than the three arguments inSQLConnect
, dialog boxes to prompt the user for all connection information, and data sources that are not defined in the system information - SQLDriver
ConnectW ⚠ - An alternative to
SQLConnect
. It supports data sources that require more connection information than the three arguments inSQLConnect
, dialog boxes to prompt the user for all connection information, and data sources that are not defined in the system information - SQLDrivers⚠
- Lists driver descriptions and driver attribute keywords. This function is implemented only by the Driver Manager.
- SQLDriversW⚠
- Lists driver descriptions and driver attribute keywords. This function is implemented only by the Driver Manager.
- SQLEnd
Tran ⚠ - Requests a commit or rollback operation for all active operations on all statements associated with a handle.
- SQLExec
Direct ⚠ - Executes a preparable statement, using the current values of the parameter marker variables if any parameters exist in the statement. This is the fastest way to submit an SQL statement for one-time execution
- SQLExec
DirectW ⚠ - Executes a preparable statement, using the current values of the parameter marker variables if any parameters exist in the statement. This is the fastest way to submit an SQL statement for one-time execution
- SQLExecute⚠
- Executes a prepared statement, using the current values of the parameter marker variables if any paramater markers exis in the statement.
- SQLFetch⚠
- SQLFetch fetches the next rowset of data from the result set and returns data for all bound columns.
- SQLFetch
Scroll ⚠ - 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.
- SQLForeign
Keys ⚠ - Can return:
- SQLForeign
KeysW ⚠ - Can return:
- SQLFree
Handle ⚠ - Frees resources associated with a specific environment, connection, statement, or descriptor handle.
- SQLFree
Stmt ⚠ - 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.
- SQLGet
Connect ⚠Attr - Returns the current setting of a connection attribute.
- SQLGet
Connect ⚠AttrW - Returns the current setting of a connection attribute.
- SQLGet
Cursor ⚠NameW - Returns the cursor name associated with a specified statement.
- SQLGet
Data ⚠ - SQLGet
Desc ⚠FieldW - Returns the current setting or value of a single field of a descriptor record.
- SQLGet
Desc ⚠RecW - 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.
- SQLGet
Diag ⚠FieldW - 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.
- SQLGet
Diag ⚠Rec - Return the current values of multiple fields of a diagnostic record that contains eror, warning, and status information.
- SQLGet
Diag ⚠RecW - Return the current values of multiple fields of a diagnostic record that contains eror, warning, and status information.
- SQLGet
EnvAttr ⚠ - Gets attributes that govern aspects of environments
- SQLGet
Info ⚠ - Returns general information about the driver and data source associated with a connection
- SQLGet
InfoW ⚠ - Returns general information about the driver and data source associated with a connection
- SQLGet
Stmt ⚠Attr - Returns the current setting of a statement attribute.
- SQLGet
Stmt ⚠AttrW - Returns the current setting of a statement attribute.
- SQLGet
Type ⚠Info - SQLGetTypeInfo 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.
- SQLMore
Results ⚠ - Determines whether more results are available on a statement containing SELECT, UPDATE, INSERT, or DELETE statements and, if so, initializes processing for those results.
- SQLNum
Params ⚠ - Returns the number of parameters in an SQL statement.
- SQLNum
Result ⚠Cols - Returns the number of columns in a result set
- SQLParam
Data ⚠ - Used together with
SQLPutData
to supply parameter data at statement execution time, and withSQLGetData
to retrieve streamed output parameter data. - SQLPrepare⚠
- Compiles the statement and generates an access plan.
- SQLPrepareW⚠
- Compiles the statement and generates an access plan.
- SQLPut
Data ⚠ - 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.
- SQLRow
Count ⚠ - Returns the number of rows affected by an UPDATE, INSERT, or DELETE statement; an
SQL_ADD
,SQL_UPDATE_BY_BOOKMARK
, orSQL_DELETE_BY_BOOKMARK
operation in SQLBulkOperations; or anSQL_UPDATE
orSQL_DELETE
operation inSQLSetPos
. - SQLSet
Connect ⚠Attr - Sets attributes that govern aspects of connections.
- SQLSet
Connect ⚠AttrW - Sets attributes that govern aspects of connections.
- SQLSet
Desc ⚠Field - Sets the value of a single field of a descriptor record.
- SQLSet
Desc ⚠FieldW - Sets the value of a single field of a descriptor record.
- SQLSet
EnvAttr ⚠ - Sets attributes that govern aspects of environments
- SQLSet
Pos ⚠ - Sets the cursor position in a rowset and allows an application to refresh, update or delete data in the rowset.
- SQLSet
Stmt ⚠Attr - Sets attributes related to a statement.
- SQLSet
Stmt ⚠AttrW - Sets attributes related to a statement.
- SQLTables⚠
- 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
- SQLTablesW⚠
- 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
- len_
data_ at_ exec - Use result as the indicator argument to
SQLBindParameter
in order to indicate that the data is send at statement execution time. In contrast toDATA_AT_EXEC
the total size is passed to the driver manager.
Type Aliases§
- Char
- HDbc
- The connection handle references storage of all information about the connection to the data source, including status, transaction state, and error information.
- HDesc
- HEnv
- HStmt
- HWnd
- Handle
- Integer
- Len
- Pointer
- RetCode
- SChar
- SetPosI
Row - Row index parameter for
crate::SQLSetPos
- Small
Int - UInteger
- ULen
- USmall
Int - WChar
Unions§
- Interval
Union - SQL_INTERVAL_UNION