This is a first step to supporting [sqlite column
affinity](https://www.sqlite.org/datatype3.html) properly in limbo --
just adds an `affinity()` function to `Column` that can then be used
elsewhere
Closes#1030
Fix#1012
In the INSERT statement generated by dump function, if the type affinity
of the value is TEXT, replace each single quotation mark with two single
quotation marks, and wrap it with single quotation marks.
Example:
```plaintext
limbo> CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR(100));
INSERT INTO users (id, name) VALUES
(1, 'Alice'),
(2, 'Bob'),
(3, 'Char''lie');
SELECT * FROM users;
1|Alice
2|Bob
3|Char'lie
limbo> .dump
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR (100));
INSERT INTO users VALUES(1,'Alice');
INSERT INTO users VALUES(2,'Bob');
INSERT INTO users VALUES(3,'Char''lie');
COMMIT;
```
Closes#1034
In the INSERT statement generated by dump function, if the type affinity
of the value is TEXT, replace each single quotation mark with two single
quotation marks, and wrap it with single quotation marks.
This PR is extracted from the sqlite fuzzing exploration effort in
https://github.com/tursodatabase/limbo/pull/1021
---
We were not evaluating constant conditions (e.g '1 IS NULL') when there
were no tables referenced in the query, because our WHERE term
evaluation was based on "during which loop" to evaluate them. However,
when there are no tables, there are no loops, so they were never
evaluated.
Closes#1023
When testing with `test-shell` the test may error and the error file
will be tracked in git. Added gitignore rule to always not track
`limbo_output.txt`
Closes#1027
We were not evaluating constant conditions (e.g '1 IS NULL')
when there were no tables referenced in the query, because
our WHERE term evaluation was based on "during which loop"
to evaluate them. However, when there are no tables, there are
no loops, so they were never evaluated.
This PR is sourced from the fuzzing exploration PR in
https://github.com/tursodatabase/limbo/pull/1021
**Adds missing support:**
Support all the same literals in WHERE clause position as in SELECT
position
Support CAST in WHERE clause position
Support FunctionCall in WHERE clause position
Support Column in WHERE clause position
Support Rowid in WHERE clause position
Support CASE in WHERE clause position
Support LIKE in SELECT position
Support Unary expressions in WHERE clause position
Support rest of the Binary expressions in WHERE clause position
Support TEXT in remainder operations
**Fix:**
Remove incorrect constant folding optimization for NULL
**Testing utils:**
Enhance sqlite fuzzer to mostly be able to work with the same set of
possible expressions in both SELECT and WHERE clause position
Closes#1024