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-03-12 05:38:24 +00:00
version = "0.8.0-alpha.0"
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" ]
tls-rustls = [ "sqlx-core/_tls-rustls" , "sqlx-macros?/_tls-rustls" ]
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" ]
runtime-async-std-rustls = [ "runtime-async-std" , "tls-rustls" ]
runtime-tokio-native-tls = [ "runtime-tokio" , "tls-native-tls" ]
runtime-tokio-rustls = [ "runtime-tokio" , "tls-rustls" ]
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-03-12 05:38:24 +00:00
sqlx-core = { version = "=0.8.0-alpha.0" , path = "sqlx-core" }
sqlx-macros-core = { version = "=0.8.0-alpha.0" , path = "sqlx-macros-core" }
sqlx-macros = { version = "=0.8.0-alpha.0" , path = "sqlx-macros" }
2023-02-21 21:34:42 +00:00
2023-02-02 00:47:29 +00:00
# Driver crates
2024-03-12 05:38:24 +00:00
sqlx-mysql = { version = "=0.8.0-alpha.0" , path = "sqlx-mysql" }
sqlx-postgres = { version = "=0.8.0-alpha.0" , path = "sqlx-postgres" }
sqlx-sqlite = { version = "=0.8.0-alpha.0" , path = "sqlx-sqlite" }
2023-02-02 00:47:29 +00:00
# Facade crate (for reference from sqlx-cli)
2024-03-12 05:38:24 +00:00
sqlx = { version = "=0.8.0-alpha.0" , 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"
2023-03-14 19:13:39 +00:00
chrono = { version = "0.4.22" , default-features = false }
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"
2023-02-02 00:47:29 +00:00
rust_decimal = "1.26.1"
time = { version = "0.3.14" , features = [ "formatting" , "parsing" , "macros" ] }
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-01-23 04:16:06 +00:00
tempfile = "3.9.0"
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.
2023-11-23 01:49:00 +00:00
libsqlite3-sys = { version = "0.27" , features = [ "bundled-sqlcipher" ] }
2022-08-05 19:20:14 +00:00
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" ]
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
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" ]
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" ]