1
0
mirror of https://github.com/actix/examples synced 2025-06-27 01:27:43 +02:00

Update db/basic, db/sqlx_todo and db/r2d2 to v4 (#506)

This commit is contained in:
Luca Palmieri
2022-01-29 16:25:46 +00:00
committed by GitHub
parent 6e3ae0fd19
commit 8b5de155bd
11 changed files with 225 additions and 165 deletions

301
Cargo.lock generated
View File

@ -22,7 +22,7 @@ dependencies = [
"actix_derive",
"bitflags",
"bytes 0.5.6",
"crossbeam-channel",
"crossbeam-channel 0.4.4",
"derive_more",
"futures-channel",
"futures-util",
@ -1033,7 +1033,7 @@ dependencies = [
"async-graphql-derive",
"async-graphql-parser",
"async-graphql-value",
"async-stream 0.3.2",
"async-stream",
"async-trait",
"bytes 1.1.0",
"fnv",
@ -1157,35 +1157,6 @@ dependencies = [
"event-listener",
]
[[package]]
name = "async-native-tls"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e9e7a929bd34c68a82d58a4de7f86fffdaf97fb2af850162a7bb19dd7269b33"
dependencies = [
"async-std",
"native-tls",
"thiserror",
"url",
]
[[package]]
name = "async-process"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83137067e3a2a6a06d67168e49e68a0957d215410473a740cea95a2425c0b7c6"
dependencies = [
"async-io",
"blocking",
"cfg-if 1.0.0",
"event-listener",
"futures-lite",
"libc",
"once_cell",
"signal-hook",
"winapi 0.3.9",
]
[[package]]
name = "async-std"
version = "1.10.0"
@ -1196,7 +1167,6 @@ dependencies = [
"async-global-executor",
"async-io",
"async-lock",
"async-process",
"crossbeam-utils 0.8.6",
"futures-channel",
"futures-core",
@ -1214,37 +1184,16 @@ dependencies = [
"wasm-bindgen-futures",
]
[[package]]
name = "async-stream"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22068c0c19514942eefcfd4daf8976ef1aad84e61539f95cd200c35202f80af5"
dependencies = [
"async-stream-impl 0.2.1",
"futures-core",
]
[[package]]
name = "async-stream"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "171374e7e3b2504e0e5236e3b59260560f9fe94bfe9ac39ba5e4e929c5590625"
dependencies = [
"async-stream-impl 0.3.2",
"async-stream-impl",
"futures-core",
]
[[package]]
name = "async-stream-impl"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25f9db3b38af870bf7e5cc649167533b493928e50744e2c30ae350230b414670"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "async-stream-impl"
version = "0.3.2"
@ -1287,8 +1236,8 @@ dependencies = [
name = "async_db"
version = "2.0.0"
dependencies = [
"actix-web 3.3.3",
"env_logger 0.8.4",
"actix-web 4.0.0-beta.21",
"env_logger 0.9.0",
"failure",
"futures",
"num_cpus",
@ -1329,6 +1278,15 @@ dependencies = [
"tokio-postgres",
]
[[package]]
name = "atoi"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "616896e05fc0e2649463a93a15183c6a16bf03413a7af88ef1285ddedfa9cda5"
dependencies = [
"num-traits 0.2.14",
]
[[package]]
name = "atomic-waker"
version = "1.0.0"
@ -1576,7 +1534,7 @@ dependencies = [
"rand 0.7.3",
"serde 1.0.136",
"serde_json",
"uuid",
"uuid 0.8.2",
]
[[package]]
@ -1595,7 +1553,7 @@ dependencies = [
"serde 1.0.136",
"serde_bytes",
"serde_json",
"uuid",
"uuid 0.8.2",
]
[[package]]
@ -1969,6 +1927,21 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba"
[[package]]
name = "crc"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49fc9a695bca7f35f5f4c15cddc84415f66a74ea78eef08e90c5024f2b540e23"
dependencies = [
"crc-catalog",
]
[[package]]
name = "crc-catalog"
version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403"
[[package]]
name = "crc32fast"
version = "1.3.1"
@ -1988,6 +1961,16 @@ dependencies = [
"maybe-uninit",
]
[[package]]
name = "crossbeam-channel"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e54ea8bc3fb1ee042f5aace6e3c6e025d3874866da222930f70ce62aceba0bfa"
dependencies = [
"cfg-if 1.0.0",
"crossbeam-utils 0.8.6",
]
[[package]]
name = "crossbeam-queue"
version = "0.2.3"
@ -1999,6 +1982,16 @@ dependencies = [
"maybe-uninit",
]
[[package]]
name = "crossbeam-queue"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b979d76c9fcb84dffc80a73f7290da0f83e4c95773494674cb44b76d13a7a110"
dependencies = [
"cfg-if 1.0.0",
"crossbeam-utils 0.8.6",
]
[[package]]
name = "crossbeam-utils"
version = "0.7.2"
@ -2172,7 +2165,7 @@ checksum = "4aaff9a7a1de9893f4004fa08527b31cb2ae4121c44e053cf53f29203c73bd23"
dependencies = [
"async-trait",
"config",
"crossbeam-queue",
"crossbeam-queue 0.2.3",
"num_cpus",
"serde 1.0.136",
"tokio 0.2.25",
@ -2248,7 +2241,7 @@ dependencies = [
"libsqlite3-sys",
"pq-sys",
"r2d2",
"uuid",
"uuid 0.8.2",
]
[[package]]
@ -2264,7 +2257,7 @@ dependencies = [
"futures",
"serde 1.0.136",
"serde_json",
"uuid",
"uuid 0.8.2",
]
[[package]]
@ -2382,19 +2375,6 @@ dependencies = [
"syn",
]
[[package]]
name = "env_logger"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
dependencies = [
"atty",
"humantime 1.3.0",
"log",
"regex",
"termcolor",
]
[[package]]
name = "env_logger"
version = "0.8.4"
@ -2402,7 +2382,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3"
dependencies = [
"atty",
"humantime 2.1.0",
"humantime",
"log",
"regex",
"termcolor",
@ -2415,7 +2395,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3"
dependencies = [
"atty",
"humantime 2.1.0",
"humantime",
"log",
"regex",
"termcolor",
@ -2623,6 +2603,17 @@ dependencies = [
"futures-util",
]
[[package]]
name = "futures-intrusive"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62007592ac46aa7c2b6416f7deb9a8a8f63a01e0f1d6e1787d5630170db2b63e"
dependencies = [
"futures-core",
"lock_api",
"parking_lot",
]
[[package]]
name = "futures-io"
version = "0.3.19"
@ -2856,6 +2847,18 @@ name = "hashbrown"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
dependencies = [
"ahash 0.7.6",
]
[[package]]
name = "hashlink"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7249a3129cbc1ffccd74857f81464a323a152173cdb134e0fd81bc803b29facf"
dependencies = [
"hashbrown",
]
[[package]]
name = "heck"
@ -3011,15 +3014,6 @@ version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02296996cb8796d7c6e3bc2d9211b7802812d36999a51bb754123ead7d37d026"
[[package]]
name = "humantime"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f"
dependencies = [
"quick-error 1.2.3",
]
[[package]]
name = "humantime"
version = "2.1.0"
@ -3281,7 +3275,7 @@ dependencies = [
"smartstring",
"static_assertions 1.1.0",
"url",
"uuid",
"uuid 0.8.2",
]
[[package]]
@ -3298,7 +3292,7 @@ dependencies = [
"r2d2_mysql",
"serde 1.0.136",
"serde_json",
"uuid",
"uuid 0.8.2",
]
[[package]]
@ -3409,9 +3403,9 @@ checksum = "565dbd88872dbe4cc8a46e527f26483c1d1f7afa6b884a3bd6cd893d4f98da74"
[[package]]
name = "libsqlite3-sys"
version = "0.17.3"
version = "0.22.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56d90181c2904c287e5390186be820e5ef311a3c62edebb7d6ca3d6a48ce041d"
checksum = "290b64917f8b0cb885d9de0f9959fe1f775d7fa12f1da2db9001c1c8ab60f89d"
dependencies = [
"cc",
"pkg-config",
@ -3774,7 +3768,7 @@ dependencies = [
"trust-dns-proto 0.20.3",
"trust-dns-resolver 0.20.3",
"typed-builder",
"uuid",
"uuid 0.8.2",
"version_check 0.9.4",
"webpki",
"webpki-roots 0.21.1",
@ -3806,7 +3800,7 @@ dependencies = [
"actix-web 3.3.3",
"futures-util",
"sanitize-filename",
"uuid",
"uuid 0.8.2",
]
[[package]]
@ -3875,7 +3869,7 @@ dependencies = [
"sha2 0.8.2",
"time 0.1.44",
"twox-hash",
"uuid",
"uuid 0.8.2",
]
[[package]]
@ -4569,12 +4563,12 @@ dependencies = [
name = "r2d2-example"
version = "1.0.0"
dependencies = [
"actix-web 3.3.3",
"env_logger 0.8.4",
"actix-web 4.0.0-beta.21",
"env_logger 0.9.0",
"r2d2",
"r2d2_sqlite",
"rusqlite",
"uuid",
"uuid 1.0.0-alpha.1",
]
[[package]]
@ -4589,9 +4583,9 @@ dependencies = [
[[package]]
name = "r2d2_sqlite"
version = "0.14.0"
version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c4689dcbe44341a3388a696a056cbb96124f7e70a1fbc9cd6a7bb6bab543e3b"
checksum = "9d24607049214c5e42d3df53ac1d8a23c34cc6a5eefe3122acb2c72174719959"
dependencies = [
"r2d2",
"rusqlite",
@ -4978,17 +4972,17 @@ dependencies = [
[[package]]
name = "rusqlite"
version = "0.21.0"
version = "0.25.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64a656821bb6317a84b257737b7934f79c0dbb7eb694710475908280ebad3e64"
checksum = "5c4b1eaf239b47034fb450ee9cdedd7d0226571689d8823030c4b6c2cb407152"
dependencies = [
"bitflags",
"fallible-iterator",
"fallible-streaming-iterator",
"hashlink",
"libsqlite3-sys",
"lru-cache",
"memchr",
"time 0.1.44",
"smallvec",
]
[[package]]
@ -5416,16 +5410,6 @@ dependencies = [
"tokio 1.16.1",
]
[[package]]
name = "signal-hook"
version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "647c97df271007dcea485bb74ffdb57f2e683f1306c854f468a0c244badabf2d"
dependencies = [
"libc",
"signal-hook-registry",
]
[[package]]
name = "signal-hook-registry"
version = "1.4.0"
@ -5454,7 +5438,7 @@ dependencies = [
"serde_json",
"sparkpost",
"time 0.2.27",
"uuid",
"uuid 0.8.2",
]
[[package]]
@ -5552,9 +5536,9 @@ dependencies = [
[[package]]
name = "sqlx"
version = "0.3.5"
version = "0.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8974cacd80085fbe49e778708d660dec6fb351604dc34c3905b26efb2803b038"
checksum = "7911b0031a0247af40095838002999c7a52fba29d9739e93326e71a5a1bc9d43"
dependencies = [
"sqlx-core",
"sqlx-macros",
@ -5562,55 +5546,88 @@ dependencies = [
[[package]]
name = "sqlx-core"
version = "0.3.5"
version = "0.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "88ac5a436f941c42eac509471a730df5c3c58e1450e68cd39afedbd948206273"
checksum = "aec89bfaca8f7737439bad16d52b07f1ccd0730520d3bf6ae9d069fe4b641fb1"
dependencies = [
"async-native-tls",
"async-std",
"async-stream 0.2.1",
"ahash 0.7.6",
"atoi",
"bitflags",
"byteorder",
"crossbeam-queue",
"crossbeam-utils 0.7.2",
"bytes 1.1.0",
"crc",
"crossbeam-channel 0.5.2",
"crossbeam-queue 0.3.3",
"crossbeam-utils 0.8.6",
"either",
"futures-channel",
"futures-core",
"futures-intrusive",
"futures-util",
"hashlink",
"hex",
"indexmap",
"itoa 0.4.8",
"libc",
"libsqlite3-sys",
"log",
"memchr",
"once_cell",
"parking_lot",
"percent-encoding",
"rustls 0.19.1",
"sha2 0.9.9",
"smallvec",
"sqlformat",
"sqlx-rt",
"stringprep",
"thiserror",
"tokio-stream",
"url",
"webpki",
"webpki-roots 0.21.1",
"whoami",
]
[[package]]
name = "sqlx-macros"
version = "0.3.5"
version = "0.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de2ae78b783af5922d811b14665a5a3755e531c3087bb805cf24cf71f15e6780"
checksum = "584866c833511b1a152e87a7ee20dee2739746f60c858b3c5209150bc4b466f5"
dependencies = [
"async-std",
"dotenv",
"futures",
"either",
"heck",
"once_cell",
"proc-macro2",
"quote",
"sha2 0.9.9",
"sqlx-core",
"sqlx-rt",
"syn",
"url",
]
[[package]]
name = "sqlx-rt"
version = "0.5.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8061cbaa91ee75041514f67a09398c65a64efed72c90151ecd47593bad53da99"
dependencies = [
"actix-rt 2.6.0",
"once_cell",
"tokio 1.16.1",
"tokio-rustls 0.22.0",
]
[[package]]
name = "sqlx_todo"
version = "0.1.0"
dependencies = [
"actix-web 3.3.3",
"actix-web 4.0.0-beta.21",
"anyhow",
"dotenv",
"env_logger 0.7.1",
"env_logger 0.9.0",
"futures",
"log",
"serde 1.0.136",
@ -6187,6 +6204,17 @@ dependencies = [
"webpki",
]
[[package]]
name = "tokio-stream"
version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50145484efff8818b5ccd256697f36863f587da82cf8b409c53adf1e840798e3"
dependencies = [
"futures-core",
"pin-project-lite 0.2.8",
"tokio 1.16.1",
]
[[package]]
name = "tokio-tls"
version = "0.3.1"
@ -6580,6 +6608,15 @@ dependencies = [
"serde 1.0.136",
]
[[package]]
name = "uuid"
version = "1.0.0-alpha.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb3ab47baa004111b323696c6eaa2752e7356f7f77cf6b6dc7a2087368ce1ca4"
dependencies = [
"getrandom 0.2.4",
]
[[package]]
name = "v_escape"
version = "0.13.2"
@ -6973,6 +7010,16 @@ dependencies = [
"cc",
]
[[package]]
name = "whoami"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "524b58fa5a20a2fb3014dd6358b70e6579692a56ef6fce928834e488f42f65e8"
dependencies = [
"wasm-bindgen",
"web-sys",
]
[[package]]
name = "widestring"
version = "0.4.3"