@tanstack/workflow-store-drizzle-postgres 0.0.1

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/README.md ADDED
@@ -0,0 +1,26 @@
1
+ # @tanstack/workflow-store-drizzle-postgres
2
+
3
+ Experimental Drizzle/Postgres durable execution store for TanStack Workflow.
4
+
5
+ See the main [Persistence guide](../../docs/guide/persistence.md) and
6
+ [Store adapters API](../../docs/api/store-adapters.md).
7
+
8
+ This adapter implements the `WorkflowExecutionStore` contract from
9
+ `@tanstack/workflow-runtime`. Drizzle is only the database execution surface; the
10
+ workflow runtime remains backed by the store contract.
11
+
12
+ ## Usage
13
+
14
+ ```bash
15
+ pnpm add @tanstack/workflow-store-drizzle-postgres drizzle-orm pg
16
+ ```
17
+
18
+ ```ts
19
+ import { drizzle } from 'drizzle-orm/node-postgres'
20
+ import { createDrizzlePostgresWorkflowStore } from '@tanstack/workflow-store-drizzle-postgres'
21
+
22
+ const db = drizzle(pool)
23
+ const store = createDrizzlePostgresWorkflowStore({ db })
24
+
25
+ await store.ensureSchema()
26
+ ```
package/dist/index.cjs ADDED
@@ -0,0 +1,5 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_store = require('./store.cjs');
3
+
4
+ exports.createDrizzlePostgresWorkflowStore = require_store.createDrizzlePostgresWorkflowStore;
5
+ exports.defaultDrizzlePostgresWorkflowStoreTables = require_store.defaultDrizzlePostgresWorkflowStoreTables;
@@ -0,0 +1,2 @@
1
+ import { DrizzlePostgresDatabase, DrizzlePostgresWorkflowStore, DrizzlePostgresWorkflowStoreOptions, DrizzlePostgresWorkflowStoreTables, createDrizzlePostgresWorkflowStore, defaultDrizzlePostgresWorkflowStoreTables } from "./store.cjs";
2
+ export { type DrizzlePostgresDatabase, type DrizzlePostgresWorkflowStore, type DrizzlePostgresWorkflowStoreOptions, type DrizzlePostgresWorkflowStoreTables, createDrizzlePostgresWorkflowStore, defaultDrizzlePostgresWorkflowStoreTables };
@@ -0,0 +1,2 @@
1
+ import { DrizzlePostgresDatabase, DrizzlePostgresWorkflowStore, DrizzlePostgresWorkflowStoreOptions, DrizzlePostgresWorkflowStoreTables, createDrizzlePostgresWorkflowStore, defaultDrizzlePostgresWorkflowStoreTables } from "./store.js";
2
+ export { type DrizzlePostgresDatabase, type DrizzlePostgresWorkflowStore, type DrizzlePostgresWorkflowStoreOptions, type DrizzlePostgresWorkflowStoreTables, createDrizzlePostgresWorkflowStore, defaultDrizzlePostgresWorkflowStoreTables };
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ import { createDrizzlePostgresWorkflowStore, defaultDrizzlePostgresWorkflowStoreTables } from "./store.js";
2
+
3
+ export { createDrizzlePostgresWorkflowStore, defaultDrizzlePostgresWorkflowStoreTables };