2010-01-29 23:53:39 +01:00
|
|
|
require 'bdb'
|
2011-08-25 13:48:26 +02:00
|
|
|
require 'ref'
|
2010-02-02 00:52:25 +01:00
|
|
|
require 'sbdb/environment'
|
|
|
|
require 'sbdb/db'
|
|
|
|
require 'sbdb/cursor'
|
2010-03-11 00:18:38 +01:00
|
|
|
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
|
2010-03-12 20:45:06 +01:00
|
|
|
|
2010-03-21 00:39:45 +01:00
|
|
|
def self.raise_barrier *ps, &e
|
2010-03-12 20:45:06 +01:00
|
|
|
e.call *ps
|
|
|
|
rescue Object
|
|
|
|
$stderr.puts [$!.class,$!,$!.backtrace].inspect
|
|
|
|
end
|
2010-01-29 23:53:39 +01:00
|
|
|
end
|