dbgate-types 6.5.6 → 6.6.1

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/dbinfo.d.ts CHANGED
@@ -108,6 +108,8 @@ export interface CollectionInfo extends DatabaseObjectInfo {
108
108
  // unique combination of columns (should be contatenation of partitionKey and clusterKey)
109
109
  uniqueKey?: ColumnReference[];
110
110
 
111
+ autoValueColumns?: ColumnReference[];
112
+
111
113
  // partition key columns
112
114
  partitionKey?: ColumnReference[];
113
115
 
package/dialect.d.ts CHANGED
@@ -74,6 +74,14 @@ export interface SqlDialect {
74
74
 
75
75
  predefinedDataTypes: string[];
76
76
 
77
+ columnProperties?: {
78
+ columnName?: boolean;
79
+ isSparse?: true;
80
+ isPersisted?: true;
81
+ };
82
+
83
+ safeCommentChanges?: boolean;
84
+
77
85
  // create sql-tree expression
78
86
  createColumnViewExpression(
79
87
  columnName: string,
package/engines.d.ts CHANGED
@@ -23,6 +23,28 @@ export interface StreamOptions {
23
23
  info?: (info) => void;
24
24
  }
25
25
 
26
+ export type CollectionOperationInfo =
27
+ | {
28
+ type: 'createCollection';
29
+ collection: {
30
+ name: string;
31
+ };
32
+ }
33
+ | {
34
+ type: 'dropCollection';
35
+ collection: string;
36
+ }
37
+ | {
38
+ type: 'renameCollection';
39
+ collection: string;
40
+ newName: string;
41
+ }
42
+ | {
43
+ type: 'cloneCollection';
44
+ collection: string;
45
+ newName: string;
46
+ };
47
+
26
48
  export interface RunScriptOptions {
27
49
  useTransaction: boolean;
28
50
  logScriptItems?: boolean;
@@ -120,6 +142,8 @@ export interface DataEditorTypesBehaviour {
120
142
  parseHexAsBuffer?: boolean;
121
143
  parseObjectIdAsDollar?: boolean;
122
144
  parseDateAsDollar?: boolean;
145
+ parseGeopointAsDollar?: boolean;
146
+ parseFsDocumentRefAsDollar?: boolean;
123
147
 
124
148
  explicitDataType?: boolean;
125
149
  supportNumberType?: boolean;
@@ -140,6 +164,7 @@ export interface FilterBehaviourProvider {
140
164
  export interface DatabaseHandle<TClient = any> {
141
165
  client: TClient;
142
166
  database?: string;
167
+ conid?: string;
143
168
  feedback?: (message: any) => void;
144
169
  getDatabase?: () => any;
145
170
  connectionType?: string;
@@ -217,7 +242,7 @@ export interface EngineDriver<TClient = any> extends FilterBehaviourProvider {
217
242
  defaultSocketPath?: string;
218
243
  authTypeLabel?: string;
219
244
  importExportArgs?: any[];
220
- connect({ server, port, user, password, database }): Promise<DatabaseHandle<TClient>>;
245
+ connect({ server, port, user, password, database, connectionDefinition }): Promise<DatabaseHandle<TClient>>;
221
246
  close(dbhan: DatabaseHandle<TClient>): Promise<any>;
222
247
  query(dbhan: DatabaseHandle<TClient>, sql: string, options?: QueryOptions): Promise<QueryResult>;
223
248
  stream(dbhan: DatabaseHandle<TClient>, sql: string, options: StreamOptions);
@@ -264,7 +289,7 @@ export interface EngineDriver<TClient = any> extends FilterBehaviourProvider {
264
289
  dropDatabase(dbhan: DatabaseHandle<TClient>, name: string): Promise;
265
290
  getQuerySplitterOptions(usage: 'stream' | 'script' | 'editor' | 'import'): any;
266
291
  script(dbhan: DatabaseHandle<TClient>, sql: string, options?: RunScriptOptions): Promise;
267
- operation(dbhan: DatabaseHandle<TClient>, operation: {}, options?: RunScriptOptions): Promise;
292
+ operation(dbhan: DatabaseHandle<TClient>, operation: CollectionOperationInfo, options?: RunScriptOptions): Promise;
268
293
  getNewObjectTemplates(): NewObjectTemplate[];
269
294
  // direct call of dbhan.client method, only some methods could be supported, on only some drivers
270
295
  callMethod(dbhan: DatabaseHandle<TClient>, method, args);
@@ -312,6 +337,11 @@ export interface EngineDriver<TClient = any> extends FilterBehaviourProvider {
312
337
  analyserClass?: any;
313
338
  dumperClass?: any;
314
339
  singleConnectionOnly?: boolean;
340
+ getLogDbInfo(dbhan: DatabaseHandle<TClient>): {
341
+ database?: string;
342
+ engine: string;
343
+ conid?: string;
344
+ };
315
345
  }
316
346
 
317
347
  export interface DatabaseModification {
package/filter-type.d.ts CHANGED
@@ -9,11 +9,18 @@ export interface FilterBehaviour {
9
9
  supportExistsTesting?: boolean;
10
10
  supportBooleanValues?: boolean;
11
11
  supportSqlCondition?: boolean;
12
- supportArrayTesting?: boolean;
12
+ supportEmptyArrayTesting?: boolean;
13
+ supportNotEmptyArrayTesting?: boolean;
14
+ supportBooleanOrNull?: boolean;
13
15
 
14
16
  allowStringToken?: boolean;
15
17
  allowNumberToken?: boolean;
16
18
  allowHexString?: boolean;
17
19
  allowNumberDualTesting?: boolean;
18
20
  allowObjectIdTesting?: boolean;
21
+
22
+ passBooleans?: boolean;
23
+ passNumbers?: boolean;
24
+
25
+ disableOr?: boolean;
19
26
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "6.5.6",
2
+ "version": "6.6.1",
3
3
  "name": "dbgate-types",
4
4
  "homepage": "https://dbgate.org/",
5
5
  "repository": {
package/query.d.ts CHANGED
@@ -15,3 +15,92 @@ export interface QueryResult {
15
15
  columns?: QueryResultColumn[];
16
16
  rowsAffected?: number;
17
17
  }
18
+
19
+ export type LeftOperand = {
20
+ exprType: 'placeholder' | 'column';
21
+ columnName?: string;
22
+ };
23
+
24
+ export type RightOperand = {
25
+ exprType: 'value';
26
+ value: any;
27
+ };
28
+
29
+ export type BinaryCondition = {
30
+ conditionType: 'binary';
31
+ operator: '=' | '!=' | '<>' | '<' | '<=' | '>' | '>=';
32
+ left: LeftOperand;
33
+ right: RightOperand;
34
+ };
35
+
36
+ export type AndCondition = {
37
+ conditionType: 'and';
38
+ conditions: FilterCondition[];
39
+ };
40
+
41
+ export type OrCondition = {
42
+ conditionType: 'or';
43
+ conditions: FilterCondition[];
44
+ };
45
+
46
+ export type NullCondition = {
47
+ conditionType: 'isNull' | 'isNotNull';
48
+ expr: LeftOperand;
49
+ };
50
+
51
+ export type NotCondition = {
52
+ conditionType: 'not';
53
+ condition: FilterCondition;
54
+ };
55
+
56
+ export type LikeCondition = {
57
+ conditionType: 'like';
58
+ left: LeftOperand;
59
+ right: RightOperand;
60
+ };
61
+
62
+ export type PredicateCondition = {
63
+ conditionType: 'specificPredicate';
64
+ predicate: 'exists' | 'notExists' | 'emptyArray' | 'notEmptyArray';
65
+ expr: LeftOperand;
66
+ };
67
+
68
+ export type InCondition = {
69
+ conditionType: 'in';
70
+ expr: LeftOperand;
71
+ values: any[];
72
+ };
73
+
74
+ export type FilterCondition =
75
+ | BinaryCondition
76
+ | AndCondition
77
+ | OrCondition
78
+ | NullCondition
79
+ | NotCondition
80
+ | LikeCondition
81
+ | PredicateCondition
82
+ | InCondition;
83
+
84
+ export type SortItem = {
85
+ columnName: string;
86
+ direction?: 'ASC' | 'DESC';
87
+ };
88
+
89
+ export type AggregateColumn = {
90
+ aggregateFunction: 'count' | 'sum' | 'avg' | 'min' | 'max';
91
+ columnArgument?: string;
92
+ alias: string;
93
+ };
94
+
95
+ export type CollectionAggregate = {
96
+ condition?: FilterCondition;
97
+ groupByColumns: string[];
98
+ aggregateColumns: AggregateColumn[];
99
+ };
100
+
101
+ export type FullQueryOptions = {
102
+ condition?: FilterCondition;
103
+ sort?: SortItem[];
104
+ limit?: number;
105
+ skip?: number;
106
+ };
package/test-engines.d.ts CHANGED
@@ -56,6 +56,9 @@ export type TestEngineInfo = {
56
56
 
57
57
  useTextTypeForStrings?: boolean;
58
58
 
59
+ supportTableComments?: boolean;
60
+ supportColumnComments?: boolean;
61
+
59
62
  supportRenameSqlObject?: boolean;
60
63
  supportSchemas?: boolean;
61
64