Commit Graph

132 Commits

Author SHA1 Message Date
김선우
71c2bdf37b Add TODO comments 2025-01-10 20:26:41 +09:00
김선우
da787edd99 Implement JDBC so that DriverManager can detect limbo connection 2025-01-10 20:22:58 +09:00
김선우
b360f0559f Add LimboDataSource.java 2025-01-10 20:10:49 +09:00
김선우
bc9e9714f1 Add LimboConfig.java 2025-01-10 20:10:38 +09:00
김선우
e8e09cc745 Add JDBC.java 2025-01-10 20:03:32 +09:00
김선우
d88204252f Add JDBC4Connection.java 2025-01-10 19:57:48 +09:00
김선우
12bcfc399b Add LimboConnection.java 2025-01-10 19:55:54 +09:00
김선우
b796a972dc Fix LimboDB.load to be static method 2025-01-10 19:50:50 +09:00
김선우
84c987d42b Fix naming rules
- No underscore for java
- When method names are the same, append 0 at the back
2025-01-10 19:23:38 +09:00
김선우
90258a44b4 Add throwJavaException 2025-01-10 17:47:27 +09:00
김선우
3e26e7ebc5 Remove newSQLException and add throwLimboException in the LimboDB.java 2025-01-10 14:58:35 +09:00
Pekka Enberg
5c38cc88a9 Merge 'Implement open function in Java bindings' from Kim Seon Woo
## Purpose of this PR
- Implement open function
- Add basic structure for the following
  - exception handling
  - testing using gradle
## Changes
- Java
  - Remove unnecessary example code(Connection.java, Cursor.java,
Limbo.java)
  - Implement `open`
  - Add exception handling logic
  - Add junit test
- Rust
  - Add limbo_db.rs which implements native functions defined in
`Limbo.java`
  - Remove unnecessary example code in lib.rs
## TODOS
- Implement core features for AbstractDB.java and LimboDB.java (I'm
currently referencing sqlite-java, but there are some minor differences
as we use rust instead of C)
## Reference
- https://github.com/tursodatabase/limbo/issues/615

Closes #632
2025-01-09 18:05:42 +02:00
김선우
b3762b3e92 Fix clippy 2025-01-08 23:01:24 +09:00
김선우
9e0e3dc81a Update rust side logic to open database 2025-01-08 22:51:33 +09:00
김선우
29e434754b Enhance LimboDB.java open logic 2025-01-08 22:50:48 +09:00
김선우
281ba8d552 Remove unused java files 2025-01-08 19:41:31 +09: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
김선우
038ea16d75 Add TODO comments for deprecation. 2025-01-05 20:26:21 +09:00
김선우
8e110da9c9 Add wrapper classes around native methods that Limbo will provide 2025-01-05 20:21:35 +09:00
김선우
370e1ca5c2 Add support Java bindings
This add support for Java bindings in the bindings/java directory.
2025-01-05 10:28:05 +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
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
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
amuldotexe
b7b22f303f ran cargofmt 2024-12-20 20:36:35 +05:30
amuldotexe
f912771ae6 gracefully handling errors for issue https://github.com/tursodatabase/limbo/issues/494 , changes made 5 places where todo macros were replaced with relevant errors 2024-12-20 20:32:03 +05:30
jussisaurio
acdfe2be0c Merge 'cleanup: replace &(*x) with x.as_ref() for smart pointer derefs' from Ziyak Jehangir
The only instances of the &(*x) dereferencing pattern in the codebase,
is used with Completion smart pointers. Changed it to use as_ref(). No
functional changes.

Closes #516
2024-12-19 17:43:59 +02:00
Pekka Enberg
91a5994eac Merge 'Fix Python binding packaging' from Gökmen Görgen
Somehow the `make` command does not work because of the name
mismatching. This PR will fix only this issue.
For reproducing the issue:
```
$ make

Checking requirements files...
mkdir -p .tmp
pip-compile pyproject.toml --quiet             --output-file=.tmp/requirements.txt
pip-compile pyproject.toml --quiet --extra=dev --output-file=.tmp/requirements-dev.txt
diff -u requirements.txt     .tmp/requirements.txt     || (echo "requirements.txt doesn't match pyproject.toml"     && exit 1)
--- requirements.txt    2024-12-17 02:19:29.887227723 +0000
+++ .tmp/requirements.txt       2024-12-17 02:19:38.046065295 +0000
@@ -1,2 +1,2 @@
 typing-extensions==4.12.2
-    # via limbo (pyproject.toml)
+    # via pylimbo (pyproject.toml)
requirements.txt doesn't match pyproject.toml
make: *** [Makefile:28: check-requirements] Error 1
```
## Another issue...
`maturin` is still not in requirements dev list. Shall we continue to
install it manually or add it to dev list?

Closes #495
2024-12-19 17:13:52 +02:00