https://github.com/ungana/sqlx-sqlite-database-connection
An example project showing how to use SQLx and SQLite together in a Rust project.
https://github.com/ungana/sqlx-sqlite-database-connection
connection example rust rust-lang sqlite sqlite3 sqlx sqlx-cli
Last synced: 3 days ago
JSON representation
An example project showing how to use SQLx and SQLite together in a Rust project.
- Host: GitHub
- URL: https://github.com/ungana/sqlx-sqlite-database-connection
- Owner: ungana
- Created: 2024-05-01T00:37:37.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-01T00:53:49.000Z (about 2 years ago)
- Last Synced: 2025-06-06T06:03:39.504Z (11 months ago)
- Topics: connection, example, rust, rust-lang, sqlite, sqlite3, sqlx, sqlx-cli
- Language: Rust
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
SQLx with SQLite Example
========================
This is an example of using [SQLx](https://github.com/launchbadge/sqlx) with [SQLite](https://sqlite.org/). It doesn't do too much, but it you can see a simple example of how to setup your project to use the two together.
## Getting Started
You will need [Rust](https://rust-lang.org), [SQLite](https://sqlite.org/)(if your operating system does not already have it) and the [SQLx CLI](https://crates.io/crates/sqlx-cli). Once installed, navigate to this cloned project in the terminal and run:
```bash
cargo run
```
This project simply adds "John Doe" to an `example.db` file. You can see the additions using the [SQLite](https://sqlite.org/) app of your choice and checking the `Users` table.
```sql
SELECT * FROM Users;
```