Database executor implementations for sqlw.
Provides async database connections with a unified interface.
Features
sqlite- Rusqlite support viatokio-rusqliteturso- Turso/libSQL support (default)postgres- PostgreSQL support viabb8connection pool withtokio-postgresmysql- MySQL support viamysql_async
Module Layout
Each backend module is self-contained:
postgrescontains bothPostgresExecutorandPostgresRowRefmysqlcontains bothMySqlExecutorandMySqlRowRefsqlitecontains bothSqliteExecutorandSqliteRowReftursocontains bothTursoExecutorandTursoRowRef
Example
use sqlw::{QueryExecutor, query_qmark as query};
use sqlw_backend::turso::TursoExecutor;
let executor = TursoExecutor::new(|| async {
turso::Builder::new_local("file.db").build().await?
.connect()
}).await?;
let users: Vec<User> = executor.query_list(query).await?;