Interface ReplicationPoolConfig<Connection, ConnectionOptions>

interface ReplicationPoolConfig<Connection, ConnectionOptions> {
    pool: ReplicationPoolOptions;
    readConfig: null | readonly ConnectionOptions[];
    timeoutErrorClass?: Class<Error>;
    writeConfig: ConnectionOptions;
    afterAcquire?(connection, options): Promise<void>;
    beforeAcquire?(options): Promise<void>;
    connect(options): Promise<Connection>;
    disconnect(connection): Promise<void>;
    validate(connection): boolean;
}

Type Parameters

  • Connection extends object
  • ConnectionOptions extends object

Properties

readConfig: null | readonly ConnectionOptions[]
timeoutErrorClass?: Class<Error>
writeConfig: ConnectionOptions

Methods