2019-11-21 23:29:40 +00:00
[ workspace ]
members = [
"." ,
2019-11-22 10:30:16 +00:00
"sqlx-core" ,
2019-11-21 23:29:40 +00:00
"sqlx-macros" ,
2023-02-02 00:47:29 +00:00
"sqlx-macros-core" ,
2020-03-02 04:07:59 +00:00
"sqlx-test" ,
2020-05-16 03:07:57 +00:00
"sqlx-cli" ,
2024-03-12 01:46:53 +00:00
# "sqlx-bench",
2023-02-02 00:47:29 +00:00
"sqlx-mysql" ,
"sqlx-postgres" ,
"sqlx-sqlite" ,
2023-07-03 21:37:37 +00:00
"examples/mysql/todos" ,
"examples/postgres/axum-social-with-tests" ,
2023-07-24 23:09:06 +00:00
"examples/postgres/chat" ,
2023-07-03 21:37:37 +00:00
"examples/postgres/files" ,
"examples/postgres/json" ,
"examples/postgres/listen" ,
"examples/postgres/todos" ,
"examples/postgres/mockable-todos" ,
"examples/postgres/transaction" ,
"examples/sqlite/todos" ,
2019-11-21 23:29:40 +00:00
]
2023-02-02 00:47:29 +00:00
[ workspace . package ]
2024-08-24 07:03:55 +00:00
version = "0.8.1"
2019-06-06 13:02:55 +00:00
license = "MIT OR Apache-2.0"
2022-04-15 19:52:00 +00:00
edition = "2021"
2023-02-02 00:47:29 +00:00
repository = "https://github.com/launchbadge/sqlx"
2021-04-16 01:38:50 +00:00
keywords = [ "database" , "async" , "postgres" , "mysql" , "sqlite" ]
categories = [ "database" , "asynchronous" ]
2019-11-20 17:05:21 +00:00
authors = [
2021-04-16 01:38:50 +00:00
"Ryan Leckey <leckey.ryan@gmail.com>" ,
"Austin Bonander <austin.bonander@gmail.com>" ,
"Chloe Ross <orangesnowfox@gmail.com>" ,
"Daniel Akhterov <akhterovd@gmail.com>" ,
2021-05-22 00:27:15 +00:00
]
2019-06-06 13:02:55 +00:00
2023-02-02 00:47:29 +00:00
[ package ]
name = "sqlx"
readme = "README.md"
documentation = "https://docs.rs/sqlx"
description = "🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, and SQLite."
version . workspace = true
license . workspace = true
edition . workspace = true
authors . workspace = true
repository . workspace = true
2020-01-11 11:30:03 +00:00
[ package . metadata . docs . rs ]
2023-03-17 00:11:46 +00:00
features = [ "all-databases" , "_unstable-all-types" ]
2020-01-22 21:10:10 +00:00
rustdoc-args = [ "--cfg" , "docsrs" ]
2020-01-11 11:30:03 +00:00
2019-08-07 06:20:50 +00:00
[ features ]
2023-02-02 00:47:29 +00:00
default = [ "any" , "macros" , "migrate" , "json" ]
2024-03-30 22:24:56 +00:00
derive = [ "sqlx-macros/derive" ]
macros = [ "derive" , "sqlx-macros/macros" ]
2023-02-02 00:47:29 +00:00
migrate = [ "sqlx-core/migrate" , "sqlx-macros?/migrate" , "sqlx-mysql?/migrate" , "sqlx-postgres?/migrate" , "sqlx-sqlite?/migrate" ]
2020-04-14 06:00:19 +00:00
2020-03-24 09:56:52 +00:00
# intended mainly for CI and docs
2023-02-02 00:47:29 +00:00
all-databases = [ "mysql" , "sqlite" , "postgres" , "any" ]
_unstable-all-types = [
2021-04-16 01:38:50 +00:00
"bigdecimal" ,
2023-02-02 00:47:29 +00:00
"rust_decimal" ,
2021-04-16 01:38:50 +00:00
"json" ,
"time" ,
"chrono" ,
"ipnetwork" ,
2021-07-19 23:55:53 +00:00
"mac_address" ,
2021-04-16 01:38:50 +00:00
"uuid" ,
"bit-vec" ,
]
2020-03-24 09:56:52 +00:00
2023-02-02 00:47:29 +00:00
# Base runtime features without TLS
2023-07-06 23:01:21 +00:00
runtime-async-std = [ "_rt-async-std" , "sqlx-core/_rt-async-std" , "sqlx-macros?/_rt-async-std" ]
runtime-tokio = [ "_rt-tokio" , "sqlx-core/_rt-tokio" , "sqlx-macros?/_rt-tokio" ]
2020-10-20 10:29:24 +00:00
2023-02-02 00:47:29 +00:00
# TLS features
2023-07-06 23:01:21 +00:00
tls-native-tls = [ "sqlx-core/_tls-native-tls" , "sqlx-macros?/_tls-native-tls" ]
2024-08-04 23:39:13 +00:00
tls-rustls = [ "tls-rustls-ring" ] # For backwards compatibility
tls-rustls-aws-lc-rs = [ "sqlx-core/_tls-rustls-aws-lc-rs" , "sqlx-macros?/_tls-rustls-aws-lc-rs" ]
tls-rustls-ring = [ "sqlx-core/_tls-rustls-ring" , "sqlx-macros?/_tls-rustls-ring" ]
2023-02-02 00:47:29 +00:00
# No-op feature used by the workflows to compile without TLS enabled. Not meant for general use.
tls-none = [ ]
# Legacy Runtime + TLS features
runtime-async-std-native-tls = [ "runtime-async-std" , "tls-native-tls" ]
2024-08-04 23:39:13 +00:00
runtime-async-std-rustls = [ "runtime-async-std" , "tls-rustls-ring" ]
2023-02-02 00:47:29 +00:00
runtime-tokio-native-tls = [ "runtime-tokio" , "tls-native-tls" ]
2024-08-04 23:39:13 +00:00
runtime-tokio-rustls = [ "runtime-tokio" , "tls-rustls-ring" ]
2020-10-20 10:21:01 +00:00
2020-10-20 10:29:24 +00:00
# for conditional compilation
_rt-async-std = [ ]
_rt-tokio = [ ]
2019-12-28 01:31:01 +00:00
# database
2023-02-02 00:47:29 +00:00
any = [ "sqlx-core/any" , "sqlx-mysql?/any" , "sqlx-postgres?/any" , "sqlx-sqlite?/any" ]
postgres = [ "sqlx-postgres" , "sqlx-macros?/postgres" ]
mysql = [ "sqlx-mysql" , "sqlx-macros?/mysql" ]
sqlite = [ "sqlx-sqlite" , "sqlx-macros?/sqlite" ]
2019-12-28 01:31:01 +00:00
# types
2023-02-02 00:47:29 +00:00
json = [ "sqlx-macros?/json" , "sqlx-mysql?/json" , "sqlx-postgres?/json" , "sqlx-sqlite?/json" ]
bigdecimal = [ "sqlx-core/bigdecimal" , "sqlx-macros?/bigdecimal" , "sqlx-mysql?/bigdecimal" , "sqlx-postgres?/bigdecimal" ]
bit-vec = [ "sqlx-core/bit-vec" , "sqlx-macros?/bit-vec" , "sqlx-postgres?/bit-vec" ]
chrono = [ "sqlx-core/chrono" , "sqlx-macros?/chrono" , "sqlx-mysql?/chrono" , "sqlx-postgres?/chrono" , "sqlx-sqlite?/chrono" ]
ipnetwork = [ "sqlx-core/ipnetwork" , "sqlx-macros?/ipnetwork" , "sqlx-postgres?/ipnetwork" ]
mac_address = [ "sqlx-core/mac_address" , "sqlx-macros?/mac_address" , "sqlx-postgres?/mac_address" ]
rust_decimal = [ "sqlx-core/rust_decimal" , "sqlx-macros?/rust_decimal" , "sqlx-mysql?/rust_decimal" , "sqlx-postgres?/rust_decimal" ]
time = [ "sqlx-core/time" , "sqlx-macros?/time" , "sqlx-mysql?/time" , "sqlx-postgres?/time" , "sqlx-sqlite?/time" ]
uuid = [ "sqlx-core/uuid" , "sqlx-macros?/uuid" , "sqlx-mysql?/uuid" , "sqlx-postgres?/uuid" , "sqlx-sqlite?/uuid" ]
2023-02-14 19:56:40 +00:00
regexp = [ "sqlx-sqlite?/regexp" ]
2023-02-02 00:47:29 +00:00
[ workspace . dependencies ]
2023-02-21 21:34:42 +00:00
# Core Crates
2024-08-24 07:03:55 +00:00
sqlx-core = { version = "=0.8.1" , path = "sqlx-core" }
sqlx-macros-core = { version = "=0.8.1" , path = "sqlx-macros-core" }
sqlx-macros = { version = "=0.8.1" , path = "sqlx-macros" }
2023-02-21 21:34:42 +00:00
2023-02-02 00:47:29 +00:00
# Driver crates
2024-08-24 07:03:55 +00:00
sqlx-mysql = { version = "=0.8.1" , path = "sqlx-mysql" }
sqlx-postgres = { version = "=0.8.1" , path = "sqlx-postgres" }
sqlx-sqlite = { version = "=0.8.1" , path = "sqlx-sqlite" }
2023-02-02 00:47:29 +00:00
# Facade crate (for reference from sqlx-cli)
2024-08-24 07:03:55 +00:00
sqlx = { version = "=0.8.1" , path = "." , default-features = false }
2023-02-02 00:47:29 +00:00
# Common type integrations shared by multiple driver crates.
# These are optional unless enabled in a workspace crate.
2023-08-30 00:18:45 +00:00
bigdecimal = "0.4.0"
2023-02-02 00:47:29 +00:00
bit-vec = "0.6.3"
2024-07-23 00:53:12 +00:00
chrono = { version = "0.4.34" , default-features = false , features = [ "std" , "clock" ] }
2023-02-02 00:47:29 +00:00
ipnetwork = "0.20.0"
2023-06-12 19:44:55 +00:00
mac_address = "1.1.5"
2024-07-05 00:17:20 +00:00
rust_decimal = { version = "1.26.1" , default-features = false , features = [ "std" ] }
2024-04-12 02:26:12 +00:00
time = { version = "0.3.36" , features = [ "formatting" , "parsing" , "macros" ] }
2023-02-02 00:47:29 +00:00
uuid = "1.1.2"
# Common utility crates
dotenvy = { version = "0.15.0" , default-features = false }
# Runtimes
[ workspace . dependencies . async-std ]
2023-10-08 04:00:45 +00:00
version = "1.12"
2023-02-02 00:47:29 +00:00
[ workspace . dependencies . tokio ]
version = "1"
features = [ "time" , "net" , "sync" , "fs" , "io-util" , "rt" ]
default-features = false
2019-08-07 06:20:50 +00:00
2019-06-06 13:02:55 +00:00
[ dependencies ]
2023-07-03 21:37:37 +00:00
sqlx-core = { workspace = true , features = [ "offline" , "migrate" ] }
sqlx-macros = { workspace = true , optional = true }
2019-07-26 16:20:09 +00:00
2023-02-02 00:47:29 +00:00
sqlx-mysql = { workspace = true , optional = true }
sqlx-postgres = { workspace = true , optional = true }
sqlx-sqlite = { workspace = true , optional = true }
2019-08-28 18:01:55 +00:00
[ dev-dependencies ]
2021-12-30 01:25:49 +00:00
anyhow = "1.0.52"
2022-04-14 22:11:46 +00:00
time_ = { version = "0.3.2" , package = "time" }
2021-12-30 01:25:49 +00:00
futures = "0.3.19"
2024-01-26 07:30:25 +00:00
env_logger = "0.11"
2023-10-08 04:00:45 +00:00
async-std = { version = "1.12.0" , features = [ "attributes" ] }
2021-12-30 01:25:49 +00:00
tokio = { version = "1.15.0" , features = [ "full" ] }
2022-07-28 21:33:44 +00:00
dotenvy = "0.15.0"
2021-12-30 01:25:49 +00:00
trybuild = "1.0.53"
2020-03-02 04:07:59 +00:00
sqlx-test = { path = "./sqlx-test" }
2021-12-30 01:25:49 +00:00
paste = "1.0.6"
serde = { version = "1.0.132" , features = [ "derive" ] }
serde_json = "1.0.73"
url = "2.2.2"
2021-12-29 23:23:02 +00:00
rand = "0.8.4"
rand_xoshiro = "0.6.0"
2021-12-30 01:25:49 +00:00
hex = "0.4.3"
2024-07-20 01:50:18 +00:00
tempfile = "3.10.1"
2024-01-26 07:30:14 +00:00
criterion = { version = "0.5.1" , features = [ "async_tokio" ] }
2023-05-08 19:44:28 +00:00
2024-03-06 02:04:45 +00:00
# If this is an unconditional dev-dependency then Cargo will *always* try to build `libsqlite3-sys`,
# even when SQLite isn't the intended test target, and fail if the build environment is not set up for compiling C code.
[ target . 'cfg(sqlite_test_sqlcipher)' . dev-dependencies ]
# Enable testing with SQLCipher if specifically requested.
2024-07-28 00:59:00 +00:00
libsqlite3-sys = { version = "0.30.1" , features = [ "bundled-sqlcipher" ] }
2022-08-05 19:20:14 +00:00
2024-08-20 08:26:53 +00:00
# Common lint settings for the workspace
[ workspace . lints . clippy ]
# https://github.com/launchbadge/sqlx/issues/3440
cast_possible_truncation = 'deny'
cast_possible_wrap = 'deny'
cast_sign_loss = 'deny'
# See `clippy.toml`
disallowed_methods = 'deny'
2020-06-27 11:07:40 +00:00
#
# Any
#
[ [ test ] ]
name = "any"
path = "tests/any/any.rs"
2021-04-16 01:38:50 +00:00
required-features = [ "any" ]
2020-06-27 11:07:40 +00:00
2020-07-14 13:07:29 +00:00
[ [ test ] ]
name = "any-pool"
path = "tests/any/pool.rs"
2021-04-16 01:38:50 +00:00
required-features = [ "any" ]
2020-07-14 13:07:29 +00:00
2020-07-23 21:46:27 +00:00
#
# Migrations
#
[ [ test ] ]
name = "migrate-macro"
path = "tests/migrate/macro.rs"
2021-04-16 01:38:50 +00:00
required-features = [ "macros" , "migrate" ]
2020-07-23 21:46:27 +00:00
2020-05-30 21:51:57 +00:00
#
# SQLite
#
2020-01-29 02:56:25 +00:00
2020-03-11 18:01:17 +00:00
[ [ test ] ]
name = "sqlite"
2020-05-30 21:51:57 +00:00
path = "tests/sqlite/sqlite.rs"
2021-04-16 01:38:50 +00:00
required-features = [ "sqlite" ]
2020-03-11 18:01:17 +00:00
2023-07-14 23:27:53 +00:00
[ [ test ] ]
name = "sqlite-any"
path = "tests/sqlite/any.rs"
required-features = [ "sqlite" ]
2020-03-17 04:05:48 +00:00
[ [ test ] ]
2020-05-30 21:51:57 +00:00
name = "sqlite-types"
path = "tests/sqlite/types.rs"
2021-04-16 01:38:50 +00:00
required-features = [ "sqlite" ]
2020-03-13 09:21:29 +00:00
2020-03-20 09:21:15 +00:00
[ [ test ] ]
2020-05-30 21:51:57 +00:00
name = "sqlite-describe"
path = "tests/sqlite/describe.rs"
2021-04-16 01:38:50 +00:00
required-features = [ "sqlite" ]
2020-03-13 09:21:29 +00:00
2020-06-06 04:02:24 +00:00
[ [ test ] ]
name = "sqlite-macros"
path = "tests/sqlite/macros.rs"
2021-04-16 01:38:50 +00:00
required-features = [ "sqlite" , "macros" ]
2020-06-06 04:02:24 +00:00
2021-03-18 23:12:00 +00:00
[ [ test ] ]
name = "sqlite-derives"
path = "tests/sqlite/derives.rs"
2021-04-16 01:38:50 +00:00
required-features = [ "sqlite" , "macros" ]
2021-03-18 23:12:00 +00:00
2023-02-08 21:23:33 +00:00
[ [ test ] ]
name = "sqlite-error"
path = "tests/sqlite/error.rs"
required-features = [ "sqlite" ]
2022-08-05 19:20:14 +00:00
[ [ test ] ]
2023-02-02 00:47:29 +00:00
name = "sqlite-sqlcipher"
2022-08-05 19:20:14 +00:00
path = "tests/sqlite/sqlcipher.rs"
required-features = [ "sqlite" ]
2022-08-02 21:38:12 +00:00
[ [ test ] ]
name = "sqlite-test-attr"
path = "tests/sqlite/test-attr.rs"
required-features = [ "sqlite" , "macros" , "migrate" ]
2022-09-13 00:52:04 +00:00
[ [ test ] ]
name = "sqlite-migrate"
path = "tests/sqlite/migrate.rs"
required-features = [ "sqlite" , "macros" , "migrate" ]
2024-08-24 01:27:36 +00:00
[ [ test ] ]
name = "sqlite-rustsec"
path = "tests/sqlite/rustsec.rs"
required-features = [ "sqlite" ]
2023-05-08 19:44:28 +00:00
[ [ bench ] ]
name = "sqlite-describe"
path = "benches/sqlite/describe.rs"
harness = false
required-features = [ "sqlite" ]
2020-05-30 21:51:57 +00:00
#
# MySQL
#
2019-12-28 01:31:01 +00:00
[ [ test ] ]
name = "mysql"
2020-05-30 21:51:57 +00:00
path = "tests/mysql/mysql.rs"
2021-04-16 01:38:50 +00:00
required-features = [ "mysql" ]
2019-12-28 01:31:01 +00:00
2020-03-11 08:40:57 +00:00
[ [ test ] ]
2020-05-30 21:51:57 +00:00
name = "mysql-types"
path = "tests/mysql/types.rs"
2021-04-16 01:38:50 +00:00
required-features = [ "mysql" ]
2020-03-11 08:40:57 +00:00
2020-03-18 02:26:59 +00:00
[ [ test ] ]
2020-05-30 21:51:57 +00:00
name = "mysql-describe"
path = "tests/mysql/describe.rs"
2021-04-16 01:38:50 +00:00
required-features = [ "mysql" ]
2020-03-18 02:26:59 +00:00
2024-07-25 09:47:36 +00:00
[ [ test ] ]
name = "mysql-derives"
path = "tests/mysql/derives.rs"
required-features = [ "mysql" , "derive" ]
2020-06-06 04:02:24 +00:00
[ [ test ] ]
name = "mysql-macros"
path = "tests/mysql/macros.rs"
2021-04-16 01:38:50 +00:00
required-features = [ "mysql" , "macros" ]
2020-06-06 04:02:24 +00:00
2023-02-08 21:23:33 +00:00
[ [ test ] ]
name = "mysql-error"
path = "tests/mysql/error.rs"
required-features = [ "mysql" ]
2022-08-02 21:38:12 +00:00
[ [ test ] ]
name = "mysql-test-attr"
path = "tests/mysql/test-attr.rs"
required-features = [ "mysql" , "macros" , "migrate" ]
2022-09-13 00:52:04 +00:00
[ [ test ] ]
name = "mysql-migrate"
path = "tests/mysql/migrate.rs"
required-features = [ "mysql" , "macros" , "migrate" ]
2024-08-24 03:07:55 +00:00
[ [ test ] ]
name = "mysql-rustsec"
path = "tests/mysql/rustsec.rs"
required-features = [ "mysql" ]
2020-05-30 21:51:57 +00:00
#
# PostgreSQL
#
2019-12-28 01:31:01 +00:00
2020-03-01 10:01:00 +00:00
[ [ test ] ]
2020-05-30 21:51:57 +00:00
name = "postgres"
path = "tests/postgres/postgres.rs"
2021-04-16 01:38:50 +00:00
required-features = [ "postgres" ]
2020-03-01 10:01:00 +00:00
2019-11-23 09:02:56 +00:00
[ [ test ] ]
name = "postgres-types"
2020-05-30 21:51:57 +00:00
path = "tests/postgres/types.rs"
2021-04-16 01:38:50 +00:00
required-features = [ "postgres" ]
2019-11-23 09:02:56 +00:00
2020-03-18 02:26:59 +00:00
[ [ test ] ]
2020-05-30 21:51:57 +00:00
name = "postgres-describe"
path = "tests/postgres/describe.rs"
2021-04-16 01:38:50 +00:00
required-features = [ "postgres" ]
2020-06-03 03:47:57 +00:00
2020-06-06 03:28:21 +00:00
[ [ test ] ]
name = "postgres-macros"
path = "tests/postgres/macros.rs"
2021-04-16 01:38:50 +00:00
required-features = [ "postgres" , "macros" ]
2020-06-07 09:35:12 +00:00
2020-06-12 22:20:32 +00:00
[ [ test ] ]
name = "postgres-derives"
path = "tests/postgres/derives.rs"
2021-04-16 01:38:50 +00:00
required-features = [ "postgres" , "macros" ]
2020-06-12 22:20:32 +00:00
2023-02-08 21:23:33 +00:00
[ [ test ] ]
name = "postgres-error"
path = "tests/postgres/error.rs"
required-features = [ "postgres" ]
2022-08-02 21:38:12 +00:00
[ [ test ] ]
name = "postgres-test-attr"
path = "tests/postgres/test-attr.rs"
required-features = [ "postgres" , "macros" , "migrate" ]
2022-09-13 00:52:04 +00:00
[ [ test ] ]
name = "postgres-migrate"
path = "tests/postgres/migrate.rs"
required-features = [ "postgres" , "macros" , "migrate" ]
2024-07-27 06:15:32 +00:00
[ [ test ] ]
name = "postgres-query-builder"
path = "tests/postgres/query_builder.rs"
required-features = [ "postgres" ]
2024-08-23 08:25:25 +00:00
[ [ test ] ]
name = "postgres-rustsec"
path = "tests/postgres/rustsec.rs"
required-features = [ "postgres" , "macros" , "migrate" ]