HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-10-0-8-47 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:31:58 UTC 2024 aarch64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.22
Disabled: NONE
Upload Files
File: /var/www/api.javaapp.co.uk/node_modules/sequelize/types/dialects/abstract/connection-manager.d.ts
export interface GetConnectionOptions {
  /**
   * Set which replica to use. Available options are `read` and `write`
   */
  type: 'read' | 'write';
  /**
   * Force master or write replica to get connection from
   */
  useMaster?: boolean;
}

export type Connection = object;

export interface ConnectionManager {
  refreshTypeParser(dataTypes: object): void;
  /**
   * Drain the pool and close it permanently
   */
  close(): Promise<void>;
  /**
   * Initialize connection pool. By default pool autostart is set to false, so no connection will be
   * be created unless `pool.acquire` is called.
   */
  initPools(): void;
  /**
   * Get connection from pool. It sets database version if it's not already set.
   * Call pool.acquire to get a connection.
   */
  getConnection(opts: GetConnectionOptions): Promise<Connection>;
  /**
   * Release a pooled connection, so it can be utilized by other connection requests
   */
  releaseConnection(conn: Connection): void;

  /**
   * Destroys a pooled connection and removes it from the pool.
   */
  destroyConnection(conn: Connection): Promise<void>;
}