feat: added postgres to ffi (#1117)

* feat: added postgres to ffi
This commit is contained in:
asmo
2025-09-30 15:14:28 +02:00
committed by GitHub
parent ddec3bb212
commit cb2e534f81
9 changed files with 853 additions and 389 deletions

View File

@@ -319,9 +319,15 @@ pub type MintPgDatabase = SQLMintDatabase<PgConnectionPool>;
#[cfg(feature = "auth")]
pub type MintPgAuthDatabase = SQLMintAuthDatabase<PgConnectionPool>;
/// Mint DB implementation with PostgresSQL
/// Wallet DB implementation with PostgreSQL
pub type WalletPgDatabase = SQLWalletDatabase<PgConnectionPool>;
/// Convenience free functions (cannot add inherent impls for a foreign type).
/// These mirror the Mint patterns and call through to the generic constructors.
pub async fn new_wallet_pg_database(conn_str: &str) -> Result<WalletPgDatabase, Error> {
<SQLWalletDatabase<PgConnectionPool>>::new(conn_str).await
}
#[cfg(test)]
mod test {
use cdk_common::mint_db_test;