[workspace]
members = [
    ".",
    "sea-query-test",
    "sea-query-derive",
    "examples/postgres",
    "examples/postgres_json",
    "examples/sqlx_mysql",
    "examples/sqlx_postgres",
]

[package]
name = "sea-query"
version = "0.9.6"
authors = [ "Billy Chan <ccw.billy.123@gmail.com>", "Chris Tsang <tyt2y7@gmail.com>" ]
edition = "2018"
description = "A database agnostic runtime query builder for Rust"
license = "MIT OR Apache-2.0"
documentation = "https://docs.rs/sea-query"
repository = "https://github.com/SeaQL/sea-query"
categories = [ "database" ]
keywords = [ "database", "sql", "mysql", "postgres", "sqlite" ]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[lib]
name = "sea_query"
path = "src/lib.rs"

[dependencies]
sea-query-derive = { version = "0.1.2", path = "sea-query-derive", default-features = false, optional = true }
serde_json = { version = "^1", optional = true }
bytes = { version = "^1", optional = true }
chrono = { version = "^0", optional = true }
postgres-types = { version = "^0", optional = true }

[dev-dependencies]
sea-query-test = { path = "sea-query-test", default-features = false }

[features]
backend-mysql = [ ]
backend-postgres = [ ]
backend-sqlite = [ ]
default = [ "derive", "backend-mysql", "backend-postgres", "backend-sqlite" ]
derive = [ "sea-query-derive" ]
postgres = [ "bytes", "postgres-types" ]
postgres-chrono = [ "with-chrono", "postgres-types/with-chrono-0_4" ]
postgres-json = [ "with-json", "postgres-types/with-serde_json-1" ]
sqlx-chrono = [ "with-chrono" ]
sqlx-json = [ "with-json" ]
sqlx-mysql = [ ]
sqlx-postgres = [ ]
with-chrono = [ "chrono" ]
with-json = [ "serde_json" ]

[[example]]
name = "derive"
required-features = [ "derive" ]

[[test]]
name = "test-derive"
path = "tests/derive/mod.rs"
required-features = [ "derive" ]

[[test]]
name = "test-mysql"
path = "tests/mysql/mod.rs"
required-features = [ ]

[[test]]
name = "test-postgres"
path = "tests/postgres/mod.rs"
required-features = [ ]

[[test]]
name = "test-sqlite"
path = "tests/sqlite/mod.rs"
required-features = [ ]
