mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-18 21:25:09 +01:00
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user