@dudousxd/nestjs-durable-store-mikro-orm 0.33.5 → 0.33.6
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/index.cjs +21 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -410,6 +410,7 @@ declare class MikroOrmStateStore implements StateStore {
|
|
|
410
410
|
listCheckpoints(runId: string): Promise<StepCheckpoint[]>;
|
|
411
411
|
listCheckpointsForReplay(runId: string): Promise<StepCheckpoint[]>;
|
|
412
412
|
getLatestCheckpointByName(runId: string, name: string): Promise<StepCheckpoint | undefined>;
|
|
413
|
+
hasCheckpoints(runId: string, fromSeq: number, toSeq: number, statuses: StepCheckpoint['status'][]): Promise<boolean>;
|
|
413
414
|
countCheckpoints(runId: string, fromSeq: number, toSeq: number, statuses: StepCheckpoint['status'][]): Promise<number>;
|
|
414
415
|
listCheckpointsByNamePrefix(runId: string, prefixes: string[]): Promise<StepCheckpoint[]>;
|
|
415
416
|
/** One `GROUP BY parallel_group, status, <name kind>` over the run's checkpoints — the buckets a
|
package/dist/index.d.ts
CHANGED
|
@@ -410,6 +410,7 @@ declare class MikroOrmStateStore implements StateStore {
|
|
|
410
410
|
listCheckpoints(runId: string): Promise<StepCheckpoint[]>;
|
|
411
411
|
listCheckpointsForReplay(runId: string): Promise<StepCheckpoint[]>;
|
|
412
412
|
getLatestCheckpointByName(runId: string, name: string): Promise<StepCheckpoint | undefined>;
|
|
413
|
+
hasCheckpoints(runId: string, fromSeq: number, toSeq: number, statuses: StepCheckpoint['status'][]): Promise<boolean>;
|
|
413
414
|
countCheckpoints(runId: string, fromSeq: number, toSeq: number, statuses: StepCheckpoint['status'][]): Promise<number>;
|
|
414
415
|
listCheckpointsByNamePrefix(runId: string, prefixes: string[]): Promise<StepCheckpoint[]>;
|
|
415
416
|
/** One `GROUP BY parallel_group, status, <name kind>` over the run's checkpoints — the buckets a
|
package/dist/index.js
CHANGED
|
@@ -1970,6 +1970,27 @@ var MikroOrmStateStore = class _MikroOrmStateStore {
|
|
|
1970
1970
|
});
|
|
1971
1971
|
return entity ? fromCheckpointEntity(entity) : void 0;
|
|
1972
1972
|
}
|
|
1973
|
+
async hasCheckpoints(runId, fromSeq, toSeq, statuses) {
|
|
1974
|
+
if (statuses.length === 0) return false;
|
|
1975
|
+
const row = await this.fork().findOne(StepCheckpointEntity, {
|
|
1976
|
+
runId,
|
|
1977
|
+
seq: {
|
|
1978
|
+
$gte: fromSeq,
|
|
1979
|
+
$lte: toSeq
|
|
1980
|
+
},
|
|
1981
|
+
status: {
|
|
1982
|
+
$in: statuses
|
|
1983
|
+
}
|
|
1984
|
+
}, {
|
|
1985
|
+
fields: [
|
|
1986
|
+
"seq"
|
|
1987
|
+
],
|
|
1988
|
+
orderBy: {
|
|
1989
|
+
seq: "desc"
|
|
1990
|
+
}
|
|
1991
|
+
});
|
|
1992
|
+
return row !== null;
|
|
1993
|
+
}
|
|
1973
1994
|
async countCheckpoints(runId, fromSeq, toSeq, statuses) {
|
|
1974
1995
|
if (statuses.length === 0) return 0;
|
|
1975
1996
|
return this.fork().count(StepCheckpointEntity, {
|