Commit Graph

1587 Commits

Author SHA1 Message Date
Elijah Morgan
5765ccbfbb Add readme info
Add basic limbo-opfs-test.html
Remove unused browser-its structure - we may bring it back
2025-01-01 16:14:48 -05:00
Elijah Morgan
058ca89561 feat add basic opfs support and tests 2025-01-01 10:31:26 -05:00
Jussi Saurio
1bc1f38737 Merge 'Refactor out repetitive agg_func code in vdbe' from Preston Thorpe
This PR cleans up a lot of the repetitive code that caused having to
match the `AggFunc` cases repeatedly 😄
Most of the repetition was caused by the binary math operators, so I
just added it for those for now.

Reviewed-by: Jussi Saurio <penberg@iki.fi>
Reviewed-by: Pere Diaz Bou <preston@unlockedlabs.org>

Closes #575
2024-12-31 15:02:57 +02:00
PThorpe92
ed95007298 Separate exec insns to individual functions 2024-12-31 07:55:40 -05:00
PThorpe92
45eeee1589 Add comment and match case for improperly called values 2024-12-31 07:54:01 -05:00
PThorpe92
d572089b80 Refactor out repetitive agg_func code in vdbe 2024-12-31 07:53:55 -05:00
Pekka Enberg
b1ca2b050b Merge 'External functions' from Pekka Enberg
This pull request adds support for external functions, which are
functions provided by extensions. The main difference to how things are
today is that extensions can register functions to a symbol table at
runtime instead of specifying an enum variant.

Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>

Closes #567
2024-12-31 14:04:20 +02:00
Pekka Enberg
0aabcddf18 ext/uuid: Convert uuid4() to external function 2024-12-31 13:56:32 +02:00
Pekka Enberg
33dbd6c892 core: External functions 2024-12-31 13:56:32 +02:00
Pekka Enberg
858aecfea2 core: Drop Clone and PartialEq from Func enum
We don't need them anywhere and they make it hard to introduce
GenericFunction.
2024-12-31 13:51:20 +02:00
Pekka Enberg
dca47f62ea core: Don't use Weak reference for connection database
The database object is a way to represent state that's shared across
multiple connections. We don't want to release that object until all
connections are closed.
2024-12-31 13:51:20 +02:00
Jussi Saurio
9b7b2f6241 Merge 'Codegen cleanups' from Pekka Enberg
Some random cleanups to make planner.rs smaller.

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #582
2024-12-31 12:18:08 +02:00
Pekka Enberg
3046757d09 core/translate: Move prepare_delete_plan() to delete.rs
The planner.rs file is pretty big. Let's make it smaller by moving more
of delete handling to delete.rs.
2024-12-31 11:40:35 +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
Pekka Enberg
dad3a5b069 core/translate: Move translate_insert() to top
The translate_insert() function is the entry point to translating an
INSERT statement so let's make it the first function in insert.rs.
2024-12-31 11:33:17 +02:00
Pekka Enberg
f6149d3bd7 core/translate: Kill unused lifetimes 2024-12-31 11:33:17 +02:00
Pekka Enberg
c4b0eb398c Limbo 0.0.11 2024-12-31 10:43:24 +02:00
Pekka Enberg
f8d408e9a8 Merge 'enable sqpoll by default in io_uring' from Preston Thorpe
EDIT: will continue iterating on these ideas, as discussed on discord.
for now, this has been changed to just enable `IORING_ENABLE_SQPOLL` by
default. This is supported sin `5.11`, and I believe the last debian
release < that reached EOL in July, so shouldn't be an issue.

Closes #557
2024-12-31 10:37:39 +02:00
Pekka Enberg
21a9f293fd Merge 'simulator: allow failure assertions' from Alperen Keleş
- add creating the same table two times to the list of checked
properties as a failure property example

Reviewed-by: Pekka Enberg <penberg@iki.fi>
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>
Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>

Closes #554
2024-12-31 10:35:43 +02:00
Pekka Enberg
80fe5b0425 Merge 'Add in-memory mode to Python bindings' from Jean Arhancet
Add memory database support in Python bindings and add immediate
statement execution for DDL/DML operations (logic to be confirmed)

Closes #569
2024-12-31 10:33:18 +02:00
Pekka Enberg
d12afe163c Merge 'Document how to add a new SQL function' from Sonny
Suggesting adding a simple guide on how to start contributing a SQL
function.
It would be easier if I had something like this when I started
contributing to Limbo, maybe it will be for others as well.
I'm aware that this will be partly out-of-date over time due to
refactors. However, I think the gist of modifying different layers
(Parser, VDBE bytecode program,...) and how they interact with each
other stays. That part is what I hope this guide can convey to a new
contributor.
What do you think?

Closes #565
2024-12-31 10:32:20 +02:00
Pekka Enberg
80e12dfbf7 Merge 'Fixes glob giving wrong results in some cases ' from Vrishabh
Fixes #577
With the previous implementation we weren't escaping the regex meta
characters . And in certain cases glob had a different meaning than
regex.
For e.g , the below shows a glob pattern with its regex equivalent
- `[][]` translates to `[\]\[]`
- `[^][]` translates to `[^\]\[]`

