Commit Graph

113 Commits

Author SHA1 Message Date
Pekka Enberg
6bd7d6752e Limbo 0.0.15 2025-02-18 18:51:39 +02:00
Doug Anderson444
1903914688 add js feature to nodejs build 2025-02-11 12:13:46 -04:00
Pekka Enberg
0638550be7 Merge 'Remove unnecessary reference counting from completion I/O callbacks' from Preston Thorpe
I am on a bit of a mission to revisit a lot of the ref counting, this
was an easy first win.
It seems to be a linear path of function calls or hashmaps which can own
the completions directly, no cloning needed.

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

Closes #912
2025-02-10 12:11:30 +02:00
Tiago Ribeiro
4b67e67b31 Update wasm bindings to use the new retrieval methods to access Record values. 2025-02-10 00:27:51 -07:00
Gustavo Sverzut Barbieri
cd2d817c10 github.com/penberg/limbo was moved to github.com/tursodatabase/limbo
Adjust all the references since they were broken
2025-02-08 10:21:49 -03:00
PThorpe92
75898027a0 Remove unnecessary reference counting from completion io callbacks 2025-02-08 08:20:19 -05:00
Pekka Enberg
c210821100 core: Move result row to ProgramState
Move result row to `ProgramState` to mimic what SQLite does where `Vdbe`
struct has a `pResultRow` member. This makes it easier to deal with result
lifetime, but more importantly, eventually lazily parse values at the edges of
the API.
2025-02-06 11:52:26 +02:00
Pekka Enberg
73a345aa4d Limbo 0.0.14 2025-02-04 15:13:18 +02:00
Levy A.
9df0b01689 refactor: lower ownership requirement 2025-02-03 16:52:42 -03:00
sonhmai
75f0cf9e20 chore: make clippy happy 2025-01-20 13:29:23 +07:00
Pekka Enberg
0abb917604 Limbo 0.0.13 2025-01-19 13:30:56 +02:00
Elijah Morgan
74ddc42df0 Add back integration tests
Fix package.json for better imports vs web/nodejs
Fix examples and integration tests
2025-01-18 15:01:16 -05:00
Elijah Morgan
6a7b269aa7 fixup dropped meta data 2025-01-16 21:30:36 -05:00
Elijah Morgan
c6d4484e63 bump versions 2025-01-16 21:29:19 -05:00
Elijah Morgan
f20a2d1334 Reorg to single package
Handle commonjs and esm module entry points

tests works
2025-01-16 21:29:19 -05:00
Elijah Morgan
f7be8b834b got vitest working
run via npm run test -w web
2025-01-16 21:29:19 -05:00
Elijah Morgan
02e4104932 reorg package structure
src moved under web/ to make it cleaner
build does less moving of files, mostly just moves the wasm-pack
into dist for node and web
2025-01-16 21:29:19 -05:00
Elijah Morgan
f75a1f89c4 WIP restructure
going to try out something different
2025-01-16 21:29:19 -05:00
Elijah Morgan
f81dfed922 Node and Web basic npm package test work 2025-01-16 21:29:16 -05:00
Elijah Morgan
8fa3a760c7 Web test of npm package works
Node one broke
2025-01-16 21:28:33 -05:00
Elijah Morgan
6bd40430bf Begin adding nodejs/web to a single npm package
Update build script to build both
Update package.json

Add basic test of node variant of npm package.
2025-01-16 21:28:29 -05:00
Pekka Enberg
b6ae8990e3 Limbo 0.0.12 2025-01-14 11:39:17 +02:00
Pekka Enberg
a369329988 Merge 'Add OPFS support to Wasm bindings' from Elijah Morgan
Lots of cleanup still left to do. Draft PR for adding support for OPFS
for WASM build (add support for limbo in browser).
Overall explanation of the architecture: this follows the sqlite wasm
architecture for OPFS.
main <> (limbo-worker.js) limbo (VFS - opfs.js) <> opfs-sync-proxy
The main thread loads limbo-worker.js which bootstraps the opfs.js and
opfs-sync-proxy.js and then launches the limbo-wasm.js.
At that point it can be used with worker.postmessage and
worker.onmessage interactions from the main thread.
The VFS provided by opfs.js provides a sync API by offloading async
operations to opfs-sync-proxy.js. This is done through SharedArrayBuffer
and Atomic.wait() to make the actual async operations appear synchronous
for limbo.
resolves #531

