4Suite API Documentation

Module Ft.Rdf.Drivers.BerkeleyDBTxnTable

#A transactional equivalent of bsddb.dbtables
Classes:
Functions:
Globals:
DB_AFTER, DB_AGGRESSIVE, DB_APPEND, DB_ARCH_ABS, DB_ARCH_DATA, DB_ARCH_LOG, DB_AUTO_COMMIT, DB_BEFORE, DB_BTREE, DB_CACHED_COUNTS, DB_CDB_ALLDB, DB_CHECKPOINT, DB_CHKSUM, DB_CONSUME, DB_CONSUME_WAIT, DB_CREATE, DB_CURRENT, DB_DIRECT_DB, DB_DIRECT_LOG, DB_DIRTY_READ, DB_DONOTINDEX, DB_DUP, DB_DUPSORT, DB_ENCRYPT, DB_ENCRYPT_AES, DB_EXCL, DB_EXTENT, DB_FAST_STAT, DB_FCNTL_LOCKING, DB_FIRST, DB_FLUSH, DB_FORCE, DB_GET_BOTH, DB_GET_RECNO, DB_HASH, DB_INCOMPLETE, DB_INIT_CDB, DB_INIT_LOCK, DB_INIT_LOG, DB_INIT_MPOOL, DB_INIT_REP, DB_INIT_TXN, DB_JOINENV, DB_JOIN_ITEM, DB_JOIN_NOSORT, DB_KEYEMPTY, DB_KEYEXIST, DB_KEYFIRST, DB_KEYLAST, DB_LAST, DB_LOCKDOWN, DB_LOCK_CONFLICT, DB_LOCK_DEADLOCK, DB_LOCK_DEFAULT, DB_LOCK_DIRTY, DB_LOCK_DUMP, DB_LOCK_GET, DB_LOCK_INHERIT, DB_LOCK_IREAD, DB_LOCK_IWR, DB_LOCK_IWRITE, DB_LOCK_MAXLOCKS, DB_LOCK_MINLOCKS, DB_LOCK_MINWRITE, DB_LOCK_NG, DB_LOCK_NORUN, DB_LOCK_NOTGRANTED, DB_LOCK_NOWAIT, DB_LOCK_OLDEST, DB_LOCK_PUT, DB_LOCK_PUT_ALL, DB_LOCK_PUT_OBJ, DB_LOCK_RANDOM, DB_LOCK_READ, DB_LOCK_RECORD, DB_LOCK_SWITCH, DB_LOCK_UPGRADE, DB_LOCK_UPGRADE_WRITE, DB_LOCK_WAIT, DB_LOCK_WRITE, DB_LOCK_WWRITE, DB_LOCK_YOUNGEST, DB_LOG_AUTOREMOVE, DB_LSTAT_ABORTED, DB_LSTAT_ERR, DB_LSTAT_FREE, DB_LSTAT_HELD, DB_LSTAT_PENDING, DB_LSTAT_WAITING, DB_MAX_PAGES, DB_MAX_RECORDS, DB_MULTIPLE, DB_MULTIPLE_KEY, DB_NEXT, DB_NEXT_DUP, DB_NEXT_NODUP, DB_NODUPDATA, DB_NOLOCKING, DB_NOMMAP, DB_NOORDERCHK, DB_NOOVERWRITE, DB_NOPANIC, DB_NOSERVER, DB_NOSERVER_HOME, DB_NOSERVER_ID, DB_NOSYNC, DB_NOTFOUND, DB_ODDFILESIZE, DB_OLD_VERSION, DB_OPFLAGS_MASK, DB_ORDERCHKONLY, DB_PAGE_NOTFOUND, DB_PANIC_ENVIRONMENT, DB_POSITION, DB_PREV, DB_PREV_NODUP, DB_PRIVATE, DB_PR_PAGE, DB_PR_RECOVERYTEST, DB_QUEUE, DB_RDONLY, DB_RDWRMASTER, DB_RECNO, DB_RECNUM, DB_RECORDCOUNT, DB_RECOVER, DB_RECOVER_FATAL, DB_REGION_INIT, DB_RENUMBER, DB_REVSPLITOFF, DB_RMW, DB_RPCCLIENT, DB_RUNRECOVERY, DB_SALVAGE, DB_SECONDARY_BAD, DB_SET, DB_SET_LOCK_TIMEOUT, DB_SET_RANGE, DB_SET_RECNO, DB_SET_TXN_TIMEOUT, DB_SNAPSHOT, DB_STAT_CLEAR, DB_SYSTEM_MEM, DB_THREAD, DB_TIME_NOTGRANTED, DB_TRUNCATE, DB_TXN_NOSYNC, DB_TXN_NOT_DURABLE, DB_TXN_NOWAIT, DB_TXN_SYNC, DB_TXN_WRITE_NOSYNC, DB_UNKNOWN, DB_UPGRADE, DB_USE_ENVIRON, DB_USE_ENVIRON_ROOT, DB_VERIFY, DB_VERIFY_BAD, DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH, DB_VERSION_STRING, DB_WRITECURSOR, DB_XA_CREATE, DB_YIELDCPU, EACCES, EAGAIN, EBUSY, EEXIST, EINVAL, ENOENT, ENOMEM, ENOSPC, EPERM, cvsid

