- 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
15 lines
312 B
Ruby
15 lines
312 B
Ruby
# -*- ruby -*-
|
|
# vim: set nosta noet ts=4 sw=4 ft=ruby:
|
|
# encoding: utf-8
|
|
|
|
$LOAD_PATH.unshift( 'lib' )
|
|
|
|
begin
|
|
require 'mdbx'
|
|
rescue Exception => e
|
|
$stderr.puts "Ack! Libraries failed to load: #{e.message}\n\t" +
|
|
e.backtrace.join( "\n\t" )
|
|
end
|
|
|
|
db = MDBX::Database.open( 'tmp/testdb', max_collections: 100 )
|
|
|