Closes #594
2025-01-07 10:36:18 +02:00
Elijah Morgan
c8232b019a commonize test code 2025-01-06 20:57:02 -05:00
Elijah Morgan
b9c94ba53c have tests run on different ports
cleanup tests cruft from trying to fix that issue
2025-01-06 20:42:37 -05:00
Elijah Morgan
ad9d372e9c cleanup
remove happy-dom
try to fix some issues with tests
add wasm-pack as devDependency
update versions
2025-01-06 19:22:20 -05:00
Pekka Enberg
ec9031dcf8 Improve JavaScript benchmarks 2025-01-05 20:43:55 +02:00
Pekka Enberg
daee7f8458 s/RowResult/StepResult/ 2025-01-05 20:24:26 +02:00
Pekka Enberg
5681603750 Merge 'Make iterate() lazily evaluated on wasm' from Diego Reis
#514
Introduces a new feature for lazy evaluation in the
`Statement.raw().iterate()` method and includes related changes in both
the test and implementation files. The most important changes include
adding a test case for lazy evaluation, creating a `RowIterator` struct,
and modifying the `iterate` method to use this new struct.
Everything seems to works fine, but suggestions on code improvement and
test use cases are welcoming.

Closes #527
2025-01-05 20:23:06 +02:00
Elijah Morgan
d51ca2150c Cleanup logging, move html files
General cleanup of cruft, deleted dead code, moved html files to clean
up dir.
2025-01-03 14:38:34 -05:00
Elijah Morgan
4bda7803c3 Add build for nodejs or web
Change how VFS gets loaded based on feature flags
2025-01-01 16:54:31 -05:00
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
Pekka Enberg
c4b0eb398c Limbo 0.0.11 2024-12-31 10:43:24 +02:00
PThorpe92
f6cd707544 Add clippy CI, fix or ignore warnings where appropriate 2024-12-29 10:25:41 -05:00
adamnemecek
97647ff056 Clean up code to use Self
Closes #556
2024-12-29 10:07:38 +02: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
Diego Reis
67c6409412 Add handling to busy row on RowIterator::next() 2024-12-26 15:40:04 -03:00
Diego Reis
d7be6f91cd Fix formating and pass on tests 2024-12-26 15:40:04 -03:00
Diego Reis
860e8af84d Remove .db files after tests execution 2024-12-26 15:40:04 -03:00
Diego Reis
7235336501 Update dependencies of wasm tests 2024-12-26 15:40:04 -03:00
Diego Reis
979115ee59 Remove unused variable on RowIterator 2024-12-26 15:40:04 -03:00
Diego Reis
901a534e0a Remove broken test due unimplemented SQL feature 2024-12-26 15:40:04 -03:00
Diego Reis
64414b888f Rollback js formatting to 4 spaces 2024-12-26 15:40:04 -03:00
Diego Reis
77c2b6f1a0 Make iterate() lazily evaluated on wasm 2024-12-26 15:40:04 -03:00
Pere Diaz Bou
aed14117c9 core: transaction support 2024-12-24 18:04:30 +01:00
Ziyak Jehangir
99d1b0e5a3 cleanup: replace &(*x) with x.as_ref() for smart pointer derefs 2024-12-19 19:36:04 +05:30
Pekka Enberg
e93ac38e55 Add statement interruption support
This adds an interrupt() method to Statement that allows apps to
interrupt a running statement. Please note that this is different from
`sqlite3_interrupt()` which interrupts all ongoing operations in a
database. Although we want to support that too, per statement interrupt
is much more useful to apps.
2024-12-19 12:30:32 +02:00
Pekka Enberg
69e3dd28f7 Limbo 0.0.10 2024-12-18 20:45:55 +02:00
Pekka Enberg
7943fa1e35 bindings/wasm: Add API reference document
The aim is towards libSQL/better-sqlite3 compatibility. Lift the API
reference document from libsql-js.git and update it accordingly to what
`limbo-wasm` supports.
2024-12-16 18:45:18 +02:00