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.
[ODBC Programmer's Reference] (https://docs.microsoft.com/en-us/sql/odbc/reference/odbc-programmer-s-reference)
While designed as a relatively low level wrapper around ODBC this crate tries to prevent many
errors 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 and state transitions are modeled in the type system. This should eliminate the possibility of function sequence errors in safe code.
[Basic ODBC Application Steps] (https://docs.microsoft.com/en-us/sql/odbc/reference/develop-app/basic-odbc-application-steps)
[ODBC State Transitions] (https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/appendix-b-odbc-state-transition-tables)
Reexport odbc-sys as ffi
Represents a connection to an ODBC data source
Used to retrieve data from the fields of a query result
Holds name and description of a datasource
ODBC Diagnostic Record
Struct holding information available on a driver.
Handle to an ODBC Environment
Allows retriving a diagnostic record, describing errors (or lack thereof) during the last operation.
Reflects the ability of a type to expose a valid handle
Indicates that a type can be retrieved using
Creates an ODBC Environment and declares specifaciton of version 3.0 are used
Result type returned by most functions in this crate
Environment state used to represent that environment has been set to odbc version 3