@duraflows/kysely 7.0.0 → 7.1.0
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.
|
@@ -19,6 +19,12 @@ export declare class KyselyWorkflowInstanceStore implements WorkflowInstanceStor
|
|
|
19
19
|
definitionVersion: number;
|
|
20
20
|
excludeStates: readonly string[];
|
|
21
21
|
}): Promise<number>;
|
|
22
|
+
findInstanceUuids(options: {
|
|
23
|
+
workflowName: string;
|
|
24
|
+
definitionVersion: number;
|
|
25
|
+
limit: number;
|
|
26
|
+
afterUuid?: string;
|
|
27
|
+
}): Promise<string[]>;
|
|
22
28
|
private mapRow;
|
|
23
29
|
}
|
|
24
30
|
//# sourceMappingURL=kysely-instance-store.d.ts.map
|
|
@@ -132,6 +132,18 @@ class KyselyWorkflowInstanceStore {
|
|
|
132
132
|
const row = await query.executeTakeFirst();
|
|
133
133
|
return Number(row?.count ?? 0);
|
|
134
134
|
}
|
|
135
|
+
async findInstanceUuids(options) {
|
|
136
|
+
let query = this.getExecutor()
|
|
137
|
+
.selectFrom("workflow_instances")
|
|
138
|
+
.select("uuid")
|
|
139
|
+
.where("workflow_name", "=", options.workflowName)
|
|
140
|
+
.where("definition_version", "=", options.definitionVersion);
|
|
141
|
+
if (options.afterUuid !== undefined) {
|
|
142
|
+
query = query.where("uuid", ">", options.afterUuid);
|
|
143
|
+
}
|
|
144
|
+
const rows = await query.orderBy("uuid").limit(options.limit).execute();
|
|
145
|
+
return rows.map((row) => row.uuid);
|
|
146
|
+
}
|
|
135
147
|
mapRow(row) {
|
|
136
148
|
return {
|
|
137
149
|
uuid: row.uuid,
|
|
@@ -19,6 +19,12 @@ export declare class KyselyWorkflowInstanceStore implements WorkflowInstanceStor
|
|
|
19
19
|
definitionVersion: number;
|
|
20
20
|
excludeStates: readonly string[];
|
|
21
21
|
}): Promise<number>;
|
|
22
|
+
findInstanceUuids(options: {
|
|
23
|
+
workflowName: string;
|
|
24
|
+
definitionVersion: number;
|
|
25
|
+
limit: number;
|
|
26
|
+
afterUuid?: string;
|
|
27
|
+
}): Promise<string[]>;
|
|
22
28
|
private mapRow;
|
|
23
29
|
}
|
|
24
30
|
//# sourceMappingURL=kysely-instance-store.d.ts.map
|
|
@@ -129,6 +129,18 @@ export class KyselyWorkflowInstanceStore {
|
|
|
129
129
|
const row = await query.executeTakeFirst();
|
|
130
130
|
return Number(row?.count ?? 0);
|
|
131
131
|
}
|
|
132
|
+
async findInstanceUuids(options) {
|
|
133
|
+
let query = this.getExecutor()
|
|
134
|
+
.selectFrom("workflow_instances")
|
|
135
|
+
.select("uuid")
|
|
136
|
+
.where("workflow_name", "=", options.workflowName)
|
|
137
|
+
.where("definition_version", "=", options.definitionVersion);
|
|
138
|
+
if (options.afterUuid !== undefined) {
|
|
139
|
+
query = query.where("uuid", ">", options.afterUuid);
|
|
140
|
+
}
|
|
141
|
+
const rows = await query.orderBy("uuid").limit(options.limit).execute();
|
|
142
|
+
return rows.map((row) => row.uuid);
|
|
143
|
+
}
|
|
132
144
|
mapRow(row) {
|
|
133
145
|
return {
|
|
134
146
|
uuid: row.uuid,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duraflows/kysely",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.0",
|
|
4
4
|
"description": "PostgreSQL persistence adapter for duraflows using `kysely`. Integrates with kysely's type-safe query builder and AsyncLocalStorage-based transaction context.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"duraflows",
|
|
@@ -51,15 +51,15 @@
|
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@duraflows/core": "^7.
|
|
54
|
+
"@duraflows/core": "^7.1.0",
|
|
55
55
|
"kysely": "^0.29.6"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/pg": "^8.23.1",
|
|
59
59
|
"kysely": "^0.29.6",
|
|
60
60
|
"pg": "^8.23.0",
|
|
61
|
-
"@duraflows/core": "7.
|
|
62
|
-
"@duraflows/pg": "7.
|
|
61
|
+
"@duraflows/core": "7.1.0",
|
|
62
|
+
"@duraflows/pg": "7.1.0"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
65
65
|
"build": "tsc --build"
|