Skip to main content

insert_many_copy_from_pool

Function insert_many_copy_from_pool 

Source
pub async fn insert_many_copy_from_pool(
    pool: &PgPool,
    jobs: &[InsertParams],
) -> Result<Vec<JobRow>, AwaError>
Expand description

Convenience wrapper that acquires a connection from the pool.

Wraps the operation in a transaction so the ON COMMIT DROP staging table is cleaned up automatically.