Repository navigation
Conversation
A quoted decimal is the number it spells against a numeric value and stays text against a string, for equality and for !=, >, >=, < and <=. Inline SQL, parameterized SQL and Drizzle on a SQLite column now match the in-memory adapter, including on a column with no affinity. NULL stays unknown.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
createQueryKit already rejects an exact denyValues match. A LIKE pattern that would match that value, including under NOT or OR, is now rejected the same way before either adapter runs. SQL translators are unchanged.
team:assigned resolves to an IN list. A member "7" now matches a stored 7 and the text 7 on inline SQL, parameterized SQL, and Drizzle, as it already did in memory and as equality already did.
A TEXT column turned an integer literal into text, so year:2024 matched the string 2024. Inline equality now matches only integer and real storage, which is what parameterized SQL and in-memory already returned.
A TEXT column compared year:>2024 as text, so inline SQL, a bound real, and in-memory class order returned different ids. Ordered comparisons of a number now follow storage class on SQLite: text is greater than every number, and integer and real storage stay numeric.
Inline SQL applied text affinity to year in (2023, 2024) and year not in (2024), so a TEXT column of those digits disagreed with parameterized SQL, Drizzle, and in-memory. A bare number in an inline list now uses the same storage-class comparison as equality. Integer columns still match the numbers in the list.
A bound JavaScript number is a real, and a TEXT column reads that real as the text 2024.0. Parameterized SQL and Drizzle now keep equality and membership of a bare number on integer and real storage, matching inline SQL and in-memory filtering. A REAL column still matches 2024.
"":todo names a column whose name is empty. The search box dropped that name, so a schema of only status treated the query as valid, and an empty prefix would suggest status. The name stays listed, and an empty prefix matches no field.
An empty orderBy direction was written as ORDER BY with no keyword, so SQLite sorted ascending while Drizzle and in-memory rejected it.
Drizzle omitted a NaN limit because NaN >= 0 is false and a NaN offset because NaN is falsy, so status:a returned rows. SQLite and in-memory already rejected that window.
Drizzle treated -Infinity as a negative limit, so a bare -Infinity limit was omitted and status:a returned rows. Beside an offset it was written as LIMIT -1. Infinity and -Infinity are not integers; reject them with NaN before the statement is built.
SQLite reads TRUE as 1 and FALSE as 0, so LIMIT true on status:a returned a row while Drizzle, in-memory, and the kits rejected the boolean. Number.isFinite and Number.isInteger are both false for a boolean, and better-sqlite3 cannot bind one. Read true as 1 and false as 0 before those checks, and inline TRUE or FALSE in parameterized SQL.
SQLite reads LIMIT '02' and LIMIT '+2' as 2 and rejects LIMIT '2.5'. QueryKit now reads the first two as 2 before the integer checks, and still leaves a non-zero fraction unchanged.
SQLite reads LIMIT '-2' as no upper bound and LIMIT '2e1' as 20, and rejects LIMIT '+ 2'. QueryKit now reads the first two as -2 and 20 before the integer checks. The kit forwards maxLimit for the negative spelling so the cap stays on. A spaced sign stays a string.
This branch was successfully deployed
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.
SQL and in-memory disagreed on numeric values, an empty field name was dropped in the search box, a bad limit was accepted by one engine, and a wildcard stopped at a null byte. Those are fixed.
count:>"2"was text in SQL and a number in memory.year:2024oryear in (2024)matched digit text in inline SQL and missed it elsewhere. A bare decimal such asyear:2024.0did the reverse.team:assigned) dropped a numeric id that memory kept.secret:hid*)."":todolost the empty name, so a schema of onlystatustreated it as that field.NaNor-Infinitylimit was ignored by Drizzle and rejected by the other engines. A boolean limit returned rows from inline SQL and threw elsewhere.trueis 1 andfalseis 0."2","2.0","02", or"2e1"was an integer in SQL and threw elsewhere. Those spellings are that integer."2.5"still throws.title:*bmissed a stored null byte in SQL and matched it in memory. A wildcard now crosses U+0000, including when the pattern itself contains one.A number now matches integer or real storage, and text stays text. NULL stays unknown. A sort direction must be
ascordesc. A limit or offset must be finite; digit strings that SQLite reads as integers are those integers.Local suite: 187 suites, 3834 tests. CI is running on
4f1003c.