prorm API Reference
    Preparing search index...

    Interface PoolOptions

    Connection-pool sizing and lifecycle. A pooled connection is shared, so session state set on one query is not guaranteed to be visible to the next — use onConnect for settings that must apply to every connection.

    interface PoolOptions {
        max?: number;
        min?: number;
        acquire?: number;
        idle?: number;
        evict?: number;
        handleDisconnects?: boolean;
        onConnect?: (connection: any) => void;
        onDisconnect?: (connection: any) => void;
        enableEvents?: boolean;
        logPoolOperations?: boolean;
    }

    Hierarchy (View Summary)

    Index
    max?: number

    Maximum number of connections in the pool

    min?: number

    Minimum number of idle connections to maintain

    acquire?: number

    Maximum time in milliseconds to wait for a connection to become available

    idle?: number

    Maximum time in milliseconds that a connection can be idle before being evicted

    evict?: number

    Interval in milliseconds to check for idle connections to evict

    handleDisconnects?: boolean

    Whether to automatically handle disconnects

    onConnect?: (connection: any) => void

    Callback when a connection is acquired from the pool

    onDisconnect?: (connection: any) => void

    Callback when a connection is released back to the pool

    enableEvents?: boolean

    Enable pool event emission (for monitoring/debugging)

    logPoolOperations?: boolean

    Log pool operations (acquire, release, etc.)