This pr adds support for multiple readers and a single writer with a
custom made lock called `LimboRwLock`. Basically there are 5 allowed
read locks which store the max frame allowed in that "snapshot" and any
reader will try to acquire the biggest one possible. Writer will just
try to lock the `write_lock` and if not successful, it will return busy.
The only checkpoint mode supported for now is `PASSIVE` but it should be
trivial to add more modes.
This needs testing, but I will do it in another PR. I just wanted to do
it in another PR.
Closes#544
This PR makes two small incremental updates:
1- It adds a Clap CLI for simulator configuration, using the same Clap
version as the Limbo cli crate
2- It creates a new submodule called `simulator`, moving simulator
related structs from the large main file into their own files.
I am open to suggestions on the submodule name instead of `simulator` as
it's kind of weird to have `simulator/simulator` in the file tree.
Closes#540
This PR should have no functional changes, just variable renaming and
comments
Using `///` comment format for better IDE support
Reviewed-by: Pere Diaz Bou <penberg@iki.fi>
Closes#539
`cargo test` is always failing on FreeBSD, the following is one of the
errors:
```
---- tests::test_simple_overflow_page stdout ----
thread 'tests::test_simple_overflow_page' panicked at test/src/lib.rs:32:84:
called `Result::unwrap()` on an `Err` value: IOError(Os { code: 2, kind: NotFound, message: "No such file or directory" })
```
After some digging, I found that the `open_file` function in
`core/io/generic.rs` does not respect the `OpenFlags::Create` flag. This
commit adds support for file creation in the `open_file` function.
`cargo test` now passes on FreeBSD.
Closes#537
#509
Started the discussion on discord about possibly supporting UUID types
natively. This PR only implements the `sqlean` extension's functions and
behavior, with the only changes being:
1. uuid's are returned as `blob`s by default. (that was an assumption I
made considering perf, thinking this would be preferred if UUID ended up
being a supported native type. if `text` is preferred I can change it)
2. `uuidv7` types here can accept an argument of seconds since epoch to
customize the embedded timestamp. The func
`uuidv7_timestamp_ms(string_or_blob_v7)` allows the user to convert
their uuid7 back into the timestamp.

Closes#518
`cargo test` is always failing on FreeBSD, the following is one of the
errors:
```
---- tests::test_simple_overflow_page stdout ----
thread 'tests::test_simple_overflow_page' panicked at test/src/lib.rs:32:84:
called `Result::unwrap()` on an `Err` value: IOError(Os { code: 2, kind: NotFound, message: "No such file or directory" })
```
After some digging, I found that the `open_file` function in
`core/io/generic.rs` does not respect the `OpenFlags::Create` flag. This
commit adds support for file creation in the `open_file` function.
`cargo test` now passes on FreeBSD.
Reference Issue: #393
This PR implements a procedural macro derive_description that automates
the generation of a get_description method for enums. The macro extracts
documentation comments (specified with `/// Description...`) associated
with enum variants and generates an implementation that provides
optional descriptions for each variant.
Closes#528
- added Arbitrary and ArbitraryOf<T> traits for mroe centralized
generation
- implemented random generation for tables and structured queries
Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>
Closes#464
Solving issue #494 , changes made at 5 places where todo macros were
replaced with relevant errors to avoid the crashes _for now_
Reviewed-by: Avinash Sajjanshetty <opensource@avi.im>
Closes#526