-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
/
CockroachConnectionOptions.ts
58 lines (50 loc) · 1.42 KB
/
CockroachConnectionOptions.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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"
/**
* 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
/*
* Function handling errors thrown by drivers pool.
* Defaults to logging error with `warn` level.
*/
readonly poolErrorHandler?: (err: any) => any
}