mirror of
				https://github.com/launchbadge/sqlx.git
				synced 2025-11-04 07:22:53 +00:00 
			
		
		
		
	
		
			
				
	
	
	
		
			427 B
		
	
	
	
	
	
	
	
			
		
		
	
	
			427 B
		
	
	
	
	
	
	
	
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