Commit graph

6 commits

Author SHA1 Message Date
81ee69295c Checkpoint.
- Fix a couple of edge cases while switching between collections.
  - Raise error if attempting to switch collections mid-transaction.
  - Add logic for re-entrancy with long-running transactions.
  - Revert to the prior collection if passing a block to #collection.
  - Add a predicate to tell if you're currently within a long-running transaction.
  - Add separate commit/rollback to long-running transactions.

FossilOrigin-Name: 711239e6fc2f25479a26fb54805da1e5db792f97f28a8b5724e0b38eb11cdb07
2021-01-25 00:36:40 +00:00
ceb92fad16 Expose some mdbx statistics/metadata to ruby.
- Add anonymous structs for settings and state to the internal db
    instance struct.
  - Allow tweaking the max_readers setting on db open.
  - Allow altering database sizing/geometry values.
  - Start sketching out some transaction re-entrancy.
  - Refactor initialization slightly, just use the db struct
    instead of additional unnecessary vars.

FossilOrigin-Name: 513f02946f7dc39001c402c1adf0697bb2852ba867685b35adbccaaaf43c6e15
2020-12-23 01:10:19 +00:00
770a931d77 Multiple changes.
- Add build manifests for SourceHut.
  - Update README destination links.
  - Fix manifest for prerelease gem.
  - Reopen env handles when #clear is successful.
  - Fix #each when there is only one key.
  - Always use io_vec lengths when creating new strings.
  - Hook for rdoc generation.
  - Rename #open to #reopen, don't alias it.
  - Add a Rollback exception for upcoming transaction block work

FossilOrigin-Name: d6ddedc51b0ac67f395d5749aa3e6adbeebdaf2843c6402ace757b0afffc2be9
2020-12-22 06:24:18 +00:00
5ed44e52fa Multiple changes.
- Provide a method to reopen the database environment if closed.
 - Add #keys, which returns an array of keys for the current collection.
 - Finish collection/namespace implementation.
 - Add various aliases (collection->namespace, etc)
 - Add #clear, which destroys data for a the current collection.
   If called in the main db, destroys all.  Don't close the environment
   after a #clear, just the dbi handle.
 - Various bugfixes.

FossilOrigin-Name: 8b00d59e8c5269266f3c6c0d10056a1c0fe1bb583ffbe099a6ed0dac3baf3a66
2020-12-17 01:09:43 +00:00
d92ba7c5eb Checkpoint commit.
Fleshing out collections, automatic serialization of values.  Stringify
all keys.

FossilOrigin-Name: 8bb5e27eacd18bc34b60309a03cdce31921f790c821dab89bf12cd9bfc19825d
2020-12-16 08:29:50 +00:00
37b8091690 Checkpoint commit, start sketching out MDBX::Database.
FossilOrigin-Name: 92f55b2d6cc9652cb9cb67e69588ed0f4f155086a5a160aae68a1f22e9114314
2020-11-30 05:57:26 +00:00