Commit Graph

174 Commits

Author SHA1 Message Date
jussisaurio
daf5863932 manual fixes based on clippy suggestions 2024-10-13 12:19:04 +03:00
jussisaurio
3d56fbd91c stuff 2024-10-05 18:25:04 +03:00
jussisaurio
f02da18acd index scan wip foo doesnt work yet 2024-10-05 18:25:04 +03:00
Lauri Virtanen
0597c048fc Better support for BLOBs
- Limbo command line shell supports e.g. `SELECT x'616263';`
- `EXPLAIN SELECT x'616263';` lists the opcode

Missing:

- Command line shell not entirely compatible with SQLite when blobs have
  non-printable characters in the middle (e.g. `SELECT x'610062';`)
- Python bindings not supported (incoming soon)
2024-09-22 17:55:00 +03:00
Pekka Enberg
b67640c437 Merge 'core: constraint check uniqueness' from Pere Diaz Bou
```bash
limbo> insert into products values (1, 'asdf', 432);
Runtime error: UNIQUE constraint failed: products.id (19)
```

Closes #336
2024-09-20 13:27:10 +03:00
Pere Diaz Bou
c8e5673f7a core: constraint check uniqueness 2024-09-20 11:45:55 +02:00
김선우
e9ba458514 Add support for sqlite_version 2024-09-18 17:57:51 +09:00
Pekka Enberg
9bbfdab5fa Revert "Merge 'Add support for sqlite_version() scalar function' from Kim Seon Woo"
This reverts commit e365c12ce0, reversing
changes made to 21bd1a961e. The pull request broke some tests:

```
thread 'main' panicked at core/vdbe/mod.rs:1713:72:
index out of bounds: the len is 3 but the index is 3
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    while executing
"exec {*}$command"
    (procedure "evaluate_sql" line 3)
    invoked from within
"evaluate_sql $sqlite_exec $sql"
    (procedure "run_test" line 2)
    invoked from within
"run_test $::sqlite_exec $combined_sql $combined_expected_output"
    (procedure "do_execsql_test" line 5)
    invoked from within
"do_execsql_test sqlite_version {
  SELECT sqlite_version();
} {3.46.1}"
    (file "./testing/scalar-functions.test" line 434)
    invoked from within
"source $testdir/scalar-functions.test"
    (file "./testing/all.test" line 16)
make: *** [Makefile:59: test-compat] Error 1
```
2024-09-16 14:28:18 +03:00
김선우
469f345c16 Fix explain message for function depending on the number of args 2024-09-16 18:47:53 +09:00
jussisaurio
a108dea825 GROUP BY 2024-09-14 16:14:45 +03:00
jussisaurio
0839211a49 Pass FuncCtx to Insn::Function to keep track of arg count 2024-09-14 12:38:14 +03:00
rjhallsted
6ac78dfb03 Cache constructed LIKE regexes if FUNCTION P1 is set 2024-09-10 13:54:52 -07:00
김선우
8fbcd10e0e Add support for ifnull scalar function 2024-08-16 09:25:04 +09:00
gandeevanr
23a7d389b1 added unit tests for NewRowid 2024-08-08 19:04:10 -07:00
gandeevanr
a9cb8157b5 initial pass at implementing NewRowId 2024-08-07 09:04:09 -07:00
sonhmai
0e7bd95e4e core: fix clippy 2024-08-03 20:14:26 +07:00
jussisaurio
20c085614f Add ability to annotate instructions with comments 2024-08-01 20:34:45 +03:00
jussisaurio
551b11303f Broaden the type of expr that qualifies as seekrowid candidate 2024-08-01 17:23:59 +03:00
jussisaurio
97dfae437c SeekRowid VM instruction 2024-08-01 17:23:59 +03:00
Pekka Enberg
82ff5b9c9b core: Remove useless use of format!() 2024-08-01 09:16:02 +03:00
Pere Diaz Bou
6357e88b46 core: implement vdbe opcodes minus newrowid 2024-07-31 17:25:01 +02:00
Pere Diaz Bou
bbed54d11c core: basic op explain insert 2024-07-31 17:23:16 +02:00
jussisaurio
588ab1af06 Run formatting and enforce formatting in CI 2024-07-23 23:14:36 +03:00
Pekka Enberg
e0663f2acf core: Move insn_to_str() to vdbe/explain.rs 2024-07-23 14:51:52 +03:00