Restructure examples folder

This commit is contained in:
Jon Pacheco 2020-03-31 00:35:07 +01:00
parent 785163f5ea
commit 501ed887e3
13 changed files with 26 additions and 80 deletions

82
Cargo.lock generated
View file

@ -1666,16 +1666,6 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
[[package]]
name = "sqlx"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6cf8ffc87c5eb00ab9bbb4f464372a26ff3320ed38c9745f28e42680c08758fd"
dependencies = [
"sqlx-core 0.2.6",
"sqlx-macros 0.2.5",
]
[[package]]
name = "sqlx"
version = "0.3.0"
@ -1688,42 +1678,14 @@ dependencies = [
"paste",
"serde",
"serde_json",
"sqlx-core 0.3.0",
"sqlx-macros 0.3.0",
"sqlx-core",
"sqlx-macros",
"sqlx-test",
"time 0.2.9",
"tokio 0.2.13",
"trybuild",
]
[[package]]
name = "sqlx-core"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "065f0681d5f1dfc2f7cca898c611a9f6abd2e89f60409fcd2c3ce5e7b91623c8"
dependencies = [
"async-native-tls",
"async-std",
"async-stream",
"base64 0.11.0",
"bitflags",
"byteorder",
"crossbeam-queue",
"crossbeam-utils 0.7.2",
"futures-channel",
"futures-core",
"futures-util",
"hmac",
"log",
"md-5",
"memchr",
"percent-encoding 2.1.0",
"rand",
"sha-1",
"sha2",
"url",
]
[[package]]
name = "sqlx-core"
version = "0.3.0"
@ -1766,16 +1728,16 @@ dependencies = [
]
[[package]]
name = "sqlx-example-listen-postgres"
name = "sqlx-example-postgres-listen"
version = "0.1.0"
dependencies = [
"async-std",
"futures 0.3.4",
"sqlx 0.3.0",
"sqlx",
]
[[package]]
name = "sqlx-example-realworld-postgres"
name = "sqlx-example-postgres-realworld"
version = "0.1.0"
dependencies = [
"anyhow",
@ -1787,24 +1749,20 @@ dependencies = [
"rand",
"rust-argon2",
"serde",
"sqlx 0.3.0",
"sqlx",
"tide",
]
[[package]]
name = "sqlx-macros"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "133ca6bf38b83c6c82196c12acb7b30a428f55fcdea7f1daba0e38b621294ea3"
name = "sqlx-example-postgres-todos"
version = "0.1.0"
dependencies = [
"anyhow",
"async-std",
"dotenv",
"futures 0.3.4",
"proc-macro2",
"quote",
"sqlx-core 0.2.6",
"syn",
"url",
"paw",
"sqlx",
"structopt",
]
[[package]]
@ -1818,7 +1776,7 @@ dependencies = [
"proc-macro2",
"quote",
"serde_json",
"sqlx-core 0.3.0",
"sqlx-core",
"syn",
"tokio 0.2.13",
"url",
@ -1832,7 +1790,7 @@ dependencies = [
"async-std",
"dotenv",
"env_logger",
"sqlx 0.3.0",
"sqlx",
"tokio 0.2.13",
]
@ -2087,18 +2045,6 @@ dependencies = [
"syn",
]
[[package]]
name = "todos-postgres"
version = "0.1.0"
dependencies = [
"anyhow",
"async-std",
"futures 0.3.4",
"paw",
"sqlx 0.2.6",
"structopt",
]
[[package]]
name = "tokio"
version = "0.1.22"

View file

@ -4,9 +4,9 @@ members = [
"sqlx-core",
"sqlx-macros",
"sqlx-test",
"examples/listen-postgres",
"examples/realworld-postgres",
"examples/todos-postgres",
"examples/postgres/listen",
"examples/postgres/realworld",
"examples/postgres/todos",
]
[package]

View file

@ -1,10 +1,10 @@
[package]
name = "sqlx-example-listen-postgres"
name = "sqlx-example-postgres-listen"
version = "0.1.0"
edition = "2018"
workspace = "../.."
workspace = "../../../"
[dependencies]
async-std = { version = "1.4.0", features = [ "attributes", "unstable" ] }
sqlx = { path = "../..", features = [ "postgres", "tls" ] }
sqlx = { path = "../../../", features = [ "postgres", "tls" ] }
futures = "0.3.1"

View file

@ -1,15 +1,15 @@
[package]
name = "sqlx-example-realworld-postgres"
name = "sqlx-example-postgres-realworld"
version = "0.1.0"
edition = "2018"
workspace = "../.."
workspace = "../../../"
[dependencies]
anyhow = "1.0.26"
env_logger = "0.7.1"
async-std = { version = "1.4.0", features = [ "attributes" ] }
tide = "0.5.1"
sqlx = { path = "../..", features = [ "postgres" ] }
sqlx = { path = "../../../", features = [ "postgres" ] }
serde = { version = "1.0.104", features = [ "derive" ] }
futures = "0.3.1"
rust-argon2 = "0.6.1"

View file

@ -1,13 +1,13 @@
[package]
name = "todos-postgres"
name = "sqlx-example-postgres-todos"
version = "0.1.0"
edition = "2018"
workspace = "../../"
workspace = "../../../"
[dependencies]
anyhow = "1.0"
async-std = { version = "1.4.0", features = [ "attributes" ] }
futures = "0.3"
paw = "1.0"
sqlx = { version = "0.2", features = ["postgres"] }
sqlx = { path = "../../../", features = ["postgres"] }
structopt = { version = "0.3", features = ["paw"] }