Repository navigation
Conversation
elcritch
marked this pull request as draft
November 14, 2026 01:51
elcritch
marked this pull request as ready for review
November 14, 2026 02:20
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.
Ormin queries need explicit casts, bound-list comparisons, JSON extraction, and NULL-safe comparisons. This adds those expressions for PostgreSQL and SQLite, plus PostgreSQL-specific array and JSONB operators.
The sequence stays one bound parameter. PostgreSQL receives an array; SQLite receives a JSON array and searches it with
json_each. SQLite supports== any,== some, and!= allwith bound sequences, including empty and NULL arrays. Strings are encoded as data, including quotes, backslashes, and SQL-shaped text.Use a backtick-quoted type after
asto cast a value. For example,(?value as `text`)produces($1)::textin PostgreSQL andCAST(? AS text)in SQLite. Unquotedas labelnames a result column; backticks are reserved for supported cast types. SQLite supports common text, integer, and real casts; backend conversion rules still apply.The change also includes:
->/->>extraction andisDistinctFrom/isNotDistinctFromon both backends. SQLite JSON and type conversion rules still apply; JSON support requires SQLite 3.38 or later with JSON enabled, and NULL-safe comparisons require SQLite 3.39 or later.ANY/ALLcomparisons.double precision, with UUIDs, arrays, and exact decimals returned as strings.Validated locally with Nim 2.4.2 and PostgreSQL 14:
nim test,nim test_postgres, andnim buildexamplespass. The SQLite expression tests also pass in release and danger builds and on Nim 2.2.12.