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

# A short blurb about the package. This is not rendered in any format when
# uploaded to crates.io (aka this is not markdown).
description = "Query an ODBC data source and store the result in a Parquet file."

# 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", "parquet", "sql"]

# 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 = ["command-line-utilities"]

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

[dependencies]
anyhow = "1.0.66"
stderrlog = "0.5.4"
log = "0.4.17"
chrono = "0.4.22"
atoi = "2.0.0"
num-traits = "0.2.15"
clap_complete = "4.0.3"
bytesize = "1.1.0"
io-arg = "0.2.0"

[dependencies.clap]
version = "4.0.19"
features = ["derive", "env"]

[dependencies.parquet]
version = "26.0.0"
default-features = false
features =  ["snap", "brotli", "flate2", "lz4", "zstd", "base64"]

# 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 = "0.50.2"

# 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 = "0.50.2", features = ["narrow"] }

[dev-dependencies]
assert_cmd = "2.0.6"
lazy_static = "1.4.0"
predicates = "2.1.1"
tempfile = "3.3.0"

[profile.release]
# Panics should only be caused by logic errors and are considered bugs
panic = 'abort'
# Link time Optimization
lto = true
