[package]
edition = "2021"
name = "sz-orm-core"
version = "5.1.0"
authors = ["SZ-ORM Team"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Core ORM engine: Model trait, ActiveRecord, QueryBuilder, Pool, Transaction, migration, and SQL dialect abstraction"
homepage = "https://github.com/ljclz/sz-orm"
readme = "README.md"
keywords = [
"orm",
"database",
"async",
"sql",
"tokio",
]
categories = [
"database",
"asynchronous",
]
license = "MIT"
repository = "https://github.com/ljclz/sz-orm"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
"--cfg",
"docsrs",
]
[package.metadata.cargo-machete]
ignored = [
"sz-orm-health",
"sz-orm-limit",
"quote",
]
[features]
adaptive-query = ["dep:sz-orm-adaptive"]
anomaly-detection = ["dep:sz-orm-anomaly"]
auto-prewarm = []
benchmark-suite = ["dep:criterion"]
cache-coherence = []
circuit-breaker = ["sz-orm-health"]
compile-governance = ["sz-orm-macros/governance-derive"]
config-center = ["dep:sz-orm-config"]
connection-level-tenant = ["multi-tenant-enhanced"]
data-seeding = [
"dep:rand",
"dep:serde_yaml",
]
data-validation = [
"sz-orm-macros/data-validation",
"dep:regex",
]
db-verify = ["sz-orm-macros/db-verify"]
default = [
"redis",
"simd",
"l1-cache",
"plan-cache",
"zero-copy",
"auto-prewarm",
"perf-zero-copy-l2",
"perf-enum-dispatch",
"perf-box-str",
"dialect-cockroachdb",
"dialect-yugabytedb",
"dialect-snowflake",
"dialect-redshift",
"dialect-informix",
"dialect-saphana",
"dialect-firebird",
"prod-redis-tls",
"prod-jwt-key-rotation",
"prod-metrics-acl",
"prod-shutdown-timeout",
"prod-leak-detection",
"prod-n1-tuning",
"prod-pool-tuning",
"prod-config-masking",
"prod-log-level",
"prod-health-endpoint",
"prod-probe-endpoint",
"prod-circuit-tuning",
"prod-rate-limit-tuning",
"prod-dialect-security",
"cache-coherence",
"performance",
]
dialect-cockroachdb = []
dialect-firebird = []
dialect-informix = []
dialect-redshift = []
dialect-saphana = []
dialect-snowflake = []
dialect-yugabytedb = []
dist-cache = [
"dep:rand",
"dep:sz-orm-crypto",
]
distributed-tracing = ["dep:sz-orm-tracing"]
e2e-real-db = []
forward-compat-sandbox = [
"zero-downtime-rollback",
"migration-dry-run",
]
graph = ["dep:sz-orm-graph"]
graphql = ["dep:sz-orm-graphql"]
l1-cache = []
migration-branch = []
migration-dry-run = ["dep:regex"]
multi-tenant-enhanced = [
"dep:sz-orm-audit",
"dep:sz-orm-masking",
]
n1-lint = ["sz-orm-macros/n1-lint"]
owasp-pentest-suite = []
perf-box-str = []
perf-enum-dispatch = []
perf-smallstring = ["dep:compact_str"]
perf-zero-copy-l2 = []
performance = [
"simd",
"l1-cache",
"plan-cache",
"zero-copy",
]
plan-cache = [
"dep:sqlparser",
"dep:twox-hash",
]
postgis = ["dep:sz-orm-postgis"]
prod-circuit-tuning = []
prod-config-masking = []
prod-dialect-security = []
prod-health-endpoint = []
prod-jwt-key-rotation = []
prod-leak-detection = []
prod-log-level = []
prod-metrics-acl = []
prod-n1-tuning = []
prod-pool-tuning = []
prod-probe-endpoint = []
prod-rate-limit-tuning = []
prod-ready = [
"prod-redis-tls",
"prod-jwt-key-rotation",
"prod-metrics-acl",
"prod-shutdown-timeout",
"prod-leak-detection",
"prod-n1-tuning",
"prod-pool-tuning",
"prod-config-masking",
"prod-log-level",
"prod-health-endpoint",
"prod-probe-endpoint",
"prod-circuit-tuning",
"prod-rate-limit-tuning",
"prod-dialect-security",
]
prod-redis-tls = []
prod-shutdown-timeout = []
qb-migration-tool = [
"dep:syn",
"dep:quote",
]
rate-limit = ["sz-orm-limit"]
read-write-splitting = ["dep:sz-orm-rw"]
redis = ["dep:redis"]
schema-diff-viz = []
search = ["dep:sz-orm-search"]
simd = []
sql-verify-proc = [
"dep:sqlparser",
"dep:twox-hash",
]
streaming-export = ["dep:csv"]
structured-logging = ["dep:sz-orm-logger"]
tenant-quota-rls-enhanced = ["connection-level-tenant"]
testing = ["tokio/full"]
timeseries = ["dep:sz-orm-timeseries"]
type-safe-columns = ["sz-orm-macros/type-safe-columns"]
typed-dsl = []
typed-relation = []
validate-on-write = ["data-validation"]
zero-copy = []
zero-downtime-rollback = []
[lib]
name = "sz_orm_core"
path = "src/lib.rs"
[[test]]
name = "adaptive_adapter_e2e"
path = "tests/adaptive_adapter_e2e.rs"
required-features = ["adaptive-query"]
[[test]]
name = "blackhat_sql_injection"
path = "tests/blackhat_sql_injection.rs"
[[test]]
name = "chaos"
path = "tests/chaos.rs"
[[test]]
name = "chaos_pool"
path = "tests/chaos_pool.rs"
[[test]]
name = "compile_governance"
path = "tests/compile_governance.rs"
[[test]]
name = "compile_time_verify"
path = "tests/compile_time_verify.rs"
[[test]]
name = "config_adapter_e2e"
path = "tests/config_adapter_e2e.rs"
required-features = ["config-center"]
[[test]]
name = "contracts"
path = "tests/contracts.rs"
[[test]]
name = "core_tests"
path = "tests/core.rs"
[[test]]
name = "derive_relation_trait_test"
path = "tests/derive_relation_trait_test.rs"
[[test]]
name = "dialect_cockroachdb"
path = "tests/dialect_cockroachdb_test.rs"
required-features = ["dialect-cockroachdb"]
[[test]]
name = "dialect_firebird_test"
path = "tests/dialect_firebird_test.rs"
required-features = ["dialect-firebird"]
[[test]]
name = "dialect_informix_test"
path = "tests/dialect_informix_test.rs"
required-features = ["dialect-informix"]
[[test]]
name = "dialect_redshift"
path = "tests/dialect_redshift_test.rs"
required-features = ["dialect-redshift"]
[[test]]
name = "dialect_saphana_test"
path = "tests/dialect_saphana_test.rs"
required-features = ["dialect-saphana"]
[[test]]
name = "dialect_snowflake"
path = "tests/dialect_snowflake_test.rs"
required-features = ["dialect-snowflake"]
[[test]]
name = "dialect_yugabytedb"
path = "tests/dialect_yugabytedb_test.rs"
required-features = ["dialect-yugabytedb"]
[[test]]
name = "e2e_batch_upsert"
path = "tests/e2e_batch_upsert.rs"
[[test]]
name = "e2e_eager_cycle"
path = "tests/e2e_eager_cycle.rs"
[[test]]
name = "e2e_keyset"
path = "tests/e2e_keyset.rs"
[[test]]
name = "e2e_migration"
path = "tests/e2e_migration.rs"
[[test]]
name = "e2e_real_db_cache"
path = "tests/e2e_real_db_cache.rs"
required-features = [
"e2e-real-db",
"l1-cache",
]
[[test]]
name = "e2e_real_db_crud"
path = "tests/e2e_real_db_crud.rs"
required-features = ["e2e-real-db"]
[[test]]
name = "e2e_real_db_dialect_behavior"
path = "tests/e2e_real_db_dialect_behavior.rs"
required-features = ["e2e-real-db"]
[[test]]
name = "e2e_real_db_eager_load"
path = "tests/e2e_real_db_eager_load.rs"
required-features = ["e2e-real-db"]
[[test]]
name = "e2e_real_db_multi_tenant"
path = "tests/e2e_real_db_multi_tenant.rs"
required-features = [
"e2e-real-db",
"multi-tenant-enhanced",
]
[[test]]
name = "e2e_real_db_pagination"
path = "tests/e2e_real_db_pagination.rs"
required-features = ["e2e-real-db"]
[[test]]
name = "e2e_real_db_soft_delete"
path = "tests/e2e_real_db_soft_delete.rs"
required-features = ["e2e-real-db"]
[[test]]
name = "e2e_real_db_transaction"
path = "tests/e2e_real_db_transaction.rs"
required-features = ["e2e-real-db"]
[[test]]
name = "e2e_transaction"
path = "tests/e2e_transaction.rs"
[[test]]
name = "eager_loader_test"
path = "tests/eager_loader_test.rs"
[[test]]
name = "explain_warning_verify"
path = "tests/explain_warning_verify.rs"
[[test]]
name = "formal"
path = "tests/formal.rs"
[[test]]
name = "from_query_result"
path = "tests/from_query_result.rs"
[[test]]
name = "from_row"
path = "tests/from_row.rs"
[[test]]
name = "fuzz"
path = "tests/fuzz.rs"
[[test]]
name = "graph_adapter_e2e"
path = "tests/graph_adapter_e2e.rs"
required-features = ["graph"]
[[test]]
name = "graphql_adapter_e2e"
path = "tests/graphql_adapter_e2e.rs"
required-features = ["graphql"]
[[test]]
name = "integration_duckdb"
path = "tests/integration_duckdb.rs"
[[test]]
name = "integration_mssql"
path = "tests/integration_mssql.rs"
[[test]]
name = "integration_mysql"
path = "tests/integration_mysql.rs"
[[test]]
name = "integration_oracle"
path = "tests/integration_oracle.rs"
[[test]]
name = "integration_pg"
path = "tests/integration_pg.rs"
[[test]]
name = "integration_redis"
path = "tests/integration_redis.rs"
[[test]]
name = "integration_sqlite"
path = "tests/integration_sqlite.rs"
[[test]]
name = "jepsen"
path = "tests/jepsen.rs"
[[test]]
name = "join_relation_test"
path = "tests/join_relation_test.rs"
[[test]]
name = "l1_cache"
path = "tests/l1_cache_test.rs"
required-features = ["l1-cache"]
[[test]]
name = "l1_l2_db"
path = "tests/l1_l2_db_test.rs"
required-features = ["l1-cache"]
[[test]]
name = "logger_adapter_e2e"
path = "tests/logger_adapter_e2e.rs"
required-features = ["structured-logging"]
[[test]]
name = "mutation"
path = "tests/mutation.rs"
[[test]]
name = "n1_lint_cross_verify"
path = "tests/n1_lint_cross_verify.rs"
[[test]]
name = "nested_active_model_test"
path = "tests/nested_active_model_test.rs"
[[test]]
name = "owasp_a01_access_control"
path = "tests/owasp_a01_access_control.rs"
[[test]]
name = "owasp_a03_injection"
path = "tests/owasp_a03_injection.rs"
[[test]]
name = "owasp_a04_insecure_design"
path = "tests/owasp_a04_insecure_design.rs"
[[test]]
name = "owasp_a05_misconfig"
path = "tests/owasp_a05_misconfig.rs"
[[test]]
name = "owasp_race_conditions"
path = "tests/owasp_race_conditions.rs"
[[test]]
name = "param_binding"
path = "tests/param_binding.rs"
[[test]]
name = "partial_model_test"
path = "tests/partial_model_test.rs"
[[test]]
name = "performance_subfeatures"
path = "tests/performance_subfeatures.rs"
[[test]]
name = "performance_validation"
path = "tests/performance_validation.rs"
[[test]]
name = "phantom1_wiring"
path = "tests/phantom1_wiring.rs"
[[test]]
name = "plan_cache_differential"
path = "tests/plan_cache_differential.rs"
required-features = ["plan-cache"]
[[test]]
name = "plugin_system_test"
path = "tests/plugin_system_test.rs"
[[test]]
name = "postgis_adapter_e2e"
path = "tests/postgis_adapter_e2e.rs"
required-features = ["postgis"]
[[test]]
name = "prewarm_integration"
path = "tests/prewarm_integration.rs"
required-features = ["auto-prewarm"]
[[test]]
name = "property"
path = "tests/property.rs"
[[test]]
name = "qb_migration_diff"
path = "tests/qb_migration_diff_test.rs"
required-features = ["qb-migration-tool"]
[[test]]
name = "qb_migration_fix"
path = "tests/qb_migration_fix_test.rs"
required-features = ["qb-migration-tool"]
[[test]]
name = "qb_migration_lint"
path = "tests/qb_migration_lint_test.rs"
required-features = ["qb-migration-tool"]
[[test]]
name = "rw_adapter_e2e"
path = "tests/rw_adapter_e2e.rs"
required-features = ["read-write-splitting"]
[[test]]
name = "search_adapter_e2e"
path = "tests/search_adapter_e2e.rs"
required-features = ["search"]
[[test]]
name = "security_attacks"
path = "tests/security_attacks.rs"
[[test]]
name = "simd_differential"
path = "tests/simd_differential.rs"
required-features = ["simd"]
[[test]]
name = "smallstring_differential"
path = "tests/smallstring_differential.rs"
[[test]]
name = "smart_eager_integration_mssql"
path = "tests/smart_eager_integration_mssql.rs"
[[test]]
name = "smart_eager_integration_mysql"
path = "tests/smart_eager_integration_mysql.rs"
[[test]]
name = "smart_eager_integration_oracle"
path = "tests/smart_eager_integration_oracle.rs"
[[test]]
name = "smart_eager_integration_pg"
path = "tests/smart_eager_integration_pg.rs"
[[test]]
name = "smart_eager_integration_sqlite"
path = "tests/smart_eager_integration_sqlite.rs"
[[test]]
name = "smart_eager_test_infra"
path = "tests/smart_eager_test_infra.rs"
[[test]]
name = "soak"
path = "tests/soak.rs"
[[test]]
name = "sql_type"
path = "tests/sql_type.rs"
[[test]]
name = "sql_verify_proc_test"
path = "tests/sql_verify_proc_test.rs"
required-features = ["sql-verify-proc"]
[[test]]
name = "stress"
path = "tests/stress.rs"
[[test]]
name = "tenant_concurrency"
path = "tests/tenant_concurrency.rs"
required-features = ["multi-tenant-enhanced"]
[[test]]
name = "tenant_quota_rls_regression"
path = "tests/tenant_quota_rls_regression.rs"
required-features = ["multi-tenant-enhanced"]
[[test]]
name = "timeseries_adapter_e2e"
path = "tests/timeseries_adapter_e2e.rs"
required-features = ["timeseries"]
[[test]]
name = "tracing_adapter_e2e"
path = "tests/tracing_adapter_e2e.rs"
required-features = ["distributed-tracing"]
[[test]]
name = "type_safe_columns"
path = "tests/type_safe_columns.rs"
required-features = ["type-safe-columns"]
[[test]]
name = "typed_ast_aggregate"
path = "tests/typed_ast_aggregate_test.rs"
required-features = ["typed-dsl"]
[[test]]
name = "typed_ast_arithmetic"
path = "tests/typed_ast_arithmetic_test.rs"
required-features = ["typed-dsl"]
[[test]]
name = "typed_ast_date"
path = "tests/typed_ast_date_test.rs"
required-features = ["typed-dsl"]
[[test]]
name = "typed_ast_sql_injection"
path = "tests/typed_ast_sql_injection_test.rs"
required-features = ["typed-dsl"]
[[test]]
name = "typed_ast_string"
path = "tests/typed_ast_string_test.rs"
required-features = ["typed-dsl"]
[[test]]
name = "typed_ast_zst_assert"
path = "tests/typed_ast_zst_assert_test.rs"
required-features = ["typed-dsl"]
[[test]]
name = "typed_ast_zst_diff"
path = "tests/typed_ast_zst_diff_test.rs"
required-features = ["typed-dsl"]
[[test]]
name = "typed_query"
path = "tests/typed_query.rs"
[[test]]
name = "typed_relation_test"
path = "tests/typed_relation_test.rs"
required-features = ["typed-relation"]
[[test]]
name = "whitehat_security_validation"
path = "tests/whitehat_security_validation.rs"
[[bench]]
name = "box_str_bench"
path = "benches/box_str_bench.rs"
harness = false
[[bench]]
name = "core_bench"
path = "benches/core_bench.rs"
harness = false
[[bench]]
name = "enum_dispatch_bench"
path = "benches/enum_dispatch_bench.rs"
harness = false
[[bench]]
name = "l1_cache_bench"
path = "benches/l1_cache_bench.rs"
harness = false
required-features = ["l1-cache"]
[[bench]]
name = "regression_cache"
path = "benches/regression_cache.rs"
harness = false
required-features = ["benchmark-suite"]
[[bench]]
name = "regression_pool"
path = "benches/regression_pool.rs"
harness = false
required-features = ["benchmark-suite"]
[[bench]]
name = "regression_query_build"
path = "benches/regression_query_build.rs"
harness = false
required-features = ["benchmark-suite"]
[[bench]]
name = "regression_serialization"
path = "benches/regression_serialization.rs"
harness = false
required-features = ["benchmark-suite"]
[[bench]]
name = "regression_stream"
path = "benches/regression_stream.rs"
harness = false
required-features = ["benchmark-suite"]
[[bench]]
name = "regression_transaction"
path = "benches/regression_transaction.rs"
harness = false
required-features = ["benchmark-suite"]
[[bench]]
name = "simd_bench"
path = "benches/simd_bench.rs"
harness = false
required-features = ["simd"]
[[bench]]
name = "smallstring_bench"
path = "benches/smallstring_bench.rs"
harness = false
[[bench]]
name = "typed_overhead_bench"
path = "benches/typed_overhead_bench.rs"
harness = false
[[bench]]
name = "zero_copy_bench"
path = "benches/zero_copy_bench.rs"
harness = false
required-features = ["zero-copy"]
[[bench]]
name = "zero_copy_l2_bench"
path = "benches/zero_copy_l2_bench.rs"
harness = false
[dependencies.async-trait]
version = "0.1"
[dependencies.bytes]
version = "1"
[dependencies.chrono]
version = "0.4"
features = ["serde"]
[dependencies.compact_str]
version = "0.8"
optional = true
[dependencies.criterion]
version = "0.5"
features = [
"html_reports",
"async_tokio",
]
optional = true
[dependencies.crossbeam-queue]
version = "0.3"
[dependencies.csv]
version = "1.3"
optional = true
[dependencies.futures]
version = "0.3"
[dependencies.parking_lot]
version = "0.12"
[dependencies.quote]
version = "1.0"
optional = true
default-features = false
[dependencies.rand]
version = "0.8"
optional = true
[dependencies.redis]
version = "0.27"
features = [
"tokio-comp",
"connection-manager",
]
optional = true
[dependencies.regex]
version = "1"
optional = true
[dependencies.serde]
version = "1"
features = [
"derive",
"std",
]
[dependencies.serde_json]
version = "1"
[dependencies.serde_yaml]
version = "0.9"
optional = true
[dependencies.sqlparser]
version = "0.47"
optional = true
[dependencies.syn]
version = "2.0"
features = [
"full",
"parsing",
"visit",
]
optional = true
[dependencies.sz-orm-adaptive]
version = "5.1.0"
optional = true
[dependencies.sz-orm-anomaly]
version = "5.1.0"
optional = true
[dependencies.sz-orm-audit]
version = "5.1.0"
optional = true
[dependencies.sz-orm-config]
version = "5.1.0"
optional = true
[dependencies.sz-orm-crypto]
version = "5.1.0"
optional = true
[dependencies.sz-orm-graph]
version = "5.1.0"
optional = true
[dependencies.sz-orm-graphql]
version = "5.1.0"
optional = true
[dependencies.sz-orm-health]
version = "5.1.0"
optional = true
[dependencies.sz-orm-limit]
version = "5.1.0"
optional = true
[dependencies.sz-orm-logger]
version = "5.1.0"
optional = true
[dependencies.sz-orm-macros]
version = "5.1.0"
[dependencies.sz-orm-masking]
version = "5.1.0"
optional = true
[dependencies.sz-orm-postgis]
version = "5.1.0"
optional = true
[dependencies.sz-orm-rw]
version = "5.1.0"
optional = true
[dependencies.sz-orm-search]
version = "5.1.0"
optional = true
[dependencies.sz-orm-sql-validator]
version = "5.1.0"
[dependencies.sz-orm-timeseries]
version = "5.1.0"
optional = true
[dependencies.sz-orm-tracing]
version = "5.1.0"
optional = true
[dependencies.thiserror]
version = "2"
[dependencies.tokio]
version = "1.40"
features = [
"full",
"sync",
"time",
"rt",
"macros",
]
[dependencies.tracing]
version = "0.1"
features = ["attributes"]
[dependencies.twox-hash]
version = "1.6"
optional = true
[dev-dependencies.criterion]
version = "0.5"
features = [
"html_reports",
"async_tokio",
]
[dev-dependencies.duckdb]
version = "1"
features = ["bundled"]
[dev-dependencies.oracle]
version = "0.6"
features = ["chrono"]
default-features = false
[dev-dependencies.proptest]
version = "1.5"
[dev-dependencies.rusqlite]
version = "0.32"
features = ["bundled"]
[dev-dependencies.sqlx]
version = "0.9"
features = [
"runtime-tokio",
"tls-rustls",
"mysql",
"postgres",
"sqlite",
"chrono",
"json",
]
default-features = false
[dev-dependencies.tiberius]
version = "0.12"
features = [
"tds73",
"chrono",
]
default-features = false
[dev-dependencies.tokio]
version = "1.40"
features = [
"full",
"full",
"test-util",
]
[dev-dependencies.tokio-util]
version = "0.7"
features = ["compat"]
[lints.clippy]
module_name_repetitions = "allow"
type_complexity = "allow"
[lints.clippy.all]
level = "warn"
priority = -1
[lints.rust]
unsafe_op_in_unsafe_fn = "warn"