Classes

class Cond
This condition matches everything

Methods

__call__(self, s)
class DBAccessError(bsddb._db.DBError)

Methods inherited from class Exception

__getitem__, __init__, __str__
class DBAgainError(bsddb._db.DBError)

Methods inherited from class Exception

__getitem__, __init__, __str__
class DBBusyError(bsddb._db.DBError)

Methods inherited from class Exception

__getitem__, __init__, __str__
class DBError(Exception)

Methods inherited from class Exception

__getitem__, __init__, __str__
class DBFileExistsError(bsddb._db.DBError)

Methods inherited from class Exception

__getitem__, __init__, __str__
class DBInvalidArgError(bsddb._db.DBError)

Methods inherited from class Exception

__getitem__, __init__, __str__
class DBKeyEmptyError(bsddb._db.DBError)

Methods inherited from class Exception

__getitem__, __init__, __str__
class DBKeyExistError(bsddb._db.DBError)

Methods inherited from class Exception

__getitem__, __init__, __str__
class DBLockDeadlockError(bsddb._db.DBError)

Methods inherited from class Exception

__getitem__, __init__, __str__
class DBLockNotGrantedError(bsddb._db.DBError)

Methods inherited from class Exception

__getitem__, __init__, __str__
class DBNoMemoryError(bsddb._db.DBError)

Methods inherited from class Exception

__getitem__, __init__, __str__
class DBNoServerError(bsddb._db.DBError)

Methods inherited from class Exception

__getitem__, __init__, __str__
class DBNoServerHomeError(bsddb._db.DBError)

Methods inherited from class Exception

__getitem__, __init__, __str__
class DBNoServerIDError(bsddb._db.DBError)

Methods inherited from class Exception

__getitem__, __init__, __str__
class DBNoSpaceError(bsddb._db.DBError)

Methods inherited from class Exception

__getitem__, __init__, __str__
class DBNoSuchFileError(bsddb._db.DBError)

Methods inherited from class Exception

__getitem__, __init__, __str__
class DBOldVersionError(bsddb._db.DBError)

Methods inherited from class Exception

__getitem__, __init__, __str__
class DBPageNotFoundError(bsddb._db.DBError)

Methods inherited from class Exception

__getitem__, __init__, __str__
class DBPermissionsError(bsddb._db.DBError)

Methods inherited from class Exception

__getitem__, __init__, __str__
class DBRunRecoveryError(bsddb._db.DBError)

Methods inherited from class Exception

__getitem__, __init__, __str__
class DBSecondaryBadError(bsddb._db.DBError)

Methods inherited from class Exception

__getitem__, __init__, __str__
class DBVerifyBadError(bsddb._db.DBError)

Methods inherited from class Exception

__getitem__, __init__, __str__
class ExactCond(Cond)
Acts as an exact match condition function

Methods

__call__(self, s)
Overrides: __call__ from class Cond
__init__(self, strtomatch)
class LikeCond(Cond)
Acts as a function that will match using an SQL 'LIKE' style string. Case insensitive and % signs are wild cards. This isn't perfect but it should work for the simple common cases.

Methods

__call__(self, s)
Overrides: __call__ from class Cond
__init__(self, likestr, re_flags=2)
class PostfixCond(Cond)
Acts as a condition function for matching a string postfix

Methods

__call__(self, s)
Overrides: __call__ from class Cond
__init__(self, postfix)
class PrefixCond(Cond)
Acts as a condition function for matching a string prefix

