Closes open transactions if de/serialization fails for any reason,
avoiding the object to be in a potentially confused state.
Thanks to Michael Granger (ged@faeriemud.org) for the heads up and test case.
FossilOrigin-Name: e6e52675510533da8a26b0e2f0b2f73505a3b4ee0c94b123c37089489ed7745a
- Raise an error if invalid options are passed to the constructor.
- Bugfix: Ensure drop() only removes the specified collection.
- Fix initializer double memory allocation.
- Fix key/data object allocation: make garbage collection safe.
- Move common macros to the global header file.
FossilOrigin-Name: 98d3016bd25921dead39d9c5474712766b56519d575bc8cd960932b3fbc16b69
- Alter the behavior of #clear, so it doesn't destroy collection
environments, but just empties them.
- Add #drop, which explictly -does- destroy a collection environment.
- Run all cursor methods through rb_protect, to ensure proper
cursor cleanup in the event of an exception mid iteration.
- Fix the block form of collections to support multiple scopes.
- Switching to a collection now automatically creates its environment.
- Add include? and has_key?, for presence checks without allocating
value memory or requiring deserialization.
FossilOrigin-Name: e1ed7bf613981607bb3b57ce7dd3e58b94ea3046e140b6dc37440da8d2909f94
- Complete first round of documentation.
- Complete first round of tests and coverage.
- Expand the thread benchmarker for testing metasync.
- Add enumerators (each_key/each_value/each_pair) using cursors.
- Remove keys() implementation in favor of using the emumerable.
- Make deserialization more DRY.
- Add an efficient length() method.
- Add various Hash-alike methods.
- General code cleanup for release.
FossilOrigin-Name: 0d2bd3995f203c9ac1734ac3da32dd2f09efda9a394e554e6006e44dd07a33b0
- Fix some C rdoc so it is parsed correctly.
- Fill out transaction testing.
- Populate docs for DB options.
FossilOrigin-Name: f54dbfacf2dda100a116fdcc856ca5231e249f23238ca9d4355618e3a380a8f8
- 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
- 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
Fleshing out collections, automatic serialization of values. Stringify
all keys.
FossilOrigin-Name: 8bb5e27eacd18bc34b60309a03cdce31921f790c821dab89bf12cd9bfc19825d