Glauber Costa
bf1cfe3a1d
avoid potentially expensive operations on prepare, query, execute
...
This simple patch makes sure we can operate with a reference to the
string instead of being forced to transform it to a string, and makes
sure that the Arc doesn't have to be cloned (which can be expensive in
multi-core systems).
This doesn't really make a large difference in benchmarks, given how
expensive Parse::new() is.
2025-01-28 13:44:34 -05:00
Pekka Enberg
e8600fa2a1
Merge branch 'main' into static
2025-01-27 09:49:34 +02:00
Pekka Enberg
7967cc5efc
core: Kill Rows wrapper struct
...
It's just an useless wrapper, kill it.
2025-01-26 16:27:19 +02:00
Jussi Saurio
faa6d0c69d
use vec for cursors, not map
2025-01-26 14:04:05 +02:00
Pekka Enberg
8942c38bda
core: Fix Statement::reset()
...
The first rule of writing fast programs: don't use dynamic memory
allocation!
Brings back some performance for the `SELECT 1` micro-benchmark,
although we're still not where we need to be.
2025-01-26 11:47:28 +02:00
PThorpe92
32c985f9a8
Progress on Go bindings, add prepare + query statement
2025-01-25 23:01:46 -05:00
PThorpe92
545990f806
Support returning column names from prepared statement
2025-01-23 11:02:31 -05:00
PThorpe92
f13d035965
Enable wasm to static link extensions
2025-01-21 09:36:49 -05:00
PThorpe92
cc63aac305
Fix tests to account for built-in extensions
2025-01-21 09:32:44 -05:00
PThorpe92
3d188eba0f
Enable staticly linking with builtin extensions
2025-01-21 09:32:43 -05:00
Krishna Vishal
04fd5a40d6
Finalize the parser in the case of Error while running queries. This resets the parser stack and prevents triggering the assertion and thereby panic.
...
Closes https://github.com/tursodatabase/limbo/issues/742
2025-01-20 16:10:35 +05:30
ben594
28ce68091f
Modified changes and total_changes scalarfuncs to be more like sqlite
...
Fmt and clippy
Remove print
2025-01-19 20:51:13 -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
5851d6643a
Revert "core: Move re-exports at top of lib.rs"
...
This reverts commit c8a979eb4b . It
conflicts with a cleanup PR I am about to merge.
2025-01-19 12:17:06 +02:00
Pekka Enberg
c8a979eb4b
core: Move re-exports at top of lib.rs
...
Clean up the code a bit by moving re-exports at the top of lib.rs to
make them more visible to the reader.
2025-01-19 11:34:59 +02:00
PThorpe92
956320b7d0
Fix scalar API in extensions, add some error handling
2025-01-18 15:19:35 -05:00
Jorge López
e4ab2fb273
syntactic changes: rewrite loop with while
2025-01-18 19:19:49 +01:00
Jorge López
f160206cdd
syntactic changes: replace unwrap() with ? in functions that return Result<...>
2025-01-18 18:33:43 +01:00
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
Pekka Enberg
9209641a07
cargo fmt
2025-01-16 14:43:23 +02:00
Pekka Enberg
93903555aa
Rename limbo_extension crate to limbo_ext
2025-01-16 14:40:52 +02:00
Levy A.
9b8722f38e
refactor: more well rounded implementation
...
`?0` parameters are now handled by the parser.
2025-01-15 16:53:26 -03:00
Levy A.
5de2694834
feat: more parameter support
...
add `Statement::{parameter_index, parameter_name, parameter_count,
bind_at}`. some refactoring is still needed, this is quite a rough
iteration
2025-01-15 16:51:04 -03:00
Levy A.
d3582a382f
fix: small bugs
2025-01-15 16:51:04 -03:00
Levy A.
6e0ce3dd01
chore: cargo fmt
2025-01-15 16:51:04 -03:00
Levy A.
08c8c655e9
feat: initial implementation of Statement::bind
2025-01-15 16:51:04 -03:00
psvri
9cc9577c91
Run all statements from sql argument in cli
2025-01-15 18:19:39 +05:30
PThorpe92
23d9d09b70
Add load_extension function, resolve shared lib extensions
2025-01-14 12:01:07 -05:00
PThorpe92
9c208dc866
Add tests for first extension
2025-01-14 07:27:35 -05:00
PThorpe92
3099e5c9ba
Improve api, standardize conversions between types, finish extension
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
PThorpe92
0a10d893d9
Sketch out runtime extension loading
2025-01-14 07:18:07 -05:00
Jorge López
2596e0800e
core: expose UnixIO apart from PlatformIO on any Unix, and expose UringIO on Linux with feature io_uring.
...
cli: add a new argument to select I/O backend (more than one option only for Linux with io_uring feature).
cli: make both Limbo::new() and Limbo::open_db() use get_io(), unifying parsing of database path and eliminating duplicated code.
2025-01-11 15:21:26 +01:00
Jussi Saurio
f434b24e63
Fix limbo/core to work with new boxed ast types
2025-01-05 13:51:34 +02:00
Jussi Saurio
d1f74fa3cb
Emitter cleanup part 2: add Resolver
2025-01-04 12:23:19 +02:00
Lemon-Peppermint
9109dbf8ec
Add changes tracking to the 'Connection' struct + 'Insn::InsertAwait' now affects changes counter
2025-01-03 00:04:20 +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
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
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
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
PThorpe92
f6cd707544
Add clippy CI, fix or ignore warnings where appropriate
2024-12-29 10:25:41 -05:00
김선우
ad2d515ffd
Merge branch 'main' into feature/delete-planning
2024-12-27 23:21:35 +09:00
Pekka Enberg
f2ecebc357
Rename RowResult to StepResult
...
The name "row result" is confusing because it really *is* a result from
a step() call. The only difference is how a row is represented as we
return from VDBE or from a statement.
Therefore, rename RowResult to StepResult.
2024-12-27 10:20:41 +02:00
Pere Diaz Bou
aed14117c9
core: transaction support
2024-12-24 18:04:30 +01:00
김선우
56165fb0d6
Merge branch 'main' into feature/delete-planning
2024-12-24 12:29:19 +09: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