Methods

__call__(self, s)
Overrides: __call__ from class Cond
__init__(self, prefix)
class TableAlreadyExists(TableDBError)

Methods inherited from class Exception

__getitem__, __init__, __str__
class TableDBError(StandardError)

Methods inherited from class Exception

__getitem__, __init__, __str__
class bsdTableDB

Methods

CreateTable(self, table, columns)
CreateTable(table, columns) - Create a new table in the database raises TableDBError if it already exists or for other DB errors.
Delete(self, table, conditions={})
Delete(table, conditions) - Delete items matching the given conditions from the table. * conditions is a dictionary keyed on column names containing condition functions expecting the data string as an argument and returning a boolean.
Insert(self, table, rowdict)
Insert(table, datadict) - Insert a new row into the table using the keys+values from rowdict as the column values.
Select(self, table, columns, conditions={})
Select(table, conditions) - retrieve specific row data Returns a list of row column->value mapping dictionaries. * columns is a list of which column data to return. If columns is None, all columns will be returned. * conditions is a dictionary keyed on column names containing callable conditions expecting the data string as an argument and returning a boolean.
__del__(self)
__init__(self, filename, dbhome, create=0, truncate=0, mode=384, recover=0, dbflags=0)
bsdTableDB.open(filename, dbhome, create=0, truncate=0, mode=0600) Open database name in the dbhome BerkeleyDB directory. Use keyword arguments when calling this constructor.
checkpoint(self, mins=0)
close(self)
sync(self)

Functions

DB(...)
DBEnv(...)
contains_metastrings(s)
Verify that the given string does not contain any metadata strings that might interfere with dbtables database operation.
version(...)
Returns a tuple of major, minor, and patch release numbers of the underlying DB library.

Globals

