Crates.io | odbc-api-derive |
lib.rs | odbc-api-derive |
version | 9.0.1 |
source | src |
created_at | 2024-04-29 06:45:52.700152 |
updated_at | 2024-11-24 21:23:44.163672 |
description | Derive macros for odbc-api crate |
homepage | |
repository | https://github.com/pacman82/odbc-api |
max_upload_size | |
id | 1223881 |
size | 10,073 |
Rust ODBC bindings. ODBC (Open Database Connectivity) is an open standard to connect to a variaty of data sources. Most data sources offer ODBC drivers. There are two typical usage scenarios for ODBC:
See also: Is ODBC the Answer?
This crate is currently tested against:
Current ODBC Version is 3.80
.
This crate is build on top of the odbc-sys
ffi bindings, which provide definitions of the ODBC C Interface, but do not build any kind of abstraction on top of it.
Check the guide for code examples and a tour of the features.
To build this library you need to link against the odbc
library of your systems ODBC driver manager. It should be automatically detected by the build. On Windows systems it is preinstalled. On Linux and OS-X unix-odbc must be installed. To create a Connections to a data source, its ODBC driver must also be installed.
Nothing to do. ODBC driver manager is preinstalled.
sudo apt-get install unixodbc-dev
You can use homebrew to install UnixODBC
brew install unixodbc
cargo build
is not going to pick up libodbc.so
installed via homebrew due to the fact that homebrew on ARM Mac installs into /opt/homebrew/Cellar
as opposed to /usr/local/opt/
.
You find documentation on what directories are searched during build here: https://doc.rust-lang.org/cargo/reference/environment-variables.html#dynamic-library-paths.
You can also install unixODBC from source:
./configure
make
make install
Alternatively, if you're familiar with the Nix ecosystem or want to try it out, our wiki has a user contributed example on setting up a dev environment with Nix flakes.
log
crate).