@prisma/studio-core 0.0.0-dev.202503270044 → 0.0.0-dev.202503272001
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Adapter-C2FVF4Hg.d.cts +119 -0
- package/dist/Adapter-C2FVF4Hg.d.ts +119 -0
- package/dist/data/index.d.cts +2 -119
- package/dist/data/index.d.ts +2 -119
- package/dist/index-FU6KGEKZ.css +1727 -0
- package/dist/ui/index.cjs +171 -1
- package/dist/ui/index.d.cts +19 -2
- package/dist/ui/index.d.ts +19 -2
- package/dist/ui/index.js +171 -1
- package/package.json +34 -8
- package/dist/ui/index.css +0 -2
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
type Either<E, R> = [E] | [null, R];
|
|
2
|
+
interface Adapter {
|
|
3
|
+
introspect(): Promise<Either<Error, InstrospectResult>>;
|
|
4
|
+
query(input: QueryInput): Promise<Either<Error, QueryResult>>;
|
|
5
|
+
mutate(inputs: MutateInput[]): Promise<Either<Error, MutateResult>>;
|
|
6
|
+
alter(inputs: AlterInput[]): Promise<Either<Error, AlterResult>>;
|
|
7
|
+
rawQuery(input: RawQueryInput): Promise<Either<Error, RawQueryResult>>;
|
|
8
|
+
}
|
|
9
|
+
type EnumName = string;
|
|
10
|
+
type TableName = string;
|
|
11
|
+
type ColumnName = string;
|
|
12
|
+
type SchemaName = string;
|
|
13
|
+
type InstrospectResult = {
|
|
14
|
+
schemas: Record<SchemaName, InstrospectSchemaMeta>;
|
|
15
|
+
filters: Record<QueryFilterOperator, boolean>;
|
|
16
|
+
};
|
|
17
|
+
type InstrospectSchemaMeta = {
|
|
18
|
+
tables: Record<TableName, InstrospectTableMeta>;
|
|
19
|
+
enums: Record<EnumName, EnumMeta>;
|
|
20
|
+
};
|
|
21
|
+
type InstrospectTableMeta = {
|
|
22
|
+
schema: SchemaName;
|
|
23
|
+
name: TableName;
|
|
24
|
+
columns: Record<ColumnName, InstrospectColumnMeta>;
|
|
25
|
+
};
|
|
26
|
+
type InstrospectColumnMeta = {
|
|
27
|
+
schema: SchemaName;
|
|
28
|
+
table: TableName;
|
|
29
|
+
name: ColumnName;
|
|
30
|
+
dataType: IntrospectDataType;
|
|
31
|
+
uiType: IntrospectUiType;
|
|
32
|
+
defaults: unknown;
|
|
33
|
+
nullable: boolean;
|
|
34
|
+
partOfPk: boolean;
|
|
35
|
+
reference: InstrospectTableMeta | null;
|
|
36
|
+
};
|
|
37
|
+
type IntrospectDataType = {
|
|
38
|
+
name: string;
|
|
39
|
+
args: (string | number)[];
|
|
40
|
+
};
|
|
41
|
+
type IntrospectUiType = {
|
|
42
|
+
kind: "string";
|
|
43
|
+
isList: boolean;
|
|
44
|
+
max: number;
|
|
45
|
+
min: number;
|
|
46
|
+
} | {
|
|
47
|
+
kind: "number";
|
|
48
|
+
isList: boolean;
|
|
49
|
+
max: number;
|
|
50
|
+
min: number;
|
|
51
|
+
} | {
|
|
52
|
+
kind: "decimal";
|
|
53
|
+
isList: boolean;
|
|
54
|
+
max: number;
|
|
55
|
+
min: number;
|
|
56
|
+
decimalPlaces: number;
|
|
57
|
+
} | {
|
|
58
|
+
kind: "boolean";
|
|
59
|
+
isList: boolean;
|
|
60
|
+
} | {
|
|
61
|
+
kind: "datetime";
|
|
62
|
+
isList: boolean;
|
|
63
|
+
} | {
|
|
64
|
+
kind: "json";
|
|
65
|
+
isList: boolean;
|
|
66
|
+
} | {
|
|
67
|
+
kind: "blob";
|
|
68
|
+
isList: boolean;
|
|
69
|
+
} | {
|
|
70
|
+
kind: "enum";
|
|
71
|
+
isList: boolean;
|
|
72
|
+
name: EnumName;
|
|
73
|
+
values: string[];
|
|
74
|
+
};
|
|
75
|
+
type EnumMeta = {
|
|
76
|
+
name: EnumName;
|
|
77
|
+
values: string[];
|
|
78
|
+
};
|
|
79
|
+
type QueryInput = {
|
|
80
|
+
schema: SchemaName;
|
|
81
|
+
table: TableName;
|
|
82
|
+
filters: QueryFilter[][];
|
|
83
|
+
sortings: QuerySorting[];
|
|
84
|
+
limit?: number;
|
|
85
|
+
offset?: number;
|
|
86
|
+
};
|
|
87
|
+
type QueryFilter = {
|
|
88
|
+
column: ColumnName;
|
|
89
|
+
operator: QueryFilterOperator;
|
|
90
|
+
value: unknown[] | InstrospectColumnMeta[];
|
|
91
|
+
not?: boolean;
|
|
92
|
+
};
|
|
93
|
+
type QuerySorting = {
|
|
94
|
+
column: ColumnName;
|
|
95
|
+
order: "asc" | "desc";
|
|
96
|
+
};
|
|
97
|
+
type QueryFilterOperator = "=" | ">=" | ">" | "<=" | "<" | "like" | "ilike" | "is null" | (string & {});
|
|
98
|
+
type QueryResult = {
|
|
99
|
+
schema: SchemaName;
|
|
100
|
+
table: TableName;
|
|
101
|
+
fetchedAt: number;
|
|
102
|
+
duration: number;
|
|
103
|
+
rows: Record<ColumnName, QueryResultColumn>[];
|
|
104
|
+
count: number;
|
|
105
|
+
};
|
|
106
|
+
type QueryResultColumn = {
|
|
107
|
+
column: ColumnName;
|
|
108
|
+
value: unknown;
|
|
109
|
+
dataType?: IntrospectDataType;
|
|
110
|
+
uiType?: IntrospectUiType;
|
|
111
|
+
};
|
|
112
|
+
type MutateInput = {};
|
|
113
|
+
type MutateResult = {};
|
|
114
|
+
type AlterInput = {};
|
|
115
|
+
type AlterResult = {};
|
|
116
|
+
type RawQueryInput = {};
|
|
117
|
+
type RawQueryResult = {};
|
|
118
|
+
|
|
119
|
+
export type { Adapter as A, Either as E, InstrospectResult as I, MutateInput as M, QueryInput as Q, RawQueryInput as R, QueryResult as a, MutateResult as b, AlterInput as c, AlterResult as d, RawQueryResult as e };
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
type Either<E, R> = [E] | [null, R];
|
|
2
|
+
interface Adapter {
|
|
3
|
+
introspect(): Promise<Either<Error, InstrospectResult>>;
|
|
4
|
+
query(input: QueryInput): Promise<Either<Error, QueryResult>>;
|
|
5
|
+
mutate(inputs: MutateInput[]): Promise<Either<Error, MutateResult>>;
|
|
6
|
+
alter(inputs: AlterInput[]): Promise<Either<Error, AlterResult>>;
|
|
7
|
+
rawQuery(input: RawQueryInput): Promise<Either<Error, RawQueryResult>>;
|
|
8
|
+
}
|
|
9
|
+
type EnumName = string;
|
|
10
|
+
type TableName = string;
|
|
11
|
+
type ColumnName = string;
|
|
12
|
+
type SchemaName = string;
|
|
13
|
+
type InstrospectResult = {
|
|
14
|
+
schemas: Record<SchemaName, InstrospectSchemaMeta>;
|
|
15
|
+
filters: Record<QueryFilterOperator, boolean>;
|
|
16
|
+
};
|
|
17
|
+
type InstrospectSchemaMeta = {
|
|
18
|
+
tables: Record<TableName, InstrospectTableMeta>;
|
|
19
|
+
enums: Record<EnumName, EnumMeta>;
|
|
20
|
+
};
|
|
21
|
+
type InstrospectTableMeta = {
|
|
22
|
+
schema: SchemaName;
|
|
23
|
+
name: TableName;
|
|
24
|
+
columns: Record<ColumnName, InstrospectColumnMeta>;
|
|
25
|
+
};
|
|
26
|
+
type InstrospectColumnMeta = {
|
|
27
|
+
schema: SchemaName;
|
|
28
|
+
table: TableName;
|
|
29
|
+
name: ColumnName;
|
|
30
|
+
dataType: IntrospectDataType;
|
|
31
|
+
uiType: IntrospectUiType;
|
|
32
|
+
defaults: unknown;
|
|
33
|
+
nullable: boolean;
|
|
34
|
+
partOfPk: boolean;
|
|
35
|
+
reference: InstrospectTableMeta | null;
|
|
36
|
+
};
|
|
37
|
+
type IntrospectDataType = {
|
|
38
|
+
name: string;
|
|
39
|
+
args: (string | number)[];
|
|
40
|
+
};
|
|
41
|
+
type IntrospectUiType = {
|
|
42
|
+
kind: "string";
|
|
43
|
+
isList: boolean;
|
|
44
|
+
max: number;
|
|
45
|
+
min: number;
|
|
46
|
+
} | {
|
|
47
|
+
kind: "number";
|
|
48
|
+
isList: boolean;
|
|
49
|
+
max: number;
|
|
50
|
+
min: number;
|
|
51
|
+
} | {
|
|
52
|
+
kind: "decimal";
|
|
53
|
+
isList: boolean;
|
|
54
|
+
max: number;
|
|
55
|
+
min: number;
|
|
56
|
+
decimalPlaces: number;
|
|
57
|
+
} | {
|
|
58
|
+
kind: "boolean";
|
|
59
|
+
isList: boolean;
|
|
60
|
+
} | {
|
|
61
|
+
kind: "datetime";
|
|
62
|
+
isList: boolean;
|
|
63
|
+
} | {
|
|
64
|
+
kind: "json";
|
|
65
|
+
isList: boolean;
|
|
66
|
+
} | {
|
|
67
|
+
kind: "blob";
|
|
68
|
+
isList: boolean;
|
|
69
|
+
} | {
|
|
70
|
+
kind: "enum";
|
|
71
|
+
isList: boolean;
|
|
72
|
+
name: EnumName;
|
|
73
|
+
values: string[];
|
|
74
|
+
};
|
|
75
|
+
type EnumMeta = {
|
|
76
|
+
name: EnumName;
|
|
77
|
+
values: string[];
|
|
78
|
+
};
|
|
79
|
+
type QueryInput = {
|
|
80
|
+
schema: SchemaName;
|
|
81
|
+
table: TableName;
|
|
82
|
+
filters: QueryFilter[][];
|
|
83
|
+
sortings: QuerySorting[];
|
|
84
|
+
limit?: number;
|
|
85
|
+
offset?: number;
|
|
86
|
+
};
|
|
87
|
+
type QueryFilter = {
|
|
88
|
+
column: ColumnName;
|
|
89
|
+
operator: QueryFilterOperator;
|
|
90
|
+
value: unknown[] | InstrospectColumnMeta[];
|
|
91
|
+
not?: boolean;
|
|
92
|
+
};
|
|
93
|
+
type QuerySorting = {
|
|
94
|
+
column: ColumnName;
|
|
95
|
+
order: "asc" | "desc";
|
|
96
|
+
};
|
|
97
|
+
type QueryFilterOperator = "=" | ">=" | ">" | "<=" | "<" | "like" | "ilike" | "is null" | (string & {});
|
|
98
|
+
type QueryResult = {
|
|
99
|
+
schema: SchemaName;
|
|
100
|
+
table: TableName;
|
|
101
|
+
fetchedAt: number;
|
|
102
|
+
duration: number;
|
|
103
|
+
rows: Record<ColumnName, QueryResultColumn>[];
|
|
104
|
+
count: number;
|
|
105
|
+
};
|
|
106
|
+
type QueryResultColumn = {
|
|
107
|
+
column: ColumnName;
|
|
108
|
+
value: unknown;
|
|
109
|
+
dataType?: IntrospectDataType;
|
|
110
|
+
uiType?: IntrospectUiType;
|
|
111
|
+
};
|
|
112
|
+
type MutateInput = {};
|
|
113
|
+
type MutateResult = {};
|
|
114
|
+
type AlterInput = {};
|
|
115
|
+
type AlterResult = {};
|
|
116
|
+
type RawQueryInput = {};
|
|
117
|
+
type RawQueryResult = {};
|
|
118
|
+
|
|
119
|
+
export type { Adapter as A, Either as E, InstrospectResult as I, MutateInput as M, QueryInput as Q, RawQueryInput as R, QueryResult as a, MutateResult as b, AlterInput as c, AlterResult as d, RawQueryResult as e };
|
package/dist/data/index.d.cts
CHANGED
|
@@ -1,124 +1,7 @@
|
|
|
1
|
+
import { A as Adapter, E as Either, I as InstrospectResult, Q as QueryInput, a as QueryResult, M as MutateInput, b as MutateResult, c as AlterInput, d as AlterResult, R as RawQueryInput, e as RawQueryResult } from '../Adapter-C2FVF4Hg.cjs';
|
|
1
2
|
export { Q as Query, a as QueryResult } from '../query-L1_vLuFd.cjs';
|
|
2
3
|
import 'kysely';
|
|
3
4
|
|
|
4
|
-
type Either<E, R> = [E] | [null, R];
|
|
5
|
-
interface Adapter {
|
|
6
|
-
introspect(): Promise<Either<Error, InstrospectResult>>;
|
|
7
|
-
query(input: QueryInput): Promise<Either<Error, QueryResult>>;
|
|
8
|
-
mutate(inputs: MutateInput[]): Promise<Either<Error, MutateResult>>;
|
|
9
|
-
alter(inputs: AlterInput[]): Promise<Either<Error, AlterResult>>;
|
|
10
|
-
rawQuery(input: RawQueryInput): Promise<Either<Error, RawQueryResult>>;
|
|
11
|
-
}
|
|
12
|
-
type EnumName = string;
|
|
13
|
-
type TableName = string;
|
|
14
|
-
type ColumnName = string;
|
|
15
|
-
type SchemaName = string;
|
|
16
|
-
type InstrospectResult = {
|
|
17
|
-
schemas: Record<SchemaName, InstrospectSchemaMeta>;
|
|
18
|
-
filters: Record<QueryFilterOperator, boolean>;
|
|
19
|
-
};
|
|
20
|
-
type InstrospectSchemaMeta = {
|
|
21
|
-
tables: Record<TableName, InstrospectTableMeta>;
|
|
22
|
-
enums: Record<EnumName, EnumMeta>;
|
|
23
|
-
};
|
|
24
|
-
type InstrospectTableMeta = {
|
|
25
|
-
schema: SchemaName;
|
|
26
|
-
name: TableName;
|
|
27
|
-
columns: Record<ColumnName, InstrospectColumnMeta>;
|
|
28
|
-
};
|
|
29
|
-
type InstrospectColumnMeta = {
|
|
30
|
-
schema: SchemaName;
|
|
31
|
-
table: TableName;
|
|
32
|
-
name: ColumnName;
|
|
33
|
-
dataType: IntrospectDataType;
|
|
34
|
-
uiType: IntrospectUiType;
|
|
35
|
-
defaults: unknown;
|
|
36
|
-
nullable: boolean;
|
|
37
|
-
partOfPk: boolean;
|
|
38
|
-
reference: InstrospectTableMeta | null;
|
|
39
|
-
};
|
|
40
|
-
type IntrospectDataType = {
|
|
41
|
-
name: string;
|
|
42
|
-
args: (string | number)[];
|
|
43
|
-
};
|
|
44
|
-
type IntrospectUiType = {
|
|
45
|
-
kind: "string";
|
|
46
|
-
isList: boolean;
|
|
47
|
-
max: number;
|
|
48
|
-
min: number;
|
|
49
|
-
} | {
|
|
50
|
-
kind: "number";
|
|
51
|
-
isList: boolean;
|
|
52
|
-
max: number;
|
|
53
|
-
min: number;
|
|
54
|
-
} | {
|
|
55
|
-
kind: "decimal";
|
|
56
|
-
isList: boolean;
|
|
57
|
-
max: number;
|
|
58
|
-
min: number;
|
|
59
|
-
decimalPlaces: number;
|
|
60
|
-
} | {
|
|
61
|
-
kind: "boolean";
|
|
62
|
-
isList: boolean;
|
|
63
|
-
} | {
|
|
64
|
-
kind: "datetime";
|
|
65
|
-
isList: boolean;
|
|
66
|
-
} | {
|
|
67
|
-
kind: "json";
|
|
68
|
-
isList: boolean;
|
|
69
|
-
} | {
|
|
70
|
-
kind: "blob";
|
|
71
|
-
isList: boolean;
|
|
72
|
-
} | {
|
|
73
|
-
kind: "enum";
|
|
74
|
-
isList: boolean;
|
|
75
|
-
name: EnumName;
|
|
76
|
-
values: string[];
|
|
77
|
-
};
|
|
78
|
-
type EnumMeta = {
|
|
79
|
-
name: EnumName;
|
|
80
|
-
values: string[];
|
|
81
|
-
};
|
|
82
|
-
type QueryInput = {
|
|
83
|
-
schema: SchemaName;
|
|
84
|
-
table: TableName;
|
|
85
|
-
filters: QueryFilter[][];
|
|
86
|
-
sortings: QuerySorting[];
|
|
87
|
-
limit?: number;
|
|
88
|
-
offset?: number;
|
|
89
|
-
};
|
|
90
|
-
type QueryFilter = {
|
|
91
|
-
column: ColumnName;
|
|
92
|
-
operator: QueryFilterOperator;
|
|
93
|
-
value: unknown[] | InstrospectColumnMeta[];
|
|
94
|
-
not?: boolean;
|
|
95
|
-
};
|
|
96
|
-
type QuerySorting = {
|
|
97
|
-
column: ColumnName;
|
|
98
|
-
order: "asc" | "desc";
|
|
99
|
-
};
|
|
100
|
-
type QueryFilterOperator = "=" | ">=" | ">" | "<=" | "<" | "like" | "ilike" | "is null" | (string & {});
|
|
101
|
-
type QueryResult = {
|
|
102
|
-
schema: SchemaName;
|
|
103
|
-
table: TableName;
|
|
104
|
-
fetchedAt: number;
|
|
105
|
-
duration: number;
|
|
106
|
-
rows: Record<ColumnName, QueryResultColumn>[];
|
|
107
|
-
count: number;
|
|
108
|
-
};
|
|
109
|
-
type QueryResultColumn = {
|
|
110
|
-
column: ColumnName;
|
|
111
|
-
value: unknown;
|
|
112
|
-
dataType?: IntrospectDataType;
|
|
113
|
-
uiType?: IntrospectUiType;
|
|
114
|
-
};
|
|
115
|
-
type MutateInput = {};
|
|
116
|
-
type MutateResult = {};
|
|
117
|
-
type AlterInput = {};
|
|
118
|
-
type AlterResult = {};
|
|
119
|
-
type RawQueryInput = {};
|
|
120
|
-
type RawQueryResult = {};
|
|
121
|
-
|
|
122
5
|
declare class AdapterMock implements Adapter {
|
|
123
6
|
introspect(): Promise<Either<Error, InstrospectResult>>;
|
|
124
7
|
query(input: QueryInput): Promise<Either<Error, QueryResult>>;
|
|
@@ -127,4 +10,4 @@ declare class AdapterMock implements Adapter {
|
|
|
127
10
|
rawQuery(input: RawQueryInput): Promise<Either<Error, RawQueryResult>>;
|
|
128
11
|
}
|
|
129
12
|
|
|
130
|
-
export {
|
|
13
|
+
export { Adapter, AdapterMock };
|
package/dist/data/index.d.ts
CHANGED
|
@@ -1,124 +1,7 @@
|
|
|
1
|
+
import { A as Adapter, E as Either, I as InstrospectResult, Q as QueryInput, a as QueryResult, M as MutateInput, b as MutateResult, c as AlterInput, d as AlterResult, R as RawQueryInput, e as RawQueryResult } from '../Adapter-C2FVF4Hg.js';
|
|
1
2
|
export { Q as Query, a as QueryResult } from '../query-L1_vLuFd.js';
|
|
2
3
|
import 'kysely';
|
|
3
4
|
|
|
4
|
-
type Either<E, R> = [E] | [null, R];
|
|
5
|
-
interface Adapter {
|
|
6
|
-
introspect(): Promise<Either<Error, InstrospectResult>>;
|
|
7
|
-
query(input: QueryInput): Promise<Either<Error, QueryResult>>;
|
|
8
|
-
mutate(inputs: MutateInput[]): Promise<Either<Error, MutateResult>>;
|
|
9
|
-
alter(inputs: AlterInput[]): Promise<Either<Error, AlterResult>>;
|
|
10
|
-
rawQuery(input: RawQueryInput): Promise<Either<Error, RawQueryResult>>;
|
|
11
|
-
}
|
|
12
|
-
type EnumName = string;
|
|
13
|
-
type TableName = string;
|
|
14
|
-
type ColumnName = string;
|
|
15
|
-
type SchemaName = string;
|
|
16
|
-
type InstrospectResult = {
|
|
17
|
-
schemas: Record<SchemaName, InstrospectSchemaMeta>;
|
|
18
|
-
filters: Record<QueryFilterOperator, boolean>;
|
|
19
|
-
};
|
|
20
|
-
type InstrospectSchemaMeta = {
|
|
21
|
-
tables: Record<TableName, InstrospectTableMeta>;
|
|
22
|
-
enums: Record<EnumName, EnumMeta>;
|
|
23
|
-
};
|
|
24
|
-
type InstrospectTableMeta = {
|
|
25
|
-
schema: SchemaName;
|
|
26
|
-
name: TableName;
|
|
27
|
-
columns: Record<ColumnName, InstrospectColumnMeta>;
|
|
28
|
-
};
|
|
29
|
-
type InstrospectColumnMeta = {
|
|
30
|
-
schema: SchemaName;
|
|
31
|
-
table: TableName;
|
|
32
|
-
name: ColumnName;
|
|
33
|
-
dataType: IntrospectDataType;
|
|
34
|
-
uiType: IntrospectUiType;
|
|
35
|
-
defaults: unknown;
|
|
36
|
-
nullable: boolean;
|
|
37
|
-
partOfPk: boolean;
|
|
38
|
-
reference: InstrospectTableMeta | null;
|
|
39
|
-
};
|
|
40
|
-
type IntrospectDataType = {
|
|
41
|
-
name: string;
|
|
42
|
-
args: (string | number)[];
|
|
43
|
-
};
|
|
44
|
-
type IntrospectUiType = {
|
|
45
|
-
kind: "string";
|
|
46
|
-
isList: boolean;
|
|
47
|
-
max: number;
|
|
48
|
-
min: number;
|
|
49
|
-
} | {
|
|
50
|
-
kind: "number";
|
|
51
|
-
isList: boolean;
|
|
52
|
-
max: number;
|
|
53
|
-
min: number;
|
|
54
|
-
} | {
|
|
55
|
-
kind: "decimal";
|
|
56
|
-
isList: boolean;
|
|
57
|
-
max: number;
|
|
58
|
-
min: number;
|
|
59
|
-
decimalPlaces: number;
|
|
60
|
-
} | {
|
|
61
|
-
kind: "boolean";
|
|
62
|
-
isList: boolean;
|
|
63
|
-
} | {
|
|
64
|
-
kind: "datetime";
|
|
65
|
-
isList: boolean;
|
|
66
|
-
} | {
|
|
67
|
-
kind: "json";
|
|
68
|
-
isList: boolean;
|
|
69
|
-
} | {
|
|
70
|
-
kind: "blob";
|
|
71
|
-
isList: boolean;
|
|
72
|
-
} | {
|
|
73
|
-
kind: "enum";
|
|
74
|
-
isList: boolean;
|
|
75
|
-
name: EnumName;
|
|
76
|
-
values: string[];
|
|
77
|
-
};
|
|
78
|
-
type EnumMeta = {
|
|
79
|
-
name: EnumName;
|
|
80
|
-
values: string[];
|
|
81
|
-
};
|
|
82
|
-
type QueryInput = {
|
|
83
|
-
schema: SchemaName;
|
|
84
|
-
table: TableName;
|
|
85
|
-
filters: QueryFilter[][];
|
|
86
|
-
sortings: QuerySorting[];
|
|
87
|
-
limit?: number;
|
|
88
|
-
offset?: number;
|
|
89
|
-
};
|
|
90
|
-
type QueryFilter = {
|
|
91
|
-
column: ColumnName;
|
|
92
|
-
operator: QueryFilterOperator;
|
|
93
|
-
value: unknown[] | InstrospectColumnMeta[];
|
|
94
|
-
not?: boolean;
|
|
95
|
-
};
|
|
96
|
-
type QuerySorting = {
|
|
97
|
-
column: ColumnName;
|
|
98
|
-
order: "asc" | "desc";
|
|
99
|
-
};
|
|
100
|
-
type QueryFilterOperator = "=" | ">=" | ">" | "<=" | "<" | "like" | "ilike" | "is null" | (string & {});
|
|
101
|
-
type QueryResult = {
|
|
102
|
-
schema: SchemaName;
|
|
103
|
-
table: TableName;
|
|
104
|
-
fetchedAt: number;
|
|
105
|
-
duration: number;
|
|
106
|
-
rows: Record<ColumnName, QueryResultColumn>[];
|
|
107
|
-
count: number;
|
|
108
|
-
};
|
|
109
|
-
type QueryResultColumn = {
|
|
110
|
-
column: ColumnName;
|
|
111
|
-
value: unknown;
|
|
112
|
-
dataType?: IntrospectDataType;
|
|
113
|
-
uiType?: IntrospectUiType;
|
|
114
|
-
};
|
|
115
|
-
type MutateInput = {};
|
|
116
|
-
type MutateResult = {};
|
|
117
|
-
type AlterInput = {};
|
|
118
|
-
type AlterResult = {};
|
|
119
|
-
type RawQueryInput = {};
|
|
120
|
-
type RawQueryResult = {};
|
|
121
|
-
|
|
122
5
|
declare class AdapterMock implements Adapter {
|
|
123
6
|
introspect(): Promise<Either<Error, InstrospectResult>>;
|
|
124
7
|
query(input: QueryInput): Promise<Either<Error, QueryResult>>;
|
|
@@ -127,4 +10,4 @@ declare class AdapterMock implements Adapter {
|
|
|
127
10
|
rawQuery(input: RawQueryInput): Promise<Either<Error, RawQueryResult>>;
|
|
128
11
|
}
|
|
129
12
|
|
|
130
|
-
export {
|
|
13
|
+
export { Adapter, AdapterMock };
|