@deephaven-enterprise/query-utils 1.20250801.274-beta → 1.20250801.250915083838-g46cfbc5dcf
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/DraftQuery.d.ts +8 -1
- package/dist/DraftQuery.js +6 -2
- package/dist/QueryColumns.js +2 -2
- package/package.json +2 -3
package/dist/DraftQuery.d.ts
CHANGED
|
@@ -3,6 +3,9 @@ import QueryScheduler from './QueryScheduler';
|
|
|
3
3
|
export type ScriptDraftQuery = IDraftQuery & {
|
|
4
4
|
scriptLanguage: string;
|
|
5
5
|
};
|
|
6
|
+
export interface DefaultDraftQuery extends Omit<DraftQuery, 'id' | 'defaults'> {
|
|
7
|
+
id?: string;
|
|
8
|
+
}
|
|
6
9
|
/**
|
|
7
10
|
* TypeScript `type` aliases have implicit index signatures, but `interface`
|
|
8
11
|
* types do not. It is important that all of the types composed into `IDraftQuery`
|
|
@@ -15,6 +18,8 @@ export type IDraftQuery = PlainEditableQueryInfo & {
|
|
|
15
18
|
draftOwner: string;
|
|
16
19
|
initializationThreads?: string;
|
|
17
20
|
updateThreads?: string;
|
|
21
|
+
defaults?: DefaultDraftQuery;
|
|
22
|
+
isModified: boolean;
|
|
18
23
|
};
|
|
19
24
|
export type DraftQueryConstructorObject = Partial<IDraftQuery> & Pick<IDraftQuery, 'name' | 'owner' | 'draftOwner' | 'dbServerName' | 'initializationThreads' | 'updateThreads'>;
|
|
20
25
|
/**
|
|
@@ -62,6 +67,7 @@ export declare class DraftQuery implements IDraftQuery {
|
|
|
62
67
|
readonly ASSIGNMENT_POLICY_PARAMS: "assignmentPolicyParams";
|
|
63
68
|
readonly INITIALIZATION_THREADS: "initializationThreads";
|
|
64
69
|
readonly UPDATE_THREADS: "updateThreads";
|
|
70
|
+
readonly DEFAULTS: "defaults";
|
|
65
71
|
}>;
|
|
66
72
|
/**
|
|
67
73
|
* Checks if a serial id from the server is actually a draft id
|
|
@@ -75,7 +81,7 @@ export declare class DraftQuery implements IDraftQuery {
|
|
|
75
81
|
* @param serial a serial that contains a draft id
|
|
76
82
|
*/
|
|
77
83
|
static serialToDraftId(serial: string): string;
|
|
78
|
-
constructor({ isClientSide, draftOwner, serial, name, owner, type, enabled, enableGcLogs, envVars, heapSize, additionalMemory, dataMemoryRatio, jvmArgs, extraClasspaths, jvmProfile, dbServerName, scriptLanguage, scriptPath, scriptCode, scheduling, adminGroups, viewerGroups, restartUsers, timeout, workerKind, kubernetesControl, pythonControl, genericWorkerControl, typeSpecificFields, replicaCount, spareCount, assignmentPolicy, assignmentPolicyParams, initializationThreads, updateThreads, }: DraftQueryConstructorObject);
|
|
84
|
+
constructor({ isModified, isClientSide, draftOwner, serial, name, owner, type, enabled, enableGcLogs, envVars, heapSize, additionalMemory, dataMemoryRatio, jvmArgs, extraClasspaths, jvmProfile, dbServerName, scriptLanguage, scriptPath, scriptCode, scheduling, adminGroups, viewerGroups, restartUsers, timeout, workerKind, kubernetesControl, pythonControl, genericWorkerControl, typeSpecificFields, replicaCount, spareCount, assignmentPolicy, assignmentPolicyParams, initializationThreads, updateThreads, defaults, }: DraftQueryConstructorObject);
|
|
79
85
|
id: string;
|
|
80
86
|
isModified: boolean;
|
|
81
87
|
isClientSide: boolean;
|
|
@@ -126,6 +132,7 @@ export declare class DraftQuery implements IDraftQuery {
|
|
|
126
132
|
*/
|
|
127
133
|
initializationThreads: string;
|
|
128
134
|
updateThreads: string;
|
|
135
|
+
defaults?: DefaultDraftQuery;
|
|
129
136
|
updateSchedule(): void;
|
|
130
137
|
/**
|
|
131
138
|
* Creates a deep copy of this draft query.
|
package/dist/DraftQuery.js
CHANGED
|
@@ -26,11 +26,11 @@ export class DraftQuery {
|
|
|
26
26
|
// Remove the 'Draft ID: ' marking
|
|
27
27
|
return serial === null || serial === void 0 ? void 0 : serial.substring(DRAFT_SERIAL_PREFIX.length);
|
|
28
28
|
}
|
|
29
|
-
constructor({ isClientSide = false, draftOwner, serial = DraftQuery.NO_SERIAL, name, owner, type = QueryType.SCRIPT, enabled = true, enableGcLogs = true, envVars = '', heapSize = 4.0, additionalMemory = 0.0, dataMemoryRatio = 0.25, jvmArgs = '', extraClasspaths = '', jvmProfile = 'Default', dbServerName, scriptLanguage = 'Groovy', scriptPath = null, scriptCode = '', scheduling, adminGroups = [], viewerGroups = [], restartUsers = DraftQuery.RESTART_MODE.ADMIN, timeout = 0, workerKind = null, kubernetesControl = null, pythonControl = null, genericWorkerControl = null, typeSpecificFields = null, replicaCount = 1, spareCount = 0, assignmentPolicy = null, assignmentPolicyParams = null, initializationThreads = undefined, updateThreads = undefined, }) {
|
|
29
|
+
constructor({ isModified = false, isClientSide = false, draftOwner, serial = DraftQuery.NO_SERIAL, name, owner, type = QueryType.SCRIPT, enabled = true, enableGcLogs = true, envVars = '', heapSize = 4.0, additionalMemory = 0.0, dataMemoryRatio = 0.25, jvmArgs = '', extraClasspaths = '', jvmProfile = 'Default', dbServerName, scriptLanguage = 'Groovy', scriptPath = null, scriptCode = '', scheduling, adminGroups = [], viewerGroups = [], restartUsers = DraftQuery.RESTART_MODE.ADMIN, timeout = 0, workerKind = null, kubernetesControl = null, pythonControl = null, genericWorkerControl = null, typeSpecificFields = null, replicaCount = 1, spareCount = 0, assignmentPolicy = null, assignmentPolicyParams = null, initializationThreads = undefined, updateThreads = undefined, defaults = undefined, }) {
|
|
30
30
|
this.scheduling = [];
|
|
31
31
|
// Meta Data
|
|
32
32
|
this.id = shortid.generate();
|
|
33
|
-
this.isModified =
|
|
33
|
+
this.isModified = isModified;
|
|
34
34
|
this.isClientSide = isClientSide;
|
|
35
35
|
this.draftOwner = draftOwner;
|
|
36
36
|
// Query Data
|
|
@@ -76,6 +76,9 @@ export class DraftQuery {
|
|
|
76
76
|
this.scheduling = [];
|
|
77
77
|
this.scheduler = new QueryScheduler(scheduling);
|
|
78
78
|
this.typeSpecificFields = typeSpecificFields;
|
|
79
|
+
// A new draft should have null / undefined defaults
|
|
80
|
+
// A copy should have defaults that need to be instantiated as a new DraftQuery
|
|
81
|
+
this.defaults = defaults == null ? undefined : new DraftQuery(defaults);
|
|
79
82
|
}
|
|
80
83
|
updateSchedule() {
|
|
81
84
|
if (this.scheduler != null) {
|
|
@@ -232,5 +235,6 @@ DraftQuery.FIELDS = Object.freeze({
|
|
|
232
235
|
ASSIGNMENT_POLICY_PARAMS: `assignmentPolicyParams`,
|
|
233
236
|
INITIALIZATION_THREADS: 'initializationThreads',
|
|
234
237
|
UPDATE_THREADS: 'updateThreads',
|
|
238
|
+
DEFAULTS: 'defaults',
|
|
235
239
|
});
|
|
236
240
|
export default DraftQuery;
|
package/dist/QueryColumns.js
CHANGED
|
@@ -324,12 +324,12 @@ QueryColumns.ASSIGNMENT_POLICY_PARAMS = {
|
|
|
324
324
|
type: NewTableColumnTypes.STRING,
|
|
325
325
|
};
|
|
326
326
|
QueryColumns.ID = {
|
|
327
|
-
name: '
|
|
327
|
+
name: 'ID',
|
|
328
328
|
displayName: 'Id',
|
|
329
329
|
type: NewTableColumnTypes.STRING,
|
|
330
330
|
};
|
|
331
331
|
QueryColumns.PARENT_ID = {
|
|
332
|
-
name: '
|
|
332
|
+
name: 'Parent',
|
|
333
333
|
displayName: 'Parent Id',
|
|
334
334
|
type: NewTableColumnTypes.STRING,
|
|
335
335
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deephaven-enterprise/query-utils",
|
|
3
|
-
"version": "1.20250801.
|
|
3
|
+
"version": "1.20250801.250915083838-g46cfbc5dcf",
|
|
4
4
|
"description": "Deephaven Enterprise Query Utils",
|
|
5
5
|
"author": "Deephaven Data Labs LLC",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -28,6 +28,5 @@
|
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
31
|
-
}
|
|
32
|
-
"gitHead": "275a89394ed3538b02d785ecb227b316602a9e87"
|
|
31
|
+
}
|
|
33
32
|
}
|