Closes #578
2024-12-31 10:31:49 +02:00
Pekka Enberg
4e8f3de535 Merge 'Clean up more Clippy warnings' from Lauri Virtanen
I ran `cargo clippy --fix` and also fixed some issues manually.
Clippy still warns about some issues - especially in Simulator code.

Closes #574
2024-12-31 10:30:19 +02:00
psvri
3ac3fdf0a2 Fix glob 2024-12-30 17:02:31 +05:30
JeanArhancet
9a70dc8f78 fix: clippy error 2024-12-30 10:22:36 +01:00
JeanArhancet
2a0402ce7f fix: python lint 2024-12-30 10:21:11 +01:00
JeanArhancet
cb69d8b0dd feat(python): add in-memory mode 2024-12-30 10:21:11 +01:00
alpaylan
d8ce88c057 fix clippy warning 2024-12-30 00:41:21 -05:00
alpaylan
58f23983e1 minor changes, add maximum time bound to the simulator, fix bug in the table create shadowing 2024-12-30 00:36:43 -05:00
alpaylan
c01f2d4ac2 fix formatting 2024-12-29 16:09:49 -05:00
alpaylan
8e2a1e4289 Merge remote-tracking branch 'turso/main' 2024-12-29 16:08:35 -05:00
PThorpe92
4e77840ee5 Setup io_uring with sqpoll enabled 2024-12-29 15:34:17 -05:00
alpaylan
d3fee3b331 add empty line at the end of cargo.toml, add create counts to the interaction stats, turn the percentages into f64 2024-12-29 14:00:57 -05:00
Lauri Virtanen
db384c6828 Simplify init of delimiter_exprs
Clippy:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init
2024-12-29 19:22:45 +02:00
Lauri Virtanen
10065bda35 Don't use inaccurate pi values, make clippy happy 2024-12-29 19:22:45 +02:00
Lauri Virtanen
55916fdd9d Remove function parameter as it's only used in recursion 2024-12-29 19:22:45 +02:00
Lauri Virtanen
854005b977 Run cargo clippy --fix && cargo fmt 2024-12-29 19:22:28 +02:00
Pere Diaz Bou
b9187d57f6 Merge 'Add clippy CI, fix or ignore warnings where appropriate' from Preston Thorpe
There is no semantic changes in this PR, the clippy command came from
@pereman2's suggestion in #542
There was more to fix than I previously thought. I originally set out to
refactor out some of the logic in `vdbe::step`, but with some actual
semantic changes. That file: `vdbe/mod.rs` is so full that it required
moving the `Insn` enum to another file, so I figured I would just put
some non-semantic changes all together so it's easier to review and get
that done first... and figured I'd fix some clippy warnings while I was
at it. Also adjusted the actions to `checkout/@v3`.
The project is obviously so early that there are going to be a decent
amount of things like unused fields or methods, which is why I was
originally not really pro clippy.. but seeing how many genuinely good
improvements it recommended, I think it's probably the right way to go.

Closes #563
2024-12-29 17:43:18 +01:00
PThorpe92
361e55f858 Fix checkout action for clippy ci 2024-12-29 10:25:49 -05:00
PThorpe92
f6cd707544 Add clippy CI, fix or ignore warnings where appropriate 2024-12-29 10:25:41 -05:00
Pekka Enberg
f87dc7cacc Merge 'Support like function with escape' from Vrishabh
I have added support for like function with escape i.e like(X,Y,Z) .
There is good opportunity to refactor/cleanup the like operations which
can be done in another PR, as I wanted to keep the changes small .

Closes #568
2024-12-29 16:58:06 +02:00
adamnemecek
97647ff056 Clean up code to use Self
Closes #556
2024-12-29 10:07:38 +02:00
Jussi Saurio
948a2d3358 Merge pull request #572 from tursodatabase/commit-cargo-lock-changes
chore: commit cargo lock changes from #553
2024-12-29 09:09:10 +02:00
Jussi Saurio
8c9bd0deb9 chore: commit cargo lock changes from #553 2024-12-29 08:58:26 +02:00
psvri
1922b8ea38 Support like function with escape 2024-12-28 13:55:12 +05:30
Pekka Enberg
a8e2f48ab2 Merge 'Remainder vdbe opcode' from Preston Thorpe
Reviewed-by: Sonny <14060682+sonhmai@users.noreply.github.com>

Closes #562
2024-12-28 09:46:53 +02:00
sonhmai
38e9ed7d5b make functions contrib doc better 2024-12-28 12:48:04 +07:00
Sonny
2a3f4fd02a Merge branch 'tursodatabase:main' into feat/doc-functions-contributing 2024-12-28 11:26:17 +07:00
PThorpe92
ddf229c432 Update COMPAT.md 2024-12-27 15:42:13 -05:00
PThorpe92
82de59dd88 Add compatability tests for mod operator 2024-12-27 15:39:02 -05:00