sbdb/lib/sbdb.rb

27 lines
592 B
Ruby
Raw Normal View History

2010-01-29 23:53:39 +01:00
require 'bdb'
require 'ref'
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-03-12 21:14:38 +01:00
def btree( *ps) Btree.new *ps end
def hash( *ps) Hash.new *ps end
def recno( *ps) Recno.new *ps end
def queue( *ps) Queue.new *ps end
def unknown( *ps) Unknown.new *ps end
2010-02-02 00:52:25 +01:00
alias open_db unknown
def self.raise_barrier *ps, &e
e.call *ps
rescue Object
$stderr.puts [$!.class,$!,$!.backtrace].inspect
end
2010-01-29 23:53:39 +01:00
end