Crate odbc [−] [src]
ODBC
Open Database Connectivity or short ODBC is a low level high performance interface introduced by Microsoft to access relational data stores. This crate wraps the raw C interface and is intended to be usable in safe and idiomatic Rust.
Internal Desgin
While designed as a relatively low level wrapper around ODBC this crate tries to prevent many
at compile time. The borrow checker and the RAII (Resource Acquisition Is Initialization) idiom
should prevent any occurence of SQL_INVALID_HANDLE
in safe code.
Using the type system and the borrow checker this crate ensures that each method call happens in a valid state. This should eliminate function sequence errors in safe code. It is impossible to e.g. allocate a Statement handle before connecting to a data source. See:
Modules
ffi |
Reexport odbc-sys as ffi |
Structs
Cursor |
Used to retrieve data from the fields of a query result |
DataSource |
Represents a connection to an ODBC data source |
DataSourceInfo |
Holds name and description of a datasource |
DiagnosticRecord |
ODBC Diagnostic Record |
DriverInfo |
Struct holding information available on a driver. |
EnvAllocError |
Environment allocation error |
Environment |
Handle to an ODBC Environment |
Statement |
RAII wrapper around ODBC statement |
Enums
Allocated |
|
Connected |
DataSource state used to represent a connection to a data source. |
Disconnected |
DataSource state used to represent a data source handle which not connected to a data source. |
HasResult |
|
NoResult |
|
NoVersion |
Environment state used to represent that no odbc version has been set. |
Prepared |
|
ResultSetState |
Holds a |
Version3 |
Environment state used to represent that environment has been set to odbc version 3 |
Traits
GetDiagRec | |
Handle |
Reflects the ability of a type to expose a valid handle |
InputParameter |
Allows types to be used with |
Output |
Indicates that a type can be retrieved using |
Type Definitions
Executed |
|
Result |
Result type returned by most functions in this crate |