Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change SQLite examples #3805

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/sqlite/all_about_inserts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions examples/sqlite/getting_started_step_1/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
12 changes: 12 additions & 0 deletions examples/sqlite/getting_started_step_1/README.md
Original file line number Diff line number Diff line change
@@ -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
```
1 change: 1 addition & 0 deletions examples/sqlite/getting_started_step_2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
15 changes: 15 additions & 0 deletions examples/sqlite/getting_started_step_2/README.md
Original file line number Diff line number Diff line change
@@ -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
```
1 change: 1 addition & 0 deletions examples/sqlite/getting_started_step_3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down