[package]
edition.workspace = true
name = "saola-sql-query-connector"
version = "0.1.1"
authors.workspace = true
license.workspace = true
repository.workspace = true
description = "SQL database connector for Saola query engine (PostgreSQL, MySQL, SQLite, MSSQL)"
keywords = ["connector", "sql", "database", "orm", "query-engine"]

[features]
postgresql = ["relation_joins", "quaint/postgresql", "psl/postgresql"]
postgresql-native = ["postgresql", "quaint/postgresql-native", "quaint/pooled"]
mysql = ["relation_joins", "quaint/mysql", "psl/mysql"]
mysql-native = ["mysql", "quaint/mysql-native", "quaint/pooled"]
sqlite = ["quaint/sqlite", "psl/sqlite"]
sqlite-native = ["sqlite", "quaint/sqlite-native", "quaint/pooled"]
mssql = ["quaint/mssql", "psl/mssql"]
mssql-native = ["mssql", "quaint/mssql-native", "quaint/pooled"]
cockroachdb = ["relation_joins", "quaint/postgresql", "psl/cockroachdb"]
cockroachdb-native = [
    "cockroachdb",
    "quaint/postgresql-native",
    "quaint/pooled",
]
vendored-openssl = ["quaint/vendored-openssl"]
all-native = [
    "sqlite-native",
    "mysql-native",
    "postgresql-native",
    "mssql-native",
    "cockroachdb-native",
]
# TODO: At the moment of writing (rustc 1.77.0), can_have_capability from psl does not eliminate joins
# code from bundle for some reason, so we are doing it explicitly. Check with a newer version of compiler - if elimination
# happens successfully, we don't need this feature anymore
relation_joins = ["sql-query-builder/relation_joins"]
# Enable Driver Adapters
driver-adapters = []
telemetry = ["dep:telemetry", "quaint/telemetry"]
metrics = ["quaint/metrics"]

[dependencies]
base64.workspace = true
psl.workspace = true
anyhow.workspace = true
async-trait.workspace = true
bigdecimal.workspace = true
futures.workspace = true
itertools.workspace = true
rand.workspace = true
serde_json.workspace = true
thiserror.workspace = true
tokio = { workspace = true, features = ["macros", "time"] }
tracing = { workspace = true, features = ["log"] }
tracing-futures.workspace = true
uuid.workspace = true

ulid.workspace = true
quaint = { workspace = true, default-features = false }

[dev-dependencies]
expect-test.workspace = true

[dependencies.connector-interface]
package = "saola-query-connector"
path = "../query-connector"
version = "0.1.0"

[dependencies.query-structure]
workspace = true

[dependencies.query-builder]
workspace = true

[dependencies.sql-query-builder]
workspace = true

[dependencies.prisma-value]
workspace = true

[dependencies.telemetry]
workspace = true
optional = true

[dependencies.chrono]
workspace = true
features = ["serde"]

[dependencies.serde]
workspace = true
features = ["derive"]

[dependencies.user-facing-errors]
workspace = true
features = ["sql"]

[dependencies.panic-utils]
workspace = true
