mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-01-05 00:01:36 +00:00
* WIP rt refactors * refactor: break drivers out into separate crates also cleans up significant technical debt
TODOs Example
Setup
-
Declare the database URL
export DATABASE_URL="postgres://postgres:password@localhost/todos" -
Create the database.
$ sqlx db create -
Run sql migrations
$ sqlx migrate run
Usage
Add a todo
cargo run -- add "todo description"
Complete a todo.
cargo run -- done <todo id>
List all todos
cargo run