From db5c0a73243896c01ae0c7c468c1f313cedaf604 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 25 Oct 2026 23:33:26 +0000 Subject: [PATCH] chore: version packages --- .changeset/after-commit.md | 5 ---- .changeset/clickhouse-union-numbers.md | 9 ------- .changeset/effect-4-0-6.md | 8 ------ .changeset/quiet-sqlite-dialects.md | 10 ------- .changeset/sqlite-generate.md | 10 ------- .changeset/sqlite-table-ddl.md | 11 -------- CHANGELOG.md | 37 ++++++++++++++++++++++++++ package.json | 2 +- 8 files changed, 38 insertions(+), 54 deletions(-) delete mode 100644 .changeset/after-commit.md delete mode 100644 .changeset/clickhouse-union-numbers.md delete mode 100644 .changeset/effect-4-0-6.md delete mode 100644 .changeset/quiet-sqlite-dialects.md delete mode 100644 .changeset/sqlite-generate.md delete mode 100644 .changeset/sqlite-table-ddl.md diff --git a/.changeset/after-commit.md b/.changeset/after-commit.md deleted file mode 100644 index 75c8320..0000000 --- a/.changeset/after-commit.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@maple-dev/effect-orm": minor ---- - -`Db.afterCommit(effect)` queues work, such as an SMS or an HTTP call, to run after the outermost transaction commits, and never after a rollback. It delegates to Effect's `SqlClient.afterCommit` and, like `requireTransaction`, adds `Transaction` to the requirements, so queueing outside a transaction does not compile. A failing hook does not fail the committed transaction: its cause goes to the `ErrorReporter`s in context and to an error log, and the next hook still runs. diff --git a/.changeset/clickhouse-union-numbers.md b/.changeset/clickhouse-union-numbers.md deleted file mode 100644 index dc4ec1e..0000000 --- a/.changeset/clickhouse-union-numbers.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@maple-dev/effect-orm": patch ---- - -On ClickHouse, a `unionAll` ordered by a numeric column whose branches may differ in type (`Id + 1` -and `Id - 1`, or a `UInt32` and an `Int64` column) no longer fails with "Data types Variant/Dynamic -are not allowed in ORDER BY keys". The union's ORDER BY sorts such a column by -`CAST(x AS Nullable(Float64)), accurateCastOrNull(x, 'Int128')`, which keeps integers past 2^53 in exact order; the -values themselves are not converted. diff --git a/.changeset/effect-4-0-6.md b/.changeset/effect-4-0-6.md deleted file mode 100644 index 0bedb06..0000000 --- a/.changeset/effect-4-0-6.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@maple-dev/effect-orm": minor ---- - -Require Effect 4.0.6 (`effect ^4.0.6` peer). Effect now fails a transaction whose COMMIT failed -with a `SqlError` instead of dying; `transaction` still reports it as `TransactionCommitFailed`. -`ClickhouseHttpClient` names its driver `"clickhouse-http"` (`SqlClient.driver`), and Effect's own -statement span is now named after the database (`db.namespace`) rather than `sql.execute`. diff --git a/.changeset/quiet-sqlite-dialects.md b/.changeset/quiet-sqlite-dialects.md deleted file mode 100644 index a01c803..0000000 --- a/.changeset/quiet-sqlite-dialects.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@maple-dev/effect-orm": minor ---- - -Add the `/sqlite` query entry with SQLite codecs, functions and positional bindings. Use -`sqliteDialect` with an Effect SQLite SqlClient, or `d1Dialect` for Cloudflare D1's binding limit -and explicit refusal of interactive transactions. `timestamp` stores SQLite's own -`YYYY-MM-DD HH:MM:SS.SSS` UTC text, so it compares correctly with what `strftime` writes; `LIKE` -escapes with `\` as on every dialect; text with U+0000 and integers past 2^53 are refused rather -than silently changed. diff --git a/.changeset/sqlite-generate.md b/.changeset/sqlite-generate.md deleted file mode 100644 index 0630148..0000000 --- a/.changeset/sqlite-generate.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@maple-dev/effect-orm": minor ---- - -`effect-orm generate` supports `dialect: "sqlite"`. It diffs `SQLite.table` definitions against -the migrations folder and writes `_/migration.sql` plus `snapshot.json`, the -drizzle-kit 1.0 layout that Alchemy's D1 resource applies. `ALTER TABLE` adds, drops and renames -where SQLite allows it; other column, primary key and UNIQUE changes rebuild the table. Renames -need a `confirm_rename` hint. `generate --baseline --from-drizzle` adopts a drizzle-kit 1.0 -SQLite folder. Snapshots gain a `sqlite` dialect. `/migrate` refuses SQLite folders for now. diff --git a/.changeset/sqlite-table-ddl.md b/.changeset/sqlite-table-ddl.md deleted file mode 100644 index 2ae47f4..0000000 --- a/.changeset/sqlite-table-ddl.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"@maple-dev/effect-orm": minor ---- - -`SQLite.table(name, { columns, primaryKey, indexes })` declares a SQLite table with its DDL: -`NOT NULL` from the column type, single and composite primary keys, literal and expression -defaults (`SQLite.timestampNow` for a `timestamp` column), unique columns, and named indexes and -unique indexes. `sqliteEntitiesOf` and -`renderSqliteSchema` from `/schema` check a schema and write its `CREATE TABLE` and -`CREATE INDEX` statements. `table(name, columns, options?)` and -`table(name, { external: true, columns })` stay query-only. diff --git a/CHANGELOG.md b/CHANGELOG.md index e44dd99..b127f94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,42 @@ # @maple-dev/effect-orm +## 0.8.0 + +### Minor Changes + +- ec94fd2: `Db.afterCommit(effect)` queues work, such as an SMS or an HTTP call, to run after the outermost transaction commits, and never after a rollback. It delegates to Effect's `SqlClient.afterCommit` and, like `requireTransaction`, adds `Transaction` to the requirements, so queueing outside a transaction does not compile. A failing hook does not fail the committed transaction: its cause goes to the `ErrorReporter`s in context and to an error log, and the next hook still runs. +- 2ca58aa: Require Effect 4.0.6 (`effect ^4.0.6` peer). Effect now fails a transaction whose COMMIT failed + with a `SqlError` instead of dying; `transaction` still reports it as `TransactionCommitFailed`. + `ClickhouseHttpClient` names its driver `"clickhouse-http"` (`SqlClient.driver`), and Effect's own + statement span is now named after the database (`db.namespace`) rather than `sql.execute`. +- d8bae8c: Add the `/sqlite` query entry with SQLite codecs, functions and positional bindings. Use + `sqliteDialect` with an Effect SQLite SqlClient, or `d1Dialect` for Cloudflare D1's binding limit + and explicit refusal of interactive transactions. `timestamp` stores SQLite's own + `YYYY-MM-DD HH:MM:SS.SSS` UTC text, so it compares correctly with what `strftime` writes; `LIKE` + escapes with `\` as on every dialect; text with U+0000 and integers past 2^53 are refused rather + than silently changed. +- 8eb7200: `effect-orm generate` supports `dialect: "sqlite"`. It diffs `SQLite.table` definitions against + the migrations folder and writes `_/migration.sql` plus `snapshot.json`, the + drizzle-kit 1.0 layout that Alchemy's D1 resource applies. `ALTER TABLE` adds, drops and renames + where SQLite allows it; other column, primary key and UNIQUE changes rebuild the table. Renames + need a `confirm_rename` hint. `generate --baseline --from-drizzle` adopts a drizzle-kit 1.0 + SQLite folder. Snapshots gain a `sqlite` dialect. `/migrate` refuses SQLite folders for now. +- b4b84c3: `SQLite.table(name, { columns, primaryKey, indexes })` declares a SQLite table with its DDL: + `NOT NULL` from the column type, single and composite primary keys, literal and expression + defaults (`SQLite.timestampNow` for a `timestamp` column), unique columns, and named indexes and + unique indexes. `sqliteEntitiesOf` and + `renderSqliteSchema` from `/schema` check a schema and write its `CREATE TABLE` and + `CREATE INDEX` statements. `table(name, columns, options?)` and + `table(name, { external: true, columns })` stay query-only. + +### Patch Changes + +- a3bd763: On ClickHouse, a `unionAll` ordered by a numeric column whose branches may differ in type (`Id + 1` + and `Id - 1`, or a `UInt32` and an `Int64` column) no longer fails with "Data types Variant/Dynamic + are not allowed in ORDER BY keys". The union's ORDER BY sorts such a column by + `CAST(x AS Nullable(Float64)), accurateCastOrNull(x, 'Int128')`, which keeps integers past 2^53 in exact order; the + values themselves are not converted. + ## 0.7.2 ### Patch Changes diff --git a/package.json b/package.json index 68234a7..88a02aa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@maple-dev/effect-orm", - "version": "0.7.2", + "version": "0.8.0", "description": "Type-safe ClickHouse, Postgres and SQLite queries, result decoding, and reproducible benchmarks for Effect and TypeScript", "keywords": [ "clickhouse",