[package]
name = "arrow-odbc"
version = "10.0.0"
authors = ["Markus Klein"]
edition = "2021"
license = "MIT"
repository = "https://github.com/pacman82/arrow-odbc"
documentation = "https://docs.rs/arrow-odbc/"

# A short blurb about the package. This is not rendered in any format when
# uploaded to crates.io (aka this is not markdown).
description = "Read/Write Apache Arrow arrays from/to ODBC data sources."

# This is a list of up to five keywords that describe this crate. Keywords
# are searchable on crates.io, and you may choose any words that would
# help someone find this crate.
keywords = ["odbc", "database", "sql", "arrow"]

# This is a list of up to five categories where this crate would fit.
# Categories are a fixed list available at crates.io/category_slugs, and
# they must match exactly.
categories = ["database"]

# This points to a file under the package root (relative to this `Cargo.toml`).
# The contents of this file are stored and indexed in the registry.
# crates.io will render this file and place the result on the crate's page.
readme = "Readme.md"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
arrow = { version = ">= 29, < 52", default-features = false }
chrono = "0.4.38"
log = "0.4.21"
thiserror = "1.0.58"

# On windows we can not assume the default locale to be UTF-8, so we compile odbc-api with default
# features implying the use of UTF-16 for queries, connection strings and error messages. This
# should work on any system
[target.'cfg(target_os = "windows")'.dependencies]
odbc-api = ">= 6, < 8"

# On linux we assume use of a UTF-8 locale. So we set the narrow features implying that for queries,
# connection strings and error messages the driver and driver manager supply utf8-strings. This
# might also be slightly faster since no transcoding between UTF-8 and UTF-16 is required.
# Overall speed always depends on the driver, but it is reasonable to assume this is faster, more
# importantly, UTF-8 is likely to be more battled tested on these platforms, while UTF-16 is "only"
# required by the standard.
[target.'cfg(not(target_os = "windows"))'.dependencies]
odbc-api = { version = ">= 6, < 8", features = ["narrow"] }

[dev-dependencies]
anyhow = "1.0.82"
# Used to share one ODBC environment in tests
lazy_static = "1.4.0"
# Function name macro is used to ensure unique table names in test
stdext = "0.3.3"
float_eq = "1.0.1"

[features]
