@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/pg/index.cjs
CHANGED
|
@@ -875,6 +875,13 @@ var DrizzlePgStateStore = class _DrizzlePgStateStore {
|
|
|
875
875
|
const rows = await this.db.select().from(durableStepCheckpoints).where((0, import_drizzle_orm4.and)((0, import_drizzle_orm4.eq)(durableStepCheckpoints.runId, runId), (0, import_drizzle_orm4.eq)(durableStepCheckpoints.name, name))).orderBy((0, import_drizzle_orm4.desc)(durableStepCheckpoints.seq)).limit(1);
|
|
876
876
|
return rows[0] ? fromCheckpointRow(rows[0]) : void 0;
|
|
877
877
|
}
|
|
878
|
+
async hasCheckpoints(runId, fromSeq, toSeq, statuses) {
|
|
879
|
+
if (statuses.length === 0) return false;
|
|
880
|
+
const rows = await this.db.select({
|
|
881
|
+
seq: durableStepCheckpoints.seq
|
|
882
|
+
}).from(durableStepCheckpoints).where((0, import_drizzle_orm4.and)((0, import_drizzle_orm4.eq)(durableStepCheckpoints.runId, runId), (0, import_drizzle_orm4.gte)(durableStepCheckpoints.seq, fromSeq), (0, import_drizzle_orm4.lte)(durableStepCheckpoints.seq, toSeq), (0, import_drizzle_orm4.inArray)(durableStepCheckpoints.status, statuses))).orderBy((0, import_drizzle_orm4.desc)(durableStepCheckpoints.seq)).limit(1);
|
|
883
|
+
return rows.length > 0;
|
|
884
|
+
}
|
|
878
885
|
async countCheckpoints(runId, fromSeq, toSeq, statuses) {
|
|
879
886
|
if (statuses.length === 0) return 0;
|
|
880
887
|
const rows = await this.db.select({
|