jussisaurio
2e32ca0bdb
More structured query planner
2024-08-16 19:42:03 +03:00
Pekka Enberg
5b7d112e74
Merge 'implementation of json function json(X)' from Jean Arhancet
...
Add the `json` function `json(X)` (related to the issue https://github.com/penberg/limbo/issues/127 )
Closes #230
2024-08-06 08:05:33 +03:00
JeanArhancet
552090cb29
feat: add json support
2024-08-04 10:54:27 +02: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
64f7e48f1b
Cleanup
2024-08-01 17:23:59 +03:00
jussisaurio
8feb443048
Use SeekRowid instruction on expr1 = expr2 constraints if they contain primary keys
2024-08-01 17:23:59 +03:00
Pekka Enberg
f8a43361db
core: Move pager.rs to storage module
2024-08-01 11:52:50 +03:00
Pere Diaz Bou
e6f8b34f2b
core: insert_to_page almost complete
2024-07-31 17:27:02 +02:00
Pere Diaz Bou
affe3443cc
core: vbde coroutine generation with rowid insert
2024-07-31 17:25:01 +02:00
jussisaurio
a700d70281
Process where clause and joins before opening loops
...
This is background restructuring work to enable us to change the
loop order (or change the way a given loop is handled) based on
what the WHERE and JOIN clauses contain.
Changes:
- `process_where()` called before opening table loops
- Due to the above, `WhereTerm` now refers to table identifiers instead of
cursor IDs because the cursors have not been allocated yet at that point
- `ProcessedWhereClause` now contains a `loop_order`, which just defaults
to the order in the SQL query for now. In the future the loop order may
change depending on the query.
- `loops` removed from `Select` struct; a `LoopInfo` vector is now returned
from `translate_tables_begin()`
2024-07-28 13:07:11 +03:00
Jussi Saurio
9a50d53fcb
Merge pull request #244 from penberg/fold-columns
...
core: Fold columns into column_info in Select struct
2024-07-28 10:50:57 +03:00
Pekka Enberg
93d88d6cca
core: Fold columns into column_info in Select struct
...
As a cleanup, fold the columns struct member into column_info by
introducing a `raw_column` in `ColumnInfo` struct.
2024-07-28 10:01:48 +03:00
jussisaurio
769bf51d13
rename
2024-07-27 16:48:59 +03:00
jussisaurio
6f879c3e79
Amend code comment explaining 'early_terminate_label'
2024-07-27 16:48:01 +03:00
jussisaurio
fee33cfcf0
Rename ljbk to left_join and left_join_bookkeeping to left_join_maybe
2024-07-27 16:38:47 +03:00
jussisaurio
700d9ee976
Optimize constant conditions
2024-07-27 15:08:30 +03:00
jussisaurio
e3cc3da7ca
Implement #216 : order by column number
2024-07-26 14:35:33 +03:00
Pekka Enberg
9dd505803f
core: Move SortInfo to select.rs
...
It's the only place where it's used.
2024-07-25 17:47:17 +03:00
Pekka Enberg
b25f63f360
core: Move LimitInfo to select.rs
...
That's the only place where it's used.
2024-07-25 17:47:17 +03:00
Pekka Enberg
16e0e740df
core: Rename build_select() to prepare_select()
...
Let's follow SQLite's naming here.
2024-07-25 17:47:17 +03:00
Pekka Enberg
97afd76865
core: Clean up imports in select.rs
2024-07-25 17:47:17 +03:00
Pekka Enberg
a4afadfd2e
core: Select struct documentation
2024-07-25 17:47:17 +03:00
Pekka Enberg
b2f47746a9
core: Move Select struct at the top of select.rs
...
It's the main data structure of the file so let's make it the first one.
2024-07-25 17:27:45 +03:00
Pekka Enberg
351242561d
Kill anyhow usage
...
Switch anyhow to explicit `LimboError` type using thiserror crate, which
lets us make error handling more structured.
2024-07-25 17:15:08 +03:00
Pekka Enberg
be392d1a4c
core: Move translate_select() to select.rs
2024-07-24 21:20:15 +03:00
Pekka Enberg
be91b9aaca
core: Move build_select() to select.rs
2024-07-24 21:13:08 +03:00
jussisaurio
9eb68524e7
Upgrade sqlite3-parser #185
2024-07-24 14:05:39 +03:00
jussisaurio
84cf4033d5
Refactor join processing
...
- Make all constraints a list of WhereTerms in a ProcessedWhereClause
- Support multiple joins instead of just one
2024-07-23 15:04:40 +03:00
Pekka Enberg
a5dd8fd92c
core: Move select.rs to translate/
2024-07-21 20:36:56 +03:00