Skip to main content

Crate atrg_db

Crate atrg_db 

Source
Expand description

Database layer for at-rust-go: SQLite connection pooling and migrations.

This crate provides a thin wrapper around sqlx with SQLite, handling connection pool creation with sensible defaults (WAL journal mode, foreign keys enabled) and a two-stage migration system: internal migrations for atrg’s own tables (sessions, etc.) and user-supplied migrations for application-specific schema.

Functions§

connect
Connect to a SQLite database and return a connection pool.
run_internal_migrations
Run atrg’s internal migrations (sessions table, etc.).
run_user_migrations
Run user-supplied migrations from the given directory.

Type Aliases§

DbConn
A SQLite connection pool. This is the primary database handle passed throughout the atrg application via AppState.