wasm-sql 0.1.6

Wasmtime host implementation for a SQL component WIT interface. Enables Wasm components to interact with SQL databases via the WebAssembly Component Model.
Documentation
use sqlx::Pool;

#[cfg(feature = "postgres")]
pub(crate) type SqlDatabase = sqlx::Postgres;

#[cfg(feature = "mysql")]
pub(crate) type SqlDatabase = sqlx::Mysql;

#[cfg(any(feature = "sqlite", feature = "sqlite-unbundled"))]
pub(crate) type SqlDatabase = sqlx::Sqlite;

pub struct SqlDB {
    #[allow(dead_code)]
    pub(crate) pool: Pool<SqlDatabase>,
}

impl SqlDB {
    pub fn new(pool: Pool<SqlDatabase>) -> Self {
        Self { pool: pool }
    }
}

pub use sqlx;