Repository navigation
chore: version packages - #146
Merged
Merged
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
github-actions
Bot
force-pushed
the
changeset-release/main
branch
2 times, most recently
from
November 25, 2026 11:40
b3d61fe to
6932b6e
Compare
github-actions
Bot
force-pushed
the
changeset-release/main
branch
from
November 25, 2026 11:48
6932b6e to
59db9d5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@maple-dev/[email protected]
Major Changes
docs/reference.md), andbun run testnow fails when one is not; before, only the four dialect entries were checked. The Alpha notice is gone from the README and the docs site.package.jsondeclaresengines.node >= 20.19.0, the oldest Node the build was run on.Minor Changes
2d2fe62: ClickHouse names are quoted when they need to be. The ClickHouse dialect wrote every identifier bare, so a select key such as
"p-95"or"by service"was a syntax error, a key namednullordered by the literal, and a key built from input was SQL:{ "x FROM system.users --": $.Name }compiled toevents.Name AS x FROM system.users --. A plain name (letters, digits,_, dots for a Nested column) is still bare, so existing SQL does not change; any other is written in backticks with`and\escaped. That covers select keys, GROUP BY and ORDER BY keys, column names of an external table, source and join aliases, and CTE names. As a select key, an alias or a CTE name, the words ClickHouse reads as something else there are quoted too (all,cube,distinct,false,inf,infinity,nan,not,null,recursive,rollup,select,top,true); a column of such a name is still read bare, so a table's DDL does not change, andgeneratedoes not recreate a materialized view whose SELECT differs from its snapshot only by those backticks. A select key with a dot is quoted too, so selecting a Nested column by name (.select("Events.Name")) works: it used to writeAS Events.Name, a syntax error. A ClickHouse table name is still written as given, since an external table's name may be a table function or a subquery;Dialect.rawTableNamessays so.A name that spells the reserved param marker
__PARAM_is escaped on ClickHouse and refused withInvalidLiteralon the other dialects. On Postgres it used to be rewritten into the placeholder's text (AS "$1").contains("")is written with one wildcard (LIKE '%') instead of two. It means the same, and ClickHouse 26.2 turns aLEFT JOINfiltered byLIKE '%%'on the joined table into an inner join, losing the unmatched rows.2fcf943: MySQL and MariaDB upserts:
insertInto(table).values(rows).onDuplicateKeyUpdate({ set })writesINSERT ... ON DUPLICATE KEY UPDATE.settakes the formsonConflictDoUpdate's does: a record of values, params or expressions, a callback($, excluded) => ({ ... })of the existing and proposed rows,excluded(columns)orexcludedAll(except?). MySQL reads the proposed row through a row alias,VALUES (...) AS excluded(MySQL 8.0.19+); MariaDB readsVALUES(col). (For MySQL before 8.0.19, spreadmysqlDialectwithclauses.onDuplicateKey: "valuesFunction".) It fires on any unique key and takes no target orwhere, soexcludedAllleaves out the table's declared primary key and itstenantColumn, and a bareexcludedAll()on a table with no declared key is aQueryBuilderDefectasking forexcept. On a table with atenantColumnthe insert is"cross-tenant". A proposed-row column the SET reads but no row writes joins the insert withDEFAULTcells, as Postgres'sexcludedholds the default.valuesrows only; withselect, on a table namedexcludedon MySQL, or on another dialect, compiling is aQueryBuilderDefect.onConflictDoUpdate/onConflictDoNothingon MySQL now nameonDuplicateKeyUpdate/onDuplicateKeyDoNothingin their errors, and the reverse on Postgres and SQLite. New:Dialect.clauses.onDuplicateKey, and theOnDuplicateKeyUpdatetype.onDuplicateKeyDoNothing()skips a row that conflicts on any unique key, on MySQL and MariaDB. It writesON DUPLICATE KEY UPDATE col = table.colon the first written column, notINSERT IGNORE:IGNOREalso turns truncation, NOT NULL and foreign key errors into warnings and stores or drops the row, while these still fail. A skipped row counts as 1 affected row with mysql2's defaultCLIENT_FOUND_ROWS, 0 without it. It keeps the inserted rows' tenant scope, since the statement writes no existing row; it is still an UPDATE of the matched row, so aBEFORE UPDATEtrigger runs, and thenaffectedRowsis 2 andinsertIdthe matched row's id.f69f39c:
Db.runWriteruns an insert, update or delete and returns aWriteResult:affectedRows, and for an insertinsertId, the key of the row it wrote. It is how MySQL, which has noRETURNING(and MariaDB, whoseRETURNINGthe builder does not write), reads anAUTO_INCREMENTkey; it reads@effect/sql-mysql2,@effect/sql-pg, PGlite, node:sqlite and D1 results, and refuses a ClickHouse write before sending it.layerTesttakes aTestWriteReply({ affectedRows, insertId? }) to answer one.MySQL and MariaDB constraint failures are now refined like the other dialects':
refineConstraintsreads the server's error number, so a foreign key (1451, 1452), NOT NULL (1048, 1364) or CHECK (3819, MariaDB 4025) failure becomesForeignKeyViolation,NotNullViolationorCheckViolation, with the key, constraint, table or column the message names. Before, only a duplicate key was refined, and without names. A MySQLDatabaseErrornow also carries the server'ssqlStateand its error number aserrorCode. Names are read from the server's whole message and anchored where the server writes them, so a duplicated value quoted in the message cannot name the key. A Node error name (EPIPE,EBUSY) is no longer read as a SQLSTATE.Patch Changes
6955a28:
effect-orm --versionandch-bench --versionprint the package version.effect-ormnames a command it does not have (unknown command "frobnicate") before it looks for a config file; it used to report thateffect-orm.config.tscould not be imported.e972080:
/clickhouse-httpno longer returns the rows of a query that failed. ClickHouse answers200with the first block of rows, so a timeout, a memory limit or any exception after that arrives inside the body. On servers before 25.11 (25.8 LTS among them) the client read the rows sent so far as the whole result:sql.unsafe(...)succeeded with 900,000 of 2,000,000 rows, and.streamended normally. On 25.11 and later it failed, but as "the response is not valid JSON" or "the stream failed", with the server's code lost, so a timeout was not aStatementTimeoutError.Queries now send
http_write_exception_in_output_format=1, and the client reads the exception wherever the server puts it: anexceptionkey besidedata, a JSONEachRow exception line, the__exception__block (tagged or not), or the text after the rows of a compressed reply. The statement fails with the server's reason and message; a stream fails after the rows before the exception. A statement whose200carriesX-ClickHouse-Exception-Code(a command with progress headers on) fails too; it used to succeed. A body that cannot be read to the end is aConnectionError, not anUnknownError. Needs ClickHouse 23.9 or later. Areadonly = 1user, who cannot change settings, sets both built-in settings insettingsto the server's current values (http_write_exception_in_output_formatis1before 25.11 and0from it).Bound values:
nullbinds as NULL (it was the textnull), an array holding a null isArray(Nullable(T))(its nulls were the type's default), and abigintbinds as the narrowest ofInt64,UInt64,Int128,UInt256andInt256that holds it (2^64 - 1 arrived as -1). An array's element type is read from all of its elements, nested arrays included.b35749b: MariaDB: an integer literal in a
unionAllbranch keeps its value beside a DECIMAL in another branch. MariaDB 11.4 sizes an integer literal one digit short when a union branch is a derived table, which is howmariadbDialectwrites branches, and cut it down to fit:lit(97)in one branch and aDECIMAL(5,4)in the other came back9.9999. A selected integer literal is now writtenCAST(n AS SIGNED) + 0on MariaDB, which has the digits. MySQL is unaffected and unchanged.