@dudousxd/nestjs-durable-store-drizzle 0.24.4 → 0.24.5
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 +7 -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 +7 -0
- package/dist/index.js.map +1 -1
- package/dist/pg/index.cjs +7 -0
- package/dist/pg/index.cjs.map +1 -1
- package/dist/pg/index.d.cts +1 -0
- package/dist/pg/index.d.ts +1 -0
- package/dist/pg/index.js +7 -0
- package/dist/pg/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -74,6 +74,7 @@ declare class DrizzleStateStore implements StateStore {
|
|
|
74
74
|
listCheckpoints(runId: string): Promise<StepCheckpoint[]>;
|
|
75
75
|
listCheckpointsForReplay(runId: string): Promise<StepCheckpoint[]>;
|
|
76
76
|
getLatestCheckpointByName(runId: string, name: string): Promise<StepCheckpoint | undefined>;
|
|
77
|
+
hasCheckpoints(runId: string, fromSeq: number, toSeq: number, statuses: StepCheckpoint['status'][]): Promise<boolean>;
|
|
77
78
|
countCheckpoints(runId: string, fromSeq: number, toSeq: number, statuses: StepCheckpoint['status'][]): Promise<number>;
|
|
78
79
|
listCheckpointsByNamePrefix(runId: string, prefixes: string[]): Promise<StepCheckpoint[]>;
|
|
79
80
|
/** {@link StateStore.checkpointStats}: one `GROUP BY parallel_group, status, name_kind` over the
|
package/dist/index.d.ts
CHANGED
|
@@ -74,6 +74,7 @@ declare class DrizzleStateStore implements StateStore {
|
|
|
74
74
|
listCheckpoints(runId: string): Promise<StepCheckpoint[]>;
|
|
75
75
|
listCheckpointsForReplay(runId: string): Promise<StepCheckpoint[]>;
|
|
76
76
|
getLatestCheckpointByName(runId: string, name: string): Promise<StepCheckpoint | undefined>;
|
|
77
|
+
hasCheckpoints(runId: string, fromSeq: number, toSeq: number, statuses: StepCheckpoint['status'][]): Promise<boolean>;
|
|
77
78
|
countCheckpoints(runId: string, fromSeq: number, toSeq: number, statuses: StepCheckpoint['status'][]): Promise<number>;
|
|
78
79
|
listCheckpointsByNamePrefix(runId: string, prefixes: string[]): Promise<StepCheckpoint[]>;
|
|
79
80
|
/** {@link StateStore.checkpointStats}: one `GROUP BY parallel_group, status, name_kind` over the
|
package/dist/index.js
CHANGED
|
@@ -735,6 +735,13 @@ var DrizzleStateStore = class {
|
|
|
735
735
|
const rows = await this.db.select().from(stepCheckpoints).where(and(eq(stepCheckpoints.runId, runId), eq(stepCheckpoints.name, name))).orderBy(desc(stepCheckpoints.seq)).limit(1);
|
|
736
736
|
return rows[0] ? fromCheckpointRow(rows[0]) : void 0;
|
|
737
737
|
}
|
|
738
|
+
async hasCheckpoints(runId, fromSeq, toSeq, statuses) {
|
|
739
|
+
if (statuses.length === 0) return false;
|
|
740
|
+
const rows = await this.db.select({
|
|
741
|
+
seq: stepCheckpoints.seq
|
|
742
|
+
}).from(stepCheckpoints).where(and(eq(stepCheckpoints.runId, runId), gte(stepCheckpoints.seq, fromSeq), lte(stepCheckpoints.seq, toSeq), inArray(stepCheckpoints.status, statuses))).orderBy(desc(stepCheckpoints.seq)).limit(1);
|
|
743
|
+
return rows.length > 0;
|
|
744
|
+
}
|
|
738
745
|
async countCheckpoints(runId, fromSeq, toSeq, statuses) {
|
|
739
746
|
if (statuses.length === 0) return 0;
|
|
740
747
|
const rows = await this.db.select({
|