Jussi Saurio
2ddac4bf21
select.rs: use new data structures when parsing select
2025-02-02 10:18:13 +02:00
ben594
d03a0dbd39
Added parsing of offset clause
2025-01-26 16:40:30 -05:00
Pekka Enberg
f5e5428d45
Merge 'Syntactic improvements' from Jorge López Tello
...
This is a purely syntactic PR. It doesn't change behavior, just rewrites
some loops and removes unneeded parts, like lifetime annotations and
references. Mainly because the Clippy and IDE warnings get annoying.
Don't worry about the number of commits, I just separated based on type
of change.
Closes #732
2025-01-19 12:17:28 +02:00
Pekka Enberg
cdcc98540a
cargo fmt
2025-01-19 08:52:01 +02:00
Krishna Vishal
5cf78b7d54
chore: clippy remove unused imports
2025-01-19 07:18:31 +05:30
Krishna Vishal
acad562c07
Remove unnecessary Result
2025-01-19 06:50:00 +05:30
Krishna Vishal
fa0503f0ce
1. Changes to extension.py
...
2. chore: cargo fmt
2025-01-19 04:58:05 +05:30
Krishna Vishal
6173aeeb3b
1. Fix merge conflicts
...
2. change tests for extensions to return error instead of null (Preston)
2025-01-19 04:39:25 +05:30
Krishna Vishal
ca097b1972
Remove unused import
2025-01-19 04:35:21 +05:30
Krishna Vishal
027803aabf
Refactor code
2025-01-19 04:35:21 +05:30
Krishna Vishal
68553904c7
Converted the unconditional unwrap to a match which handles the case when the function is COUNT and args are None and replaces the args. Solves https://github.com/tursodatabase/limbo/issues/725
2025-01-19 04:35:21 +05:30
Jorge López
86a4714711
syntactic changes: remove unneeded paths when the type is already imported
2025-01-18 18:29:12 +01:00
PThorpe92
0c737d88f7
Support aggregate functions in Extensions
2025-01-17 14:13:57 -05:00
PThorpe92
9c208dc866
Add tests for first extension
2025-01-14 07:27:35 -05:00
PThorpe92
98eff6cf7a
Enable passing arguments to external functions
2025-01-14 07:20:50 -05:00
PThorpe92
3412a3d4c2
Rough design for extension api/draft extension
2025-01-14 07:20:48 -05:00
Levy A.
eff5de50c5
refactor: make translate_* functions accept ProgramBuilder
...
simplifies function signatures and allows attaching more context to
ProgramStatus on `translate::translate`, useful for query parameters.
2025-01-13 20:41:56 -03:00
Jussi Saurio
f434b24e63
Fix limbo/core to work with new boxed ast types
2025-01-05 13:51:34 +02:00
Jussi Saurio
2b5b54c44e
clippy
2025-01-01 07:56:39 +02:00
Jussi Saurio
2066475e03
feat: subqueries in FROM clause
2024-12-31 14:18:29 +02:00
Pekka Enberg
33dbd6c892
core: External functions
2024-12-31 13:56:32 +02:00
Pekka Enberg
cb5d86ed8e
core/translate: Move prepare_select_plan() to select.rs
...
The planner.rs file is pretty big. Let's make it smaller by moving more
of select handling to select.rs.
2024-12-31 11:38:13 +02:00
김선우
5cdcb8d78c
Split Plan into Select and Delete
2024-12-23 05:45:23 +09:00
김선우
1d3ce52812
Refactor planner and optimizer to be DRY
2024-12-22 15:11:26 +09:00
jussisaurio
7ecc252507
fix rest of the failing tests
2024-11-26 17:31:51 +02:00
jussisaurio
3f9e60633f
select refactor: order by and basic agg kinda work
2024-11-26 17:31:51 +02:00
jussisaurio
d0466e1cae
introduce Column member of ast::Expr and bind idents to columns
2024-11-26 17:31:51 +02:00
Pere Diaz Bou
c0e51c4ca6
wip wal
2024-11-05 15:29:53 +01:00
jussisaurio
a108dea825
GROUP BY
2024-09-14 16:14:45 +03:00
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