From e6c490ff0a9797d08b1686b81e7856c22d3d8e0c Mon Sep 17 00:00:00 2001 From: Daniel Sousa Date: Sat, 23 Sep 2023 21:16:44 +0000 Subject: [PATCH] Changes to be committed: modified: examples/sqlite/all_about_inserts/Cargo.toml modified: examples/sqlite/getting_started_step_1/Cargo.toml new file: examples/sqlite/getting_started_step_1/README.md modified: examples/sqlite/getting_started_step_2/Cargo.toml new file: examples/sqlite/getting_started_step_2/README.md modified: examples/sqlite/getting_started_step_3/Cargo.toml --- examples/sqlite/all_about_inserts/Cargo.toml | 1 + examples/sqlite/getting_started_step_1/Cargo.toml | 1 + examples/sqlite/getting_started_step_1/README.md | 12 ++++++++++++ examples/sqlite/getting_started_step_2/Cargo.toml | 1 + examples/sqlite/getting_started_step_2/README.md | 15 +++++++++++++++ examples/sqlite/getting_started_step_3/Cargo.toml | 1 + 6 files changed, 31 insertions(+) create mode 100644 examples/sqlite/getting_started_step_1/README.md create mode 100644 examples/sqlite/getting_started_step_2/README.md diff --git a/examples/sqlite/all_about_inserts/Cargo.toml b/examples/sqlite/all_about_inserts/Cargo.toml index 28e23b0eb31b..f8d2b8ad1397 100644 --- a/examples/sqlite/all_about_inserts/Cargo.toml +++ b/examples/sqlite/all_about_inserts/Cargo.toml @@ -9,6 +9,7 @@ diesel = { version = "2.1.0", path = "../../../diesel", features = ["sqlite", "c serde = { version = "1.0.130", features = ["derive"] } serde_json = "1.0.68" chrono = { version = "0.4.20", default-features = false, features = ["clock", "std"] } +libsqlite3-sys = { version = ">=0.17.2, <0.27.0", features = ["bundled"] } [lib] doc = false diff --git a/examples/sqlite/getting_started_step_1/Cargo.toml b/examples/sqlite/getting_started_step_1/Cargo.toml index a840e2215eba..356b2c1d20c5 100644 --- a/examples/sqlite/getting_started_step_1/Cargo.toml +++ b/examples/sqlite/getting_started_step_1/Cargo.toml @@ -9,6 +9,7 @@ publish = false [dependencies] diesel = { version = "2.1.0", path = "../../../diesel", features = ["sqlite"] } dotenvy = "0.15" +libsqlite3-sys = { version = ">=0.17.2, <0.27.0", features = ["bundled"] } [[bin]] name = "show_posts" diff --git a/examples/sqlite/getting_started_step_1/README.md b/examples/sqlite/getting_started_step_1/README.md new file mode 100644 index 000000000000..acc0e1abf378 --- /dev/null +++ b/examples/sqlite/getting_started_step_1/README.md @@ -0,0 +1,12 @@ +# `rs-diesel-sqlite` + +Diesel's `Getting Started` guide using SQLite instead of Postgresql + +## Usage + +``` +$ echo "DATABASE_URL=file:test.db" > .env +$ diesel migration run + +$ cargo run --bin show_posts +``` diff --git a/examples/sqlite/getting_started_step_2/Cargo.toml b/examples/sqlite/getting_started_step_2/Cargo.toml index b5e25220a823..22f301218625 100644 --- a/examples/sqlite/getting_started_step_2/Cargo.toml +++ b/examples/sqlite/getting_started_step_2/Cargo.toml @@ -8,6 +8,7 @@ publish = false [dependencies] diesel = { version = "2.1.0", path = "../../../diesel", features = ["sqlite", "returning_clauses_for_sqlite_3_35"] } dotenvy = "0.15" +libsqlite3-sys = { version = ">=0.17.2, <0.27.0", features = ["bundled"] } [[bin]] name = "show_posts" diff --git a/examples/sqlite/getting_started_step_2/README.md b/examples/sqlite/getting_started_step_2/README.md new file mode 100644 index 000000000000..2b2f7b1e7287 --- /dev/null +++ b/examples/sqlite/getting_started_step_2/README.md @@ -0,0 +1,15 @@ +# `rs-diesel-sqlite` + +Diesel's `Getting Started` guide using SQLite instead of Postgresql + +## Usage + +``` +$ echo "DATABASE_URL=file:test.db" > .env +$ diesel migration run + +$ cargo run --bin show_posts + +$ cargo run --bin write_post +# write your post +``` diff --git a/examples/sqlite/getting_started_step_3/Cargo.toml b/examples/sqlite/getting_started_step_3/Cargo.toml index 3da78bf8c875..04390e72b767 100644 --- a/examples/sqlite/getting_started_step_3/Cargo.toml +++ b/examples/sqlite/getting_started_step_3/Cargo.toml @@ -8,6 +8,7 @@ publish = false [dependencies] diesel = { version = "2.1.0", path = "../../../diesel", features = ["sqlite", "returning_clauses_for_sqlite_3_35"] } dotenvy = "0.15" +libsqlite3-sys = { version = ">=0.17.2, <0.27.0", features = ["bundled"] } [[bin]] name = "show_posts"