[package]
name = "olai-uc-postgres"
version = "0.0.1"
description = "PostgreSQL-backed resource and secret store for the Unity Catalog server."
edition.workspace = true
homepage.workspace = true
keywords.workspace = true
license.workspace = true
repository.workspace = true
readme.workspace = true
rust-version.workspace = true

[lib]
# Stable Rust crate identifier, independent of the provisional package name.
name = "unitycatalog_postgres"

[dependencies]
# path dependencies (in alphabetical order)
unitycatalog-common = { package = "olai-uc-common", path = "../common", version = "0.0.1", default-features = false, features = [
  "store",
] }

# workspace dependencies (in alphabetical order)
async-trait = { workspace = true }
bytes = { workspace = true }
chrono = { workspace = true }
itertools = { workspace = true }
olai-http = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true, features = ["raw_value", "preserve_order"] }
thiserror = { workspace = true }
tracing = { workspace = true }
url = { workspace = true }

# crates.io dependencies (in alphabetical order)
base64 = "0.22"
olai-store = { workspace = true }
paste = "1.0"
sqlx = { workspace = true, features = [
  "postgres",
  "chrono",
  "uuid",
  "json",
  "runtime-tokio-rustls",
  "migrate",
  "macros",
] }
uuid = { version = "1.8", features = ["serde"] }

[dev-dependencies]
tokio = { version = "1", features = ["rt-multi-thread", "parking_lot"] }

[features]
default = ["sqlx"]
sqlx = ["unitycatalog-common/sqlx", "olai-store/sqlx"]

# Postgres-backed integration tests. Require a live database (provisioned by
# `#[sqlx::test]`); run with `DATABASE_URL` set, e.g. via `just build-sqlx`'s
# database or a local Postgres.
integration-pg = []
