Member Junction
    Preparing search index...

    Manages the PostgreSQL connection pool lifecycle. Provides a clean API for acquiring and releasing connections.

    Index

    Constructors

    Accessors

    Methods

    • Closes the connection pool and releases all connections. If the pool was shared via InitializeWithExistingPool(), this is a no-op since the pool lifecycle is managed by the original owner.

      Race-safe: clears _pool before awaiting pool.end() so concurrent callers (e.g. parallel Refresh()Config()Initialize() paths during mj sync push --parallel-batch-size > 1) can't both observe a non-null _pool and both invoke pool.end() on the same pool, which pg-pool rejects with Called end on pool more than once. The local pool reference keeps the awaited end() bound to the correct instance.

      Returns Promise<void>

    • Executes a query using the pool directly (auto-acquires and releases).

      Type Parameters

      • T extends QueryResultRow = Record<string, unknown>

      Parameters

      • text: string
      • Optionalvalues: unknown[]

      Returns Promise<QueryResult<T>>