DB_AFTER = 1
DB_AGGRESSIVE = 1
DB_APPEND = 2
DB_ARCH_ABS = 1
DB_ARCH_DATA = 2
DB_ARCH_LOG = 4
DB_AUTO_COMMIT = 16777216
DB_BEFORE = 3
DB_BTREE = 1
DB_CACHED_COUNTS = 4
DB_CDB_ALLDB = 4096
DB_CHECKPOINT = 0
DB_CHKSUM = 1
DB_CONSUME = 5
DB_CONSUME_WAIT = 6
DB_CREATE = 1
DB_CURRENT = 7
DB_DIRECT_DB = 8192
DB_DIRECT_LOG = 16384
DB_DIRTY_READ = 33554432
DB_DONOTINDEX = -30999
DB_DUP = 2
DB_DUPSORT = 4
DB_ENCRYPT = 8
DB_ENCRYPT_AES = 1
DB_EXCL = 4096
DB_EXTENT = 8192
DB_FAST_STAT = 8
DB_FCNTL_LOCKING = 8192
DB_FIRST = 9
DB_FLUSH = 1
DB_FORCE = 4
DB_GET_BOTH = 10
DB_GET_RECNO = 13
DB_HASH = 2
DB_INCOMPLETE = 0
DB_INIT_CDB = 4096
DB_INIT_LOCK = 8192
DB_INIT_LOG = 16384
DB_INIT_MPOOL = 32768
DB_INIT_REP = 65536
DB_INIT_TXN = 131072
DB_JOINENV = 262144
DB_JOIN_ITEM = 14
DB_JOIN_NOSORT = 1
DB_KEYEMPTY = -30997
DB_KEYEXIST = -30996
DB_KEYFIRST = 15
DB_KEYLAST = 16
DB_LAST = 17
DB_LOCKDOWN = 524288
DB_LOCK_CONFLICT = 0
DB_LOCK_DEADLOCK = -30995
DB_LOCK_DEFAULT = 1
DB_LOCK_DIRTY = 7
DB_LOCK_DUMP = 0
DB_LOCK_GET = 1
DB_LOCK_INHERIT = 3
DB_LOCK_IREAD = 5
DB_LOCK_IWR = 6
DB_LOCK_IWRITE = 4
DB_LOCK_MAXLOCKS = 3
DB_LOCK_MINLOCKS = 4
DB_LOCK_MINWRITE = 5
DB_LOCK_NG = 0
DB_LOCK_NORUN = 0
DB_LOCK_NOTGRANTED = -30994
DB_LOCK_NOWAIT = 1
DB_LOCK_OLDEST = 6
DB_LOCK_PUT = 4
DB_LOCK_PUT_ALL = 5
DB_LOCK_PUT_OBJ = 6
DB_LOCK_RANDOM = 7
DB_LOCK_READ = 1
DB_LOCK_RECORD = 2
DB_LOCK_SWITCH = 16
DB_LOCK_UPGRADE = 32
DB_LOCK_UPGRADE_WRITE = 10
DB_LOCK_WAIT = 3
DB_LOCK_WRITE = 2
DB_LOCK_WWRITE = 8
DB_LOCK_YOUNGEST = 8
DB_LOG_AUTOREMOVE = 32768
DB_LSTAT_ABORTED = 1
DB_LSTAT_ERR = 2
DB_LSTAT_FREE = 4
DB_LSTAT_HELD = 5
DB_LSTAT_PENDING = 7
DB_LSTAT_WAITING = 8
DB_MAX_PAGES = -1
DB_MAX_RECORDS = -1
DB_MULTIPLE = 67108864
DB_MULTIPLE_KEY = 134217728
DB_NEXT = 18
DB_NEXT_DUP = 19
DB_NEXT_NODUP = 20
DB_NODUPDATA = 21
DB_NOLOCKING = 65536
DB_NOMMAP = 8
DB_NOORDERCHK = 2
DB_NOOVERWRITE = 22
DB_NOPANIC = 131072
DB_NOSERVER = -30993
DB_NOSERVER_HOME = -30992
DB_NOSERVER_ID = -30991
DB_NOSYNC = 23
DB_NOTFOUND = -30990
DB_ODDFILESIZE = 16384
DB_OLD_VERSION = -30989
DB_OPFLAGS_MASK = 255
DB_ORDERCHKONLY = 4
DB_PAGE_NOTFOUND = -30988
DB_PANIC_ENVIRONMENT = 524288
DB_POSITION = 24
DB_PREV = 25
DB_PREV_NODUP = 26
DB_PRIVATE = 1048576
DB_PR_PAGE = 8
DB_PR_RECOVERYTEST = 16
DB_QUEUE = 4
DB_RDONLY = 16
DB_RDWRMASTER = 16384
DB_RECNO = 3
DB_RECNUM = 16
DB_RECORDCOUNT = 27
DB_RECOVER = 32
DB_RECOVER_FATAL = 2097152
DB_REGION_INIT = 1048576
DB_RENUMBER = 32
DB_REVSPLITOFF = 64
DB_RMW = 268435456
DB_RPCCLIENT = 1
DB_RUNRECOVERY = -30978
DB_SALVAGE = 64
DB_SECONDARY_BAD = -30977
DB_SET = 28
DB_SET_LOCK_TIMEOUT = 29
DB_SET_RANGE = 30
DB_SET_RECNO = 31
DB_SET_TXN_TIMEOUT = 33
DB_SNAPSHOT = 128
DB_STAT_CLEAR = 1
DB_SYSTEM_MEM = 4194304
DB_THREAD = 64
DB_TIME_NOTGRANTED = 2097152
DB_TRUNCATE = 128
DB_TXN_NOSYNC = 256
DB_TXN_NOT_DURABLE = 512
DB_TXN_NOWAIT = 4096
DB_TXN_SYNC = 8192
DB_TXN_WRITE_NOSYNC = 4194304
DB_UNKNOWN = 5
DB_UPGRADE = 1
DB_USE_ENVIRON = 1024
DB_USE_ENVIRON_ROOT = 2048
DB_VERIFY = 2
DB_VERIFY_BAD = -30976
DB_VERSION_MAJOR = 4
DB_VERSION_MINOR = 2
DB_VERSION_PATCH = 52
DB_VERSION_STRING = 'Sleepycat Software: Berkeley DB 4.2.52: (December 3, 2003)'
DB_WRITECURSOR = 35
DB_XA_CREATE = 2
DB_YIELDCPU = 8388608
EACCES = 13
EAGAIN = 11
EBUSY = 16
EEXIST = 17
EINVAL = 22
ENOENT = 2
ENOMEM = 12
ENOSPC = 28
EPERM = 1
cvsid = '$Id: _bsddb.c,v 1.17.6.8 2004/12/19 23:59:51 greg Exp $'