-
Notifications
You must be signed in to change notification settings - Fork 180
/
Copy pathextensionsTypes.ts
72 lines (66 loc) · 1.31 KB
/
extensionsTypes.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import type {
DropOptions,
IfNotExistsOption,
LiteralUnion,
} from './generalTypes';
export type Extension =
| 'adminpack'
| 'amcheck'
| 'auth_delay'
| 'auto_explain'
| 'bloom'
| 'btree_gin'
| 'btree_gist'
| 'citext'
| 'cube'
| 'dblink'
| 'dict_int'
| 'dict_xsyn'
| 'earthdistance'
| 'file_fdw'
| 'fuzzystrmatch'
| 'hstore'
| 'intagg'
| 'intarray'
| 'isn'
| 'lo'
| 'ltree'
| 'pageinspect'
| 'passwordcheck'
| 'pg_buffercache'
| 'pgcrypto'
| 'pg_freespacemap'
| 'pg_prewarm'
| 'pgrowlocks'
| 'pg_stat_statements'
| 'pgstattuple'
| 'pg_trgm'
| 'pg_visibility'
| 'postgres_fdw'
| 'seg'
| 'sepgsql'
| 'spi'
| 'sslinfo'
| 'tablefunc'
| 'tcn'
| 'test_decoding'
| 'tsm_system_rows'
| 'tsm_system_time'
| 'unaccent'
| 'uuid-ossp'
| 'xml2';
export interface CreateExtensionOptions extends IfNotExistsOption {
schema?: string;
}
type StringExtension = LiteralUnion<Extension>;
type CreateExtensionFn = (
extension: StringExtension | StringExtension[],
options?: CreateExtensionOptions & DropOptions
) => string | string[];
export type CreateExtension = CreateExtensionFn & {
reverse: CreateExtensionFn;
};
export type DropExtension = (
extension: StringExtension | StringExtension[],
dropOptions?: DropOptions
) => string | string[];