Crate testkit_postgres

Source

Re-exports§

pub use tokio_postgres::*;

Modules§

tokio_postgres

Macros§

boxed_async
Macro to automatically box an async block for use with the boxed database API

Structs§

DatabaseConfig
Re-export the traits from testkit-core Configuration for database connections
DatabaseName
Re-export the traits from testkit-core A unique database name
TestContext
Re-export the traits from testkit-core A test context that contains a database instance
TestDatabaseInstance
Re-export the traits from testkit-core A test database that handles setup, connections, and cleanup TODO: Create a TestManager that can handle connection pooling and cleanup

Enums§

PostgresError
Error type for PostgreSQL operations

Traits§

DatabaseBackend
Re-export the traits from testkit-core Trait defining a test database abstraction
DatabasePool
Re-export the traits from testkit-core
TestDatabaseConnection
Re-export the traits from testkit-core
TransactionManager
TransactionTrait

Functions§

with_boxed_database
Create a new database entry point with the given backend
with_boxed_database_config
Create a new database entry point with the given backend and config
with_connection
Execute a function with a newly created connection and automatically close it
with_connection_string
Execute a function with a newly created connection using a connection string
with_database
Create a new database entry point with the given backend
with_postgres_connection
Execute a function with a direct database connection using tokio-postgres This is the most efficient way to perform a one-off database operation The connection is automatically closed when the operation completes