-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.d.ts
54 lines (45 loc) · 1.23 KB
/
types.d.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
export type SelectOptions = {
select?: string;
order?: string;
where?: Record<string, string>
}
export type InsertOptions = {
insert: Record<string, any>;
select?: string;
order?: string;
}
export type UpsertOptions = {
upsert: Record<string, any>[];
select?: string;
order?: string;
}
export type UpdateOptions = {
update: Record<string, any>[];
select?: string;
order?: string;
where?: Record<string, string>;
}
export type DeleteOptions = {
select?: string;
order?: string;
where: Record<string, string>;
}
export type Headers = {
"Authorization": string,
"DB-Name"?: string,
"Prefer"? : "resolution=merge-duplicates"
}
export type ColumnOptions = {
primaryKey?: boolean;
references?: string;
onDelete?: 'no action' | 'restrict' | 'set null' | 'set default' | 'cascade';
onUpdate?: 'no action' | 'restrict' | 'set null' | 'set default' | 'cascade';
}
export type Column = {
type : string;
primaryKey?: boolean;
references? : string;
onDelete?: 'no action' | 'restrict' | 'set null' | 'set default' | 'cascade';
onUpdate?: 'no action' | 'restrict' | 'set null' | 'set default' | 'cascade';
}
export type Table = Record<string, Column>;