trilean-sql 2.2.17 → 2.2.18
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.
- package/README.md +1 -1
- package/dist/guard.cjs +1 -1
- package/dist/guard.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -173,7 +173,7 @@ A `matches`/`notMatches` pattern would be the same kind of limit — matched by
|
|
|
173
173
|
|
|
174
174
|
Every refusal below applies to both dialects. What changes with the dialect is the `reason` text, which names the mechanism that actually applies to the engine you are compiling for — a `findUnpushableNodeKind` call given no `options` has no dialect to read and describes PostgreSQL, the one these refusals were first derived against.
|
|
175
175
|
|
|
176
|
-
**Kinds this version does not translate.** `some`, `every`, `fold(max|min)`: refused unless `options.collectionFor` maps the `collection` key onto a correlated table — see [Collections](#collections). `fold(reduce)`: always refused, `collectionFor` or not — it threads an arbitrary combine expression through the collection in a caller-chosen order, which has no general SQL translation. `lookup`, `call`, `delegate`, `treeReference`: each is resolved by something the database has no access to — the caller's resolvers, its function registry, an external system. `conditional`: not implemented here. `accumulator`: only meaningful inside a `reduce` fold. `arithmetic` and `negate`: these carry and combine units, and pushing them down would drop that dimensional analysis without saying so. `durationLiteral`: trilean compares durations
|
|
176
|
+
**Kinds this version does not translate.** `some`, `every`, `fold(max|min)`: refused unless `options.collectionFor` maps the `collection` key onto a correlated table — see [Collections](#collections). `fold(reduce)`: always refused, `collectionFor` or not — it threads an arbitrary combine expression through the collection in a caller-chosen order, which has no general SQL translation. `lookup`, `call`, `delegate`, `treeReference`: each is resolved by something the database has no access to — the caller's resolvers, its function registry, an external system. `conditional`: not implemented here. `accumulator`: only meaningful inside a `reduce` fold. `arithmetic` and `negate`: these carry and combine units, and pushing them down would drop that dimensional analysis without saying so. `durationLiteral`: trilean compares two durations in whichever unit each carries, and a column holds no unit to carry. `complexLiteral`: neither engine has a complex type.
|
|
177
177
|
|
|
178
178
|
**Shapes refused despite a supported kind.** A `reference` whose key is not a string, since there is nothing to map. A `reference` or `numberLiteral` carrying a `unit`: a unit on a reference asserts that the resolved value carries the same one, and a column has no unit for that assertion to be checked against. A `numberLiteral` of `NaN`, which trilean compares with `===` — under which NaN equals nothing including itself — and neither engine reproduces, for opposite reasons. PostgreSQL defines NaN as equal to itself and greater than every other double, so `NaN = NaN` selects every row there and none here. SQLite has no NaN at all and a driver binding one substitutes SQL `NULL`, so the same comparison is *indeterminate* there and matches nothing — which looks like agreement until you negate it, at which point trilean's definite `true` matches every row and SQLite's `NULL` still matches none. Infinities are not refused alongside it; every engine here orders them identically.
|
|
179
179
|
|
package/dist/guard.cjs
CHANGED
|
@@ -101,7 +101,7 @@ function findUnpushableExpression(node, path, divergence, options) {
|
|
|
101
101
|
case "durationLiteral": return {
|
|
102
102
|
kind: node.kind,
|
|
103
103
|
path,
|
|
104
|
-
reason: "trilean compares durations
|
|
104
|
+
reason: "trilean compares two durations in whichever unit each carries, and a column holds no unit to carry"
|
|
105
105
|
};
|
|
106
106
|
case "complexLiteral": return {
|
|
107
107
|
kind: node.kind,
|
package/dist/guard.js
CHANGED
|
@@ -100,7 +100,7 @@ function findUnpushableExpression(node, path, divergence, options) {
|
|
|
100
100
|
case "durationLiteral": return {
|
|
101
101
|
kind: node.kind,
|
|
102
102
|
path,
|
|
103
|
-
reason: "trilean compares durations
|
|
103
|
+
reason: "trilean compares two durations in whichever unit each carries, and a column holds no unit to carry"
|
|
104
104
|
};
|
|
105
105
|
case "complexLiteral": return {
|
|
106
106
|
kind: node.kind,
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trilean-sql",
|
|
3
3
|
"description": "Compiles a trilean predicate tree into a parameterised SQL WHERE fragment, pushing three-valued logic down onto the database's own NULL propagation instead of evaluating it in process.",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.18",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/ExaDev/trilean/issues"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"trilean": "1.
|
|
9
|
+
"trilean": "1.8.0",
|
|
10
10
|
"trilean-regex": "1.0.13"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|