LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

sqlx

Rust SQL toolkit with compile-time checks

TLDR

Create database
$ sqlx database create
copy
Run migrations
$ sqlx migrate run
copy
Create migration
$ sqlx migrate add [migration_name]
copy
Revert migration
$ sqlx migrate revert
copy
Prepare offline
$ sqlx prepare
copy
Check queries
$ sqlx prepare --check
copy

SYNOPSIS

sqlx command [options]

DESCRIPTION

sqlx is a command-line tool for the SQLx Rust SQL toolkit that provides database migration management and compile-time query verification. It supports PostgreSQL, MySQL, MariaDB, and SQLite.The migration system creates versioned SQL scripts that track schema changes, with commands to create, run, and revert migrations. The prepare command caches query metadata to a JSON file, enabling compile-time type checking of SQL queries in Rust code without requiring a live database connection during builds.A DATABASE_URL environment variable or .env file must specify the database connection string for all operations.

PARAMETERS

database

Database operations.
migrate
Migration commands.
prepare
Prepare for offline.
--database-url URL
Connection string.
add
Add migration.
run
Run migrations.

CONFIGURATION

DATABASE_URL

Environment variable specifying the database connection string (e.g., postgres://user:pass@host/db, sqlite:data.db).
.env
Project-level file where DATABASE_URL can be defined; automatically loaded by sqlx commands.

INSTALL

sudo apk add sqlx
copy

CAVEATS

Rust development tool. DATABASE_URL required. Compile-time checks.

HISTORY

sqlx is a Rust SQL toolkit providing compile-time checked queries and database migrations.

SEE ALSO

diesel(1), psql(1), sqlite3(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid