Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../lib64/python2..../bsddb
File: dbobj.py
#-------------------------------------------------------------------------
[0] Fix | Delete
# This file contains real Python object wrappers for DB and DBEnv
[1] Fix | Delete
# C "objects" that can be usefully subclassed. The previous SWIG
[2] Fix | Delete
# based interface allowed this thanks to SWIG's shadow classes.
[3] Fix | Delete
# -- Gregory P. Smith
[4] Fix | Delete
#-------------------------------------------------------------------------
[5] Fix | Delete
#
[6] Fix | Delete
# (C) Copyright 2001 Autonomous Zone Industries
[7] Fix | Delete
#
[8] Fix | Delete
# License: This is free software. You may use this software for any
[9] Fix | Delete
# purpose including modification/redistribution, so long as
[10] Fix | Delete
# this header remains intact and that you do not claim any
[11] Fix | Delete
# rights of ownership or authorship of this software. This
[12] Fix | Delete
# software has been tested, but no warranty is expressed or
[13] Fix | Delete
# implied.
[14] Fix | Delete
#
[15] Fix | Delete
[16] Fix | Delete
#
[17] Fix | Delete
# TODO it would be *really nice* to have an automatic shadow class populator
[18] Fix | Delete
# so that new methods don't need to be added here manually after being
[19] Fix | Delete
# added to _bsddb.c.
[20] Fix | Delete
#
[21] Fix | Delete
[22] Fix | Delete
import sys
[23] Fix | Delete
absolute_import = (sys.version_info[0] >= 3)
[24] Fix | Delete
if absolute_import :
[25] Fix | Delete
# Because this syntaxis is not valid before Python 2.5
[26] Fix | Delete
exec("from . import db")
[27] Fix | Delete
else :
[28] Fix | Delete
import db
[29] Fix | Delete
[30] Fix | Delete
if sys.version_info < (2, 6) :
[31] Fix | Delete
from UserDict import DictMixin as MutableMapping
[32] Fix | Delete
else :
[33] Fix | Delete
import collections
[34] Fix | Delete
MutableMapping = collections.MutableMapping
[35] Fix | Delete
[36] Fix | Delete
class DBEnv:
[37] Fix | Delete
def __init__(self, *args, **kwargs):
[38] Fix | Delete
self._cobj = db.DBEnv(*args, **kwargs)
[39] Fix | Delete
[40] Fix | Delete
def close(self, *args, **kwargs):
[41] Fix | Delete
return self._cobj.close(*args, **kwargs)
[42] Fix | Delete
def open(self, *args, **kwargs):
[43] Fix | Delete
return self._cobj.open(*args, **kwargs)
[44] Fix | Delete
def remove(self, *args, **kwargs):
[45] Fix | Delete
return self._cobj.remove(*args, **kwargs)
[46] Fix | Delete
def set_shm_key(self, *args, **kwargs):
[47] Fix | Delete
return self._cobj.set_shm_key(*args, **kwargs)
[48] Fix | Delete
def set_cachesize(self, *args, **kwargs):
[49] Fix | Delete
return self._cobj.set_cachesize(*args, **kwargs)
[50] Fix | Delete
def set_data_dir(self, *args, **kwargs):
[51] Fix | Delete
return self._cobj.set_data_dir(*args, **kwargs)
[52] Fix | Delete
def set_flags(self, *args, **kwargs):
[53] Fix | Delete
return self._cobj.set_flags(*args, **kwargs)
[54] Fix | Delete
def set_lg_bsize(self, *args, **kwargs):
[55] Fix | Delete
return self._cobj.set_lg_bsize(*args, **kwargs)
[56] Fix | Delete
def set_lg_dir(self, *args, **kwargs):
[57] Fix | Delete
return self._cobj.set_lg_dir(*args, **kwargs)
[58] Fix | Delete
def set_lg_max(self, *args, **kwargs):
[59] Fix | Delete
return self._cobj.set_lg_max(*args, **kwargs)
[60] Fix | Delete
def set_lk_detect(self, *args, **kwargs):
[61] Fix | Delete
return self._cobj.set_lk_detect(*args, **kwargs)
[62] Fix | Delete
if db.version() < (4,5):
[63] Fix | Delete
def set_lk_max(self, *args, **kwargs):
[64] Fix | Delete
return self._cobj.set_lk_max(*args, **kwargs)
[65] Fix | Delete
def set_lk_max_locks(self, *args, **kwargs):
[66] Fix | Delete
return self._cobj.set_lk_max_locks(*args, **kwargs)
[67] Fix | Delete
def set_lk_max_lockers(self, *args, **kwargs):
[68] Fix | Delete
return self._cobj.set_lk_max_lockers(*args, **kwargs)
[69] Fix | Delete
def set_lk_max_objects(self, *args, **kwargs):
[70] Fix | Delete
return self._cobj.set_lk_max_objects(*args, **kwargs)
[71] Fix | Delete
def set_mp_mmapsize(self, *args, **kwargs):
[72] Fix | Delete
return self._cobj.set_mp_mmapsize(*args, **kwargs)
[73] Fix | Delete
def set_timeout(self, *args, **kwargs):
[74] Fix | Delete
return self._cobj.set_timeout(*args, **kwargs)
[75] Fix | Delete
def set_tmp_dir(self, *args, **kwargs):
[76] Fix | Delete
return self._cobj.set_tmp_dir(*args, **kwargs)
[77] Fix | Delete
def txn_begin(self, *args, **kwargs):
[78] Fix | Delete
return self._cobj.txn_begin(*args, **kwargs)
[79] Fix | Delete
def txn_checkpoint(self, *args, **kwargs):
[80] Fix | Delete
return self._cobj.txn_checkpoint(*args, **kwargs)
[81] Fix | Delete
def txn_stat(self, *args, **kwargs):
[82] Fix | Delete
return self._cobj.txn_stat(*args, **kwargs)
[83] Fix | Delete
def set_tx_max(self, *args, **kwargs):
[84] Fix | Delete
return self._cobj.set_tx_max(*args, **kwargs)
[85] Fix | Delete
def set_tx_timestamp(self, *args, **kwargs):
[86] Fix | Delete
return self._cobj.set_tx_timestamp(*args, **kwargs)
[87] Fix | Delete
def lock_detect(self, *args, **kwargs):
[88] Fix | Delete
return self._cobj.lock_detect(*args, **kwargs)
[89] Fix | Delete
def lock_get(self, *args, **kwargs):
[90] Fix | Delete
return self._cobj.lock_get(*args, **kwargs)
[91] Fix | Delete
def lock_id(self, *args, **kwargs):
[92] Fix | Delete
return self._cobj.lock_id(*args, **kwargs)
[93] Fix | Delete
def lock_put(self, *args, **kwargs):
[94] Fix | Delete
return self._cobj.lock_put(*args, **kwargs)
[95] Fix | Delete
def lock_stat(self, *args, **kwargs):
[96] Fix | Delete
return self._cobj.lock_stat(*args, **kwargs)
[97] Fix | Delete
def log_archive(self, *args, **kwargs):
[98] Fix | Delete
return self._cobj.log_archive(*args, **kwargs)
[99] Fix | Delete
[100] Fix | Delete
def set_get_returns_none(self, *args, **kwargs):
[101] Fix | Delete
return self._cobj.set_get_returns_none(*args, **kwargs)
[102] Fix | Delete
[103] Fix | Delete
def log_stat(self, *args, **kwargs):
[104] Fix | Delete
return self._cobj.log_stat(*args, **kwargs)
[105] Fix | Delete
[106] Fix | Delete
def dbremove(self, *args, **kwargs):
[107] Fix | Delete
return self._cobj.dbremove(*args, **kwargs)
[108] Fix | Delete
def dbrename(self, *args, **kwargs):
[109] Fix | Delete
return self._cobj.dbrename(*args, **kwargs)
[110] Fix | Delete
def set_encrypt(self, *args, **kwargs):
[111] Fix | Delete
return self._cobj.set_encrypt(*args, **kwargs)
[112] Fix | Delete
[113] Fix | Delete
if db.version() >= (4,4):
[114] Fix | Delete
def fileid_reset(self, *args, **kwargs):
[115] Fix | Delete
return self._cobj.fileid_reset(*args, **kwargs)
[116] Fix | Delete
[117] Fix | Delete
def lsn_reset(self, *args, **kwargs):
[118] Fix | Delete
return self._cobj.lsn_reset(*args, **kwargs)
[119] Fix | Delete
[120] Fix | Delete
[121] Fix | Delete
class DB(MutableMapping):
[122] Fix | Delete
def __init__(self, dbenv, *args, **kwargs):
[123] Fix | Delete
# give it the proper DBEnv C object that its expecting
[124] Fix | Delete
self._cobj = db.DB(*((dbenv._cobj,) + args), **kwargs)
[125] Fix | Delete
[126] Fix | Delete
# TODO are there other dict methods that need to be overridden?
[127] Fix | Delete
def __len__(self):
[128] Fix | Delete
return len(self._cobj)
[129] Fix | Delete
def __getitem__(self, arg):
[130] Fix | Delete
return self._cobj[arg]
[131] Fix | Delete
def __setitem__(self, key, value):
[132] Fix | Delete
self._cobj[key] = value
[133] Fix | Delete
def __delitem__(self, arg):
[134] Fix | Delete
del self._cobj[arg]
[135] Fix | Delete
[136] Fix | Delete
if sys.version_info >= (2, 6) :
[137] Fix | Delete
def __iter__(self) :
[138] Fix | Delete
return self._cobj.__iter__()
[139] Fix | Delete
[140] Fix | Delete
def append(self, *args, **kwargs):
[141] Fix | Delete
return self._cobj.append(*args, **kwargs)
[142] Fix | Delete
def associate(self, *args, **kwargs):
[143] Fix | Delete
return self._cobj.associate(*args, **kwargs)
[144] Fix | Delete
def close(self, *args, **kwargs):
[145] Fix | Delete
return self._cobj.close(*args, **kwargs)
[146] Fix | Delete
def consume(self, *args, **kwargs):
[147] Fix | Delete
return self._cobj.consume(*args, **kwargs)
[148] Fix | Delete
def consume_wait(self, *args, **kwargs):
[149] Fix | Delete
return self._cobj.consume_wait(*args, **kwargs)
[150] Fix | Delete
def cursor(self, *args, **kwargs):
[151] Fix | Delete
return self._cobj.cursor(*args, **kwargs)
[152] Fix | Delete
def delete(self, *args, **kwargs):
[153] Fix | Delete
return self._cobj.delete(*args, **kwargs)
[154] Fix | Delete
def fd(self, *args, **kwargs):
[155] Fix | Delete
return self._cobj.fd(*args, **kwargs)
[156] Fix | Delete
def get(self, *args, **kwargs):
[157] Fix | Delete
return self._cobj.get(*args, **kwargs)
[158] Fix | Delete
def pget(self, *args, **kwargs):
[159] Fix | Delete
return self._cobj.pget(*args, **kwargs)
[160] Fix | Delete
def get_both(self, *args, **kwargs):
[161] Fix | Delete
return self._cobj.get_both(*args, **kwargs)
[162] Fix | Delete
def get_byteswapped(self, *args, **kwargs):
[163] Fix | Delete
return self._cobj.get_byteswapped(*args, **kwargs)
[164] Fix | Delete
def get_size(self, *args, **kwargs):
[165] Fix | Delete
return self._cobj.get_size(*args, **kwargs)
[166] Fix | Delete
def get_type(self, *args, **kwargs):
[167] Fix | Delete
return self._cobj.get_type(*args, **kwargs)
[168] Fix | Delete
def join(self, *args, **kwargs):
[169] Fix | Delete
return self._cobj.join(*args, **kwargs)
[170] Fix | Delete
def key_range(self, *args, **kwargs):
[171] Fix | Delete
return self._cobj.key_range(*args, **kwargs)
[172] Fix | Delete
def has_key(self, *args, **kwargs):
[173] Fix | Delete
return self._cobj.has_key(*args, **kwargs)
[174] Fix | Delete
def items(self, *args, **kwargs):
[175] Fix | Delete
return self._cobj.items(*args, **kwargs)
[176] Fix | Delete
def keys(self, *args, **kwargs):
[177] Fix | Delete
return self._cobj.keys(*args, **kwargs)
[178] Fix | Delete
def open(self, *args, **kwargs):
[179] Fix | Delete
return self._cobj.open(*args, **kwargs)
[180] Fix | Delete
def put(self, *args, **kwargs):
[181] Fix | Delete
return self._cobj.put(*args, **kwargs)
[182] Fix | Delete
def remove(self, *args, **kwargs):
[183] Fix | Delete
return self._cobj.remove(*args, **kwargs)
[184] Fix | Delete
def rename(self, *args, **kwargs):
[185] Fix | Delete
return self._cobj.rename(*args, **kwargs)
[186] Fix | Delete
def set_bt_minkey(self, *args, **kwargs):
[187] Fix | Delete
return self._cobj.set_bt_minkey(*args, **kwargs)
[188] Fix | Delete
def set_bt_compare(self, *args, **kwargs):
[189] Fix | Delete
return self._cobj.set_bt_compare(*args, **kwargs)
[190] Fix | Delete
def set_cachesize(self, *args, **kwargs):
[191] Fix | Delete
return self._cobj.set_cachesize(*args, **kwargs)
[192] Fix | Delete
def set_dup_compare(self, *args, **kwargs) :
[193] Fix | Delete
return self._cobj.set_dup_compare(*args, **kwargs)
[194] Fix | Delete
def set_flags(self, *args, **kwargs):
[195] Fix | Delete
return self._cobj.set_flags(*args, **kwargs)
[196] Fix | Delete
def set_h_ffactor(self, *args, **kwargs):
[197] Fix | Delete
return self._cobj.set_h_ffactor(*args, **kwargs)
[198] Fix | Delete
def set_h_nelem(self, *args, **kwargs):
[199] Fix | Delete
return self._cobj.set_h_nelem(*args, **kwargs)
[200] Fix | Delete
def set_lorder(self, *args, **kwargs):
[201] Fix | Delete
return self._cobj.set_lorder(*args, **kwargs)
[202] Fix | Delete
def set_pagesize(self, *args, **kwargs):
[203] Fix | Delete
return self._cobj.set_pagesize(*args, **kwargs)
[204] Fix | Delete
def set_re_delim(self, *args, **kwargs):
[205] Fix | Delete
return self._cobj.set_re_delim(*args, **kwargs)
[206] Fix | Delete
def set_re_len(self, *args, **kwargs):
[207] Fix | Delete
return self._cobj.set_re_len(*args, **kwargs)
[208] Fix | Delete
def set_re_pad(self, *args, **kwargs):
[209] Fix | Delete
return self._cobj.set_re_pad(*args, **kwargs)
[210] Fix | Delete
def set_re_source(self, *args, **kwargs):
[211] Fix | Delete
return self._cobj.set_re_source(*args, **kwargs)
[212] Fix | Delete
def set_q_extentsize(self, *args, **kwargs):
[213] Fix | Delete
return self._cobj.set_q_extentsize(*args, **kwargs)
[214] Fix | Delete
def stat(self, *args, **kwargs):
[215] Fix | Delete
return self._cobj.stat(*args, **kwargs)
[216] Fix | Delete
def sync(self, *args, **kwargs):
[217] Fix | Delete
return self._cobj.sync(*args, **kwargs)
[218] Fix | Delete
def type(self, *args, **kwargs):
[219] Fix | Delete
return self._cobj.type(*args, **kwargs)
[220] Fix | Delete
def upgrade(self, *args, **kwargs):
[221] Fix | Delete
return self._cobj.upgrade(*args, **kwargs)
[222] Fix | Delete
def values(self, *args, **kwargs):
[223] Fix | Delete
return self._cobj.values(*args, **kwargs)
[224] Fix | Delete
def verify(self, *args, **kwargs):
[225] Fix | Delete
return self._cobj.verify(*args, **kwargs)
[226] Fix | Delete
def set_get_returns_none(self, *args, **kwargs):
[227] Fix | Delete
return self._cobj.set_get_returns_none(*args, **kwargs)
[228] Fix | Delete
[229] Fix | Delete
def set_encrypt(self, *args, **kwargs):
[230] Fix | Delete
return self._cobj.set_encrypt(*args, **kwargs)
[231] Fix | Delete
[232] Fix | Delete
[233] Fix | Delete
class DBSequence:
[234] Fix | Delete
def __init__(self, *args, **kwargs):
[235] Fix | Delete
self._cobj = db.DBSequence(*args, **kwargs)
[236] Fix | Delete
[237] Fix | Delete
def close(self, *args, **kwargs):
[238] Fix | Delete
return self._cobj.close(*args, **kwargs)
[239] Fix | Delete
def get(self, *args, **kwargs):
[240] Fix | Delete
return self._cobj.get(*args, **kwargs)
[241] Fix | Delete
def get_dbp(self, *args, **kwargs):
[242] Fix | Delete
return self._cobj.get_dbp(*args, **kwargs)
[243] Fix | Delete
def get_key(self, *args, **kwargs):
[244] Fix | Delete
return self._cobj.get_key(*args, **kwargs)
[245] Fix | Delete
def init_value(self, *args, **kwargs):
[246] Fix | Delete
return self._cobj.init_value(*args, **kwargs)
[247] Fix | Delete
def open(self, *args, **kwargs):
[248] Fix | Delete
return self._cobj.open(*args, **kwargs)
[249] Fix | Delete
def remove(self, *args, **kwargs):
[250] Fix | Delete
return self._cobj.remove(*args, **kwargs)
[251] Fix | Delete
def stat(self, *args, **kwargs):
[252] Fix | Delete
return self._cobj.stat(*args, **kwargs)
[253] Fix | Delete
def set_cachesize(self, *args, **kwargs):
[254] Fix | Delete
return self._cobj.set_cachesize(*args, **kwargs)
[255] Fix | Delete
def set_flags(self, *args, **kwargs):
[256] Fix | Delete
return self._cobj.set_flags(*args, **kwargs)
[257] Fix | Delete
def set_range(self, *args, **kwargs):
[258] Fix | Delete
return self._cobj.set_range(*args, **kwargs)
[259] Fix | Delete
def get_cachesize(self, *args, **kwargs):
[260] Fix | Delete
return self._cobj.get_cachesize(*args, **kwargs)
[261] Fix | Delete
def get_flags(self, *args, **kwargs):
[262] Fix | Delete
return self._cobj.get_flags(*args, **kwargs)
[263] Fix | Delete
def get_range(self, *args, **kwargs):
[264] Fix | Delete
return self._cobj.get_range(*args, **kwargs)
[265] Fix | Delete
[266] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function