@effect/sql-d1 4.0.0-beta.67 → 4.0.0-beta.68

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.
@@ -34,14 +34,14 @@ import * as Client from "effect/unstable/sql/SqlClient";
34
34
  /**
35
35
  * Unique runtime identifier used to tag `D1Client` values.
36
36
  *
37
- * @category type ids
37
+ * @category type IDs
38
38
  * @since 4.0.0
39
39
  */
40
40
  export declare const TypeId: TypeId;
41
41
  /**
42
42
  * Type-level literal for the `D1Client` runtime identifier.
43
43
  *
44
- * @category type ids
44
+ * @category type IDs
45
45
  * @since 4.0.0
46
46
  */
47
47
  export type TypeId = "~@effect/sql-d1/D1Client";
@@ -81,7 +81,7 @@ export interface D1ClientConfig {
81
81
  /**
82
82
  * Creates a scoped Cloudflare D1 SQL client. Prepared statements are cached, while transactions and streaming queries are not supported by this driver.
83
83
  *
84
- * @category constructor
84
+ * @category constructors
85
85
  * @since 4.0.0
86
86
  */
87
87
  export declare const make: (options: D1ClientConfig) => Effect.Effect<D1Client, never, Scope.Scope | Reactivity.Reactivity>;
package/dist/D1Client.js CHANGED
@@ -19,7 +19,7 @@ const classifyError = (cause, message, operation) => new UnknownError({
19
19
  /**
20
20
  * Unique runtime identifier used to tag `D1Client` values.
21
21
  *
22
- * @category type ids
22
+ * @category type IDs
23
23
  * @since 4.0.0
24
24
  */
25
25
  export const TypeId = "~@effect/sql-d1/D1Client";
@@ -33,7 +33,7 @@ export const D1Client = /*#__PURE__*/Context.Service("@effect/sql-d1/D1Client");
33
33
  /**
34
34
  * Creates a scoped Cloudflare D1 SQL client. Prepared statements are cached, while transactions and streaming queries are not supported by this driver.
35
35
  *
36
- * @category constructor
36
+ * @category constructors
37
37
  * @since 4.0.0
38
38
  */
39
39
  export const make = options => Effect.gen(function* () {
package/dist/index.d.ts CHANGED
@@ -2,6 +2,27 @@
2
2
  * @since 4.0.0
3
3
  */
4
4
  /**
5
+ * Cloudflare D1 client implementation for Effect SQL, backed by a Workers `D1Database` binding.
6
+ *
7
+ * This module adapts a Cloudflare D1 database binding into both the
8
+ * D1-specific `D1Client` service and the generic Effect `SqlClient` service.
9
+ * Use it in Workers, Pages Functions, and tests that provide a D1 binding to
10
+ * run SQLite-compatible queries through Effect services and layers, including
11
+ * repositories, migrations, request handlers, and local development against
12
+ * Wrangler or Miniflare-backed D1 databases.
13
+ *
14
+ * The client prepares statements with D1, caches them by SQL string, and uses
15
+ * the SQLite statement compiler for query and result name transforms. D1
16
+ * commits individual statements automatically, and native `D1Database.batch`
17
+ * is the D1 API for sequential, transactional multi-statement work; this
18
+ * adapter does not expose Effect SQL transactions because it cannot map
19
+ * `withTransaction` onto a connection-scoped D1 transaction. D1 databases are
20
+ * serverless SQLite storage with platform limits and single-database serialized
21
+ * execution, so keep queries small and indexed, batch large maintenance work
22
+ * at the D1 API level, and use D1 sessions outside this client when an
23
+ * application needs bookmark-based sequential consistency or read replicas.
24
+ * Streaming queries and `updateValues` are not supported.
25
+ *
5
26
  * @since 4.0.0
6
27
  */
7
28
  export * as D1Client from "./D1Client.ts";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA"}
package/dist/index.js CHANGED
@@ -3,6 +3,27 @@
3
3
  */
4
4
  // @barrel: Auto-generated exports. Do not edit manually.
5
5
  /**
6
+ * Cloudflare D1 client implementation for Effect SQL, backed by a Workers `D1Database` binding.
7
+ *
8
+ * This module adapts a Cloudflare D1 database binding into both the
9
+ * D1-specific `D1Client` service and the generic Effect `SqlClient` service.
10
+ * Use it in Workers, Pages Functions, and tests that provide a D1 binding to
11
+ * run SQLite-compatible queries through Effect services and layers, including
12
+ * repositories, migrations, request handlers, and local development against
13
+ * Wrangler or Miniflare-backed D1 databases.
14
+ *
15
+ * The client prepares statements with D1, caches them by SQL string, and uses
16
+ * the SQLite statement compiler for query and result name transforms. D1
17
+ * commits individual statements automatically, and native `D1Database.batch`
18
+ * is the D1 API for sequential, transactional multi-statement work; this
19
+ * adapter does not expose Effect SQL transactions because it cannot map
20
+ * `withTransaction` onto a connection-scoped D1 transaction. D1 databases are
21
+ * serverless SQLite storage with platform limits and single-database serialized
22
+ * execution, so keep queries small and indexed, batch large maintenance work
23
+ * at the D1 API level, and use D1 sessions outside this client when an
24
+ * application needs bookmark-based sequential consistency or read replicas.
25
+ * Streaming queries and `updateValues` are not supported.
26
+ *
6
27
  * @since 4.0.0
7
28
  */
8
29
  export * as D1Client from "./D1Client.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["D1Client"],"sources":["../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAIA;AAEA;;;AAGA,OAAO,KAAKA,QAAQ,MAAM,eAAe","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["D1Client"],"sources":["../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAIA;AAEA;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,OAAO,KAAKA,QAAQ,MAAM,eAAe","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect/sql-d1",
3
- "version": "4.0.0-beta.67",
3
+ "version": "4.0.0-beta.68",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "A Cloudflare D1 integration for Effect",
@@ -48,10 +48,10 @@
48
48
  },
49
49
  "devDependencies": {
50
50
  "miniflare": "^4.20260507.1",
51
- "effect": "^4.0.0-beta.67"
51
+ "effect": "^4.0.0-beta.68"
52
52
  },
53
53
  "peerDependencies": {
54
- "effect": "^4.0.0-beta.67"
54
+ "effect": "^4.0.0-beta.68"
55
55
  },
56
56
  "dependencies": {
57
57
  "@cloudflare/workers-types": "^4.20260511.1"
package/src/D1Client.ts CHANGED
@@ -46,7 +46,7 @@ const classifyError = (cause: unknown, message: string, operation: string) =>
46
46
  /**
47
47
  * Unique runtime identifier used to tag `D1Client` values.
48
48
  *
49
- * @category type ids
49
+ * @category type IDs
50
50
  * @since 4.0.0
51
51
  */
52
52
  export const TypeId: TypeId = "~@effect/sql-d1/D1Client"
@@ -54,7 +54,7 @@ export const TypeId: TypeId = "~@effect/sql-d1/D1Client"
54
54
  /**
55
55
  * Type-level literal for the `D1Client` runtime identifier.
56
56
  *
57
- * @category type ids
57
+ * @category type IDs
58
58
  * @since 4.0.0
59
59
  */
60
60
  export type TypeId = "~@effect/sql-d1/D1Client"
@@ -100,7 +100,7 @@ export interface D1ClientConfig {
100
100
  /**
101
101
  * Creates a scoped Cloudflare D1 SQL client. Prepared statements are cached, while transactions and streaming queries are not supported by this driver.
102
102
  *
103
- * @category constructor
103
+ * @category constructors
104
104
  * @since 4.0.0
105
105
  */
106
106
  export const make = (
package/src/index.ts CHANGED
@@ -5,6 +5,27 @@
5
5
  // @barrel: Auto-generated exports. Do not edit manually.
6
6
 
7
7
  /**
8
+ * Cloudflare D1 client implementation for Effect SQL, backed by a Workers `D1Database` binding.
9
+ *
10
+ * This module adapts a Cloudflare D1 database binding into both the
11
+ * D1-specific `D1Client` service and the generic Effect `SqlClient` service.
12
+ * Use it in Workers, Pages Functions, and tests that provide a D1 binding to
13
+ * run SQLite-compatible queries through Effect services and layers, including
14
+ * repositories, migrations, request handlers, and local development against
15
+ * Wrangler or Miniflare-backed D1 databases.
16
+ *
17
+ * The client prepares statements with D1, caches them by SQL string, and uses
18
+ * the SQLite statement compiler for query and result name transforms. D1
19
+ * commits individual statements automatically, and native `D1Database.batch`
20
+ * is the D1 API for sequential, transactional multi-statement work; this
21
+ * adapter does not expose Effect SQL transactions because it cannot map
22
+ * `withTransaction` onto a connection-scoped D1 transaction. D1 databases are
23
+ * serverless SQLite storage with platform limits and single-database serialized
24
+ * execution, so keep queries small and indexed, batch large maintenance work
25
+ * at the D1 API level, and use D1 sessions outside this client when an
26
+ * application needs bookmark-based sequential consistency or read replicas.
27
+ * Streaming queries and `updateValues` are not supported.
28
+ *
8
29
  * @since 4.0.0
9
30
  */
10
31
  export * as D1Client from "./D1Client.ts"