glimr_sqlite/console/command
SQLite Command Support
Provides helpers for creating console commands that need SQLite database access. The handler function wraps your command logic with automatic pool management.
Values
pub fn handler(
cmd: command.Command,
db_handler: fn(command.ParsedArgs, pool.Pool) -> Nil,
) -> command.Command
Sets a database handler for a command. Automatically:
- Adds the –database option
- Validates the connection exists and is SQLite
- Starts a typed pool
- Calls your handler with the pool
- Stops the pool when done
Your handler receives a fully typed glimr_sqlite.Pool.