[workspace]
members = [
    ".",
    "tests/discovery/mysql",
    "tests/discovery/postgres",
    "tests/discovery/sqlite",
    "tests/writer/mysql",
    "tests/writer/postgres",
    "tests/writer/sqlite",
    "tests/live/mysql",
    "tests/live/postgres",
    "tests/live/sqlite",
]

[package]
name = "sea-schema"
version = "0.14.1"
authors = [ "Chris Tsang <tyt2y7@gmail.com>" ]
edition = "2021"
description = "🌿 SQL schema definition and discovery"
license = "MIT OR Apache-2.0"
documentation = "https://docs.rs/sea-schema"
repository = "https://github.com/SeaQL/sea-schema"
categories = ["database"]
keywords = ["database", "sql", "mysql", "postgres"]
rust-version = "1.62"

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

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

[dependencies]
futures = { version = "0.3", default-features = false, optional = true, features = ["alloc"] }
sea-schema-derive = { version = "0.2.0", path = "sea-schema-derive", default-features = false }
sea-query = { version = "0.30.0", default-features = false, features = ["derive"] }
sea-query-binder = { version = "0.5.0", default-features = false, optional = true }
serde = { version = "1", default-features = false, optional = true, features = ["derive"] }
sqlx = { version = "0.7", default-features = false, optional = true }
log = { version = "0.4", default-features = false, optional = true }

[features]
default = ["mysql", "postgres", "sqlite", "discovery", "writer", "probe"]
debug-print = ["log"]
mysql = ["sea-query/backend-mysql"]
postgres = ["sea-query/backend-postgres"]
sqlite = ["sea-query/backend-sqlite"]
def = []
discovery = ["futures", "parser"]
parser = ["query"]
query = ["def"]
writer = ["def"]
probe = ["query"]
sqlx-dep = ["sqlx"]
sqlx-all = ["sqlx-mysql", "sqlx-postgres", "sqlx-sqlite"]
sqlx-mysql = [
    "mysql",
    "futures",
    "sqlx-dep",
    "sea-query-binder/sqlx-mysql",
    "sqlx/mysql",
]
sqlx-postgres = [
    "postgres",
    "futures",
    "sqlx-dep",
    "sea-query-binder/sqlx-postgres",
    "sqlx/postgres",
]
sqlx-sqlite = [
    "sqlite",
    "futures",
    "sqlx-dep",
    "sea-query-binder/sqlx-sqlite",
    "sqlx/sqlite",
]
runtime-actix-native-tls = [
    "sqlx/runtime-tokio-native-tls",
    "sea-query-binder/runtime-actix-native-tls",
]
runtime-async-std-native-tls = [
    "sqlx/runtime-async-std-native-tls",
    "sea-query-binder/runtime-async-std-native-tls",
]
runtime-tokio-native-tls = [
    "sqlx/runtime-tokio-native-tls",
    "sea-query-binder/runtime-tokio-native-tls",
]
runtime-actix-rustls = [
    "sqlx/runtime-tokio-rustls",
    "sea-query-binder/runtime-actix-rustls",
]
runtime-async-std-rustls = [
    "sqlx/runtime-async-std-rustls",
    "sea-query-binder/runtime-async-std-rustls",
]
runtime-tokio-rustls = [
    "sqlx/runtime-tokio-rustls",
    "sea-query-binder/runtime-tokio-rustls",
]
with-serde = ["serde"]
