anycms-i18n-sqlx
SQLx database backend for [anycms-i18n].
Loads translations from any SQLx-supported database (PostgreSQL, MySQL, SQLite)
into an in-memory cache at startup, then serves translations synchronously
via the [Backend] trait.
Quick Start
use SqlxBackend;
// PostgreSQL
let pool = connect.await?;
let backend = from_postgres.await?;
// MySQL
let pool = connect.await?;
let backend = from_mysql.await?;
// SQLite
let pool = connect.await?;
let backend = from_sqlite.await?;
// Use as a Backend
use Backend;
assert!;
Custom Table / Column Names
Use [SqlxBackendBuilder] to customize the table and column names:
let backend = new
.table
.locale_col
.key_col
.value_col
.build_postgres
.await?;