This PR fixes#666
Limbo was treating all single byte integers properly in `core/types.rs`,
but when converted in `sqlite3_ondisk`, it was losing the sign for 8 bit
integers, treating them all as unsigned. Sqlite3 specifies in their file
format that the `1` record serial type is "Value is an 8-bit twos-
complement integer." https://www.sqlite.org/fileformat.html
We now properly match sqlite3's output


Closes#667
Give the user the option of choosing IO backend. There is only a
"syscall" backend, unless built for Linux with `#[cfg(feature =
"io_uring")]` which introduces `--io=io-uring`.
Right now, the choice has only been implemented for the CLI. Bindings
and such default to PlatformIO, except when an "in-memory" database has
been chosen.
Can be tested by running CLI with RUST_LOG=debug
Reviewed-by: Preston Thorpe <preston@unlockedlabs.org>
Closes#654
I was planning on starting work on index insertion, but realized we need
to know whether our cursor refers to a table or an index etc., so it
resulted in this refactoring work.
- `cursor_ref` now contains what _type_ of cursor it is (table, index,
pseudo, sorter)
- `program.cursors` is now `program.btree_table_cursors`,
`program.btree_index_cursors` etc and they are unboxed because dynamic
dispatch is no longer necessary
- Cursor trait removed -- 95% of the shit was btree specific anyway, so
I just moved them to `BTreeCursor`. In certain instructions in the VDBE
we expect a btree cursor and in others we expect a pseudo/sorter etc,
lets make that explicit.
- I also removed `BTreeCursor::get_new_rowid()` specific tests that
required macros to generate a mock implementation of the `Cursor` trait
-- main reason is I couldn't figure out how to reimplement this without
the trait, and the second reason is that I don't think we really need
those tests, AND the proc macro is constantly failing in my editor as
well and screwing up `rust-analyzer`
Closes#655
## Purpose of this PR
- Set rules for java naming, maybe we can add tests to automatically
test rules in the future
- For java methods, don't use underbar(IMO using camelcase for java
methods seems to be the common convention)
- If method names collide, append 0 at the back
## Reference
https://github.com/tursodatabase/limbo/issues/615Closes#645
Furthering work for JSON compatibility as described in #127, this change
adds support for the `json_error_position` function used to find the
error in invalid JSON values.

Closes#564
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.
Implements the `->` and `->>` operators. Also fixes a few
inconsistencies between sqlite and limbo for `json_extract` function.
Those three functions are similar, yet return slightly different data
types.
Closes#636
### Purpose of this PR
- Enhance exception handling logic
- When exceptions has to be thrown from Rust to Java, let's just
return the error message directly.
- Removes JNI call to get error message using
`Java_org_github_tursodatabase_core_LimboDB_getErrorMessageUtf8`
- Add `throwJavaException` to assure that the exception throwing logic
works corretly
Closes#642