You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A column named value reads as the VALUE keyword in expressions: WHERE value = 3 finds no rows #2670
Since #2203 a table can have a column named value, but in an expression a bare value is still read as the VALUE keyword (the value being checked in a CHECK or domain), not as the column. Queries give wrong results with no error.
Measured on develop (756f5b2), next to SQLite 3.43:
CREATETABLEt (value INT, b INT);
INSERT INTO t VALUES (1, 2), (3, 4);
Query
AlaSQL
SQLite
SELECT b, value FROM t
[{b: 2, VALUE: {}}, {b: 4, VALUE: {}}]
2, 1 and 4, 3
SELECT b FROM t WHERE value = 3
[]
4
SELECT b FROM t ORDER BY value DESC
2, 4 (not sorted)
4, 2
SELECT MAX(value) AS m FROM t
[{}]
3
SELECT value + 1 AS x FROM t
1
2, 4
SELECT value FROM t
throws Column does not exist: _
1, 3
t.value, [value] and UPDATE t SET value = 5 work.
Direction
Outside a CHECK or domain definition, value in an expression is the column. Right after SELECT it stays the SELECT VALUE modifier, as for ROW and MATRIX (#2628). Nobody can rely on {} or undefined here, so this can go into 4.x.
Cause found while reviewing #746: the grammar has Expression: VALUE → yy.DomainValueValue, a stub for domains whose toJS returns the whole row. AlaSQL has no CREATE DOMAIN, and CHECK (VALUE > 0) refuses every row, so removing VALUE from Expression looks like the fix here. Details in the review issue for #746.
Activity
mathiasrw commentedon Oct 20, 2026
Cause found while reviewing #746: the grammar has
Expression: VALUE→yy.DomainValueValue, a stub for domains whosetoJSreturns the whole row. AlaSQL has noCREATE DOMAIN, andCHECK (VALUE > 0)refuses every row, so removingVALUEfromExpressionlooks like the fix here. Details in the review issue for #746.