@lunora/do 1.0.0-alpha.303 → 1.0.0-alpha.305
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/drizzle.d.mts +20 -0
- package/dist/drizzle.d.ts +20 -0
- package/dist/drizzle.mjs +1 -0
- package/dist/index.d.mts +5 -7014
- package/dist/index.d.ts +5 -7014
- package/dist/index.mjs +1 -1
- package/dist/packem_shared/ROOT_DO_SIZE_WARN_BYTES-BkCbYAMV.mjs +13 -0
- package/dist/packem_shared/shard-do.d-HVgJ8fA1.d.mts +7010 -0
- package/dist/packem_shared/shard-do.d-HVgJ8fA1.d.ts +7010 -0
- package/package.json +6 -2
- package/dist/packem_shared/ROOT_DO_SIZE_WARN_BYTES-DiCZKDDD.mjs +0 -13
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DrizzleSqliteDODatabase } from 'drizzle-orm/durable-sqlite';
|
|
2
|
+
import { S as ShardDOState } from "./packem_shared/shard-do.d-HVgJ8fA1.mjs";
|
|
3
|
+
import '@lunora/observability';
|
|
4
|
+
import '@lunora/platform';
|
|
5
|
+
import '@lunora/shard-engine';
|
|
6
|
+
/**
|
|
7
|
+
* Drizzle handle over a Durable Object's SQLite storage, for typed queries against the generated
|
|
8
|
+
* `sqliteTable` schemas. Memoised per storage object, so a `ShardDO` subclass calling
|
|
9
|
+
* `shardDrizzle(this.state.storage)` on every handler call reuses one handle.
|
|
10
|
+
*
|
|
11
|
+
* Inside `ShardDO#runInTransaction` its queries join the open transaction implicitly: drizzle
|
|
12
|
+
* writes through the same connection-scoped `storage.sql` the transaction is opened on. Do not call
|
|
13
|
+
* its `transaction(...)` from inside a handler; that would attempt a nested SQLite transaction.
|
|
14
|
+
*
|
|
15
|
+
* Built without a `relations` option, so `.query.*` is not available; use the query builder.
|
|
16
|
+
* @param storage The Durable Object's storage. The driver reads only `storage.sql`.
|
|
17
|
+
* @returns The handle, the same one for the same storage object.
|
|
18
|
+
*/
|
|
19
|
+
declare const shardDrizzle: (storage: ShardDOState["storage"]) => DrizzleSqliteDODatabase;
|
|
20
|
+
export { shardDrizzle as default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DrizzleSqliteDODatabase } from 'drizzle-orm/durable-sqlite';
|
|
2
|
+
import { S as ShardDOState } from "./packem_shared/shard-do.d-HVgJ8fA1.js";
|
|
3
|
+
import '@lunora/observability';
|
|
4
|
+
import '@lunora/platform';
|
|
5
|
+
import '@lunora/shard-engine';
|
|
6
|
+
/**
|
|
7
|
+
* Drizzle handle over a Durable Object's SQLite storage, for typed queries against the generated
|
|
8
|
+
* `sqliteTable` schemas. Memoised per storage object, so a `ShardDO` subclass calling
|
|
9
|
+
* `shardDrizzle(this.state.storage)` on every handler call reuses one handle.
|
|
10
|
+
*
|
|
11
|
+
* Inside `ShardDO#runInTransaction` its queries join the open transaction implicitly: drizzle
|
|
12
|
+
* writes through the same connection-scoped `storage.sql` the transaction is opened on. Do not call
|
|
13
|
+
* its `transaction(...)` from inside a handler; that would attempt a nested SQLite transaction.
|
|
14
|
+
*
|
|
15
|
+
* Built without a `relations` option, so `.query.*` is not available; use the query builder.
|
|
16
|
+
* @param storage The Durable Object's storage. The driver reads only `storage.sql`.
|
|
17
|
+
* @returns The handle, the same one for the same storage object.
|
|
18
|
+
*/
|
|
19
|
+
declare const shardDrizzle: (storage: ShardDOState["storage"]) => DrizzleSqliteDODatabase;
|
|
20
|
+
export { shardDrizzle as default };
|
package/dist/drizzle.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{drizzle as t}from"drizzle-orm/durable-sqlite";const r=new WeakMap,d=l=>{let e=r.get(l);return e===void 0&&(e=t(l,{logger:!1}),r.set(l,e)),e};export{d as default};
|