UNPKG

typeorm

Version:

Data-Mapper ORM for TypeScript, ES7, ES6, ES5. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, MongoDB databases.

50 lines (49 loc) 1.5 kB
import { BaseDataSourceOptions } from "../../data-source/BaseDataSourceOptions"; import { CockroachConnectionCredentialsOptions } from "./CockroachConnectionCredentialsOptions"; /** * Cockroachdb-specific connection options. */ export interface CockroachConnectionOptions extends BaseDataSourceOptions, CockroachConnectionCredentialsOptions { /** * Database type. */ readonly type: "cockroachdb"; /** * Enable time travel queries on cockroachdb. * https://www.cockroachlabs.com/docs/stable/as-of-system-time.html */ readonly timeTravelQueries: boolean; /** * Schema name. */ readonly schema?: string; /** * The driver object * This defaults to `require("pg")`. */ readonly driver?: any; /** * The driver object * This defaults to `require("pg-native")`. */ readonly nativeDriver?: any; /** * Replication setup. */ readonly replication?: { /** * Master server used by orm to perform writes. */ readonly master: CockroachConnectionCredentialsOptions; /** * List of read-from severs (slaves). */ readonly slaves: CockroachConnectionCredentialsOptions[]; }; /** * sets the application_name var to help db administrators identify * the service using this connection. Defaults to 'undefined' */ readonly applicationName?: string; readonly poolErrorHandler?: (err: any) => any; }