@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 +26 -0
- package/dist/index.cjs +5 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -0
- package/dist/store.cjs +935 -0
- package/dist/store.cjs.map +1 -0
- package/dist/store.d.cts +31 -0
- package/dist/store.d.ts +31 -0
- package/dist/store.js +934 -0
- package/dist/store.js.map +1 -0
- package/package.json +61 -0
- package/src/index.ts +10 -0
- package/src/store.ts +1278 -0
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;
|
package/dist/index.d.cts
ADDED
|
@@ -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 };
|
package/dist/index.d.ts
ADDED
|
@@ -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