sbdb/lib/sbdb.rb

26 lines
563 B
Ruby
Raw Normal View History

2010-01-29 23:53:39 +01:00
require 'bdb'
2010-02-02 00:52:25 +01:00
require 'sbdb/environment'
require 'sbdb/db'
require 'sbdb/cursor'
require 'sbdb/transaction'
2010-01-29 23:53:39 +01:00
module SBDB
2010-02-02 00:52:25 +01:00
CREATE = Bdb::DB_CREATE
2010-01-29 23:53:39 +01:00
AUTO_COMMIT = Bdb::DB_AUTO_COMMIT
2010-02-02 18:12:11 +01:00
RDONLY = Bdb::DB_RDONLY
READONLY = RDONLY
2010-01-29 23:53:39 +01:00
2010-02-02 00:52:25 +01:00
def btree( *p) Btree.new *p end
def hash( *p) Hash.new *p end
def recno( *p) Recno.new *p end
def queue( *p) Queue.new *p end
def unknown( *p) Unknown.new *p end
alias open_db unknown
def raise_barrier *ps, &e
e.call *ps
rescue Object
$stderr.puts [$!.class,$!,$!.backtrace].inspect
end
2010-01-29 23:53:39 +01:00
end