Mercurial > cpython-lru_cache-weakref
annotate Lib/bsddb/dbobj.py @ 58925:eecf1bef052d 2.6
Merged revisions 78207 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78207 | ezio.melotti | 2010-02-17 01:26:09 +0200 (Wed, 17 Feb 2010) | 1 line
#7930: fix stripid
........
| author | Ezio Melotti <ezio.melotti@gmail.com> |
|---|---|
| date | Tue, 16 Feb 2010 23:29:44 +0000 |
| parents | 10f41adc0d24 |
| children | 4c0b37d869ca |
| rev | line source |
|---|---|
|
26280
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
1 #------------------------------------------------------------------------- |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
2 # This file contains real Python object wrappers for DB and DBEnv |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
3 # C "objects" that can be usefully subclassed. The previous SWIG |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
4 # based interface allowed this thanks to SWIG's shadow classes. |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
5 # -- Gregory P. Smith |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
6 #------------------------------------------------------------------------- |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
7 # |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
8 # (C) Copyright 2001 Autonomous Zone Industries |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
9 # |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
10 # License: This is free software. You may use this software for any |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
11 # purpose including modification/redistribution, so long as |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
12 # this header remains intact and that you do not claim any |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
13 # rights of ownership or authorship of this software. This |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
14 # software has been tested, but no warranty is expressed or |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
15 # implied. |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
16 # |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
17 |
| 29789 | 18 # |
| 19 # TODO it would be *really nice* to have an automatic shadow class populator | |
| 20 # so that new methods don't need to be added here manually after being | |
| 21 # added to _bsddb.c. | |
| 22 # | |
| 23 | |
|
48054
10f41adc0d24
bsddb module updated to version 4.7.2devel9.
Jesus Cea <jcea@jcea.es>
parents:
40544
diff
changeset
|
24 import sys |
|
10f41adc0d24
bsddb module updated to version 4.7.2devel9.
Jesus Cea <jcea@jcea.es>
parents:
40544
diff
changeset
|
25 absolute_import = (sys.version_info[0] >= 3) |
|
10f41adc0d24
bsddb module updated to version 4.7.2devel9.
Jesus Cea <jcea@jcea.es>
parents:
40544
diff
changeset
|
26 if absolute_import : |
|
10f41adc0d24
bsddb module updated to version 4.7.2devel9.
Jesus Cea <jcea@jcea.es>
parents:
40544
diff
changeset
|
27 # Because this syntaxis is not valid before Python 2.5 |
|
10f41adc0d24
bsddb module updated to version 4.7.2devel9.
Jesus Cea <jcea@jcea.es>
parents:
40544
diff
changeset
|
28 exec("from . import db") |
|
10f41adc0d24
bsddb module updated to version 4.7.2devel9.
Jesus Cea <jcea@jcea.es>
parents:
40544
diff
changeset
|
29 else : |
|
10f41adc0d24
bsddb module updated to version 4.7.2devel9.
Jesus Cea <jcea@jcea.es>
parents:
40544
diff
changeset
|
30 import db |
|
27764
a036a5197610
Fix compatibility for earlier versions of Python (than 2.3), which
Barry Warsaw <barry@python.org>
parents:
27690
diff
changeset
|
31 |
|
48054
10f41adc0d24
bsddb module updated to version 4.7.2devel9.
Jesus Cea <jcea@jcea.es>
parents:
40544
diff
changeset
|
32 if sys.version_info[0:2] <= (2, 5) : |
|
10f41adc0d24
bsddb module updated to version 4.7.2devel9.
Jesus Cea <jcea@jcea.es>
parents:
40544
diff
changeset
|
33 try: |
|
10f41adc0d24
bsddb module updated to version 4.7.2devel9.
Jesus Cea <jcea@jcea.es>
parents:
40544
diff
changeset
|
34 from UserDict import DictMixin |
|
10f41adc0d24
bsddb module updated to version 4.7.2devel9.
Jesus Cea <jcea@jcea.es>
parents:
40544
diff
changeset
|
35 except ImportError: |
|
10f41adc0d24
bsddb module updated to version 4.7.2devel9.
Jesus Cea <jcea@jcea.es>
parents:
40544
diff
changeset
|
36 # DictMixin is new in Python 2.3 |
|
10f41adc0d24
bsddb module updated to version 4.7.2devel9.
Jesus Cea <jcea@jcea.es>
parents:
40544
diff
changeset
|
37 class DictMixin: pass |
|
10f41adc0d24
bsddb module updated to version 4.7.2devel9.
Jesus Cea <jcea@jcea.es>
parents:
40544
diff
changeset
|
38 MutableMapping = DictMixin |
|
10f41adc0d24
bsddb module updated to version 4.7.2devel9.
Jesus Cea <jcea@jcea.es>
parents:
40544
diff
changeset
|
39 else : |
|
10f41adc0d24
bsddb module updated to version 4.7.2devel9.
Jesus Cea <jcea@jcea.es>
parents:
40544
diff
changeset
|
40 import collections |
|
10f41adc0d24
bsddb module updated to version 4.7.2devel9.
Jesus Cea <jcea@jcea.es>
parents:
40544
diff
changeset
|
41 MutableMapping = collections.MutableMapping |
|
26280
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
42 |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
43 class DBEnv: |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
44 def __init__(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
45 self._cobj = apply(db.DBEnv, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
46 |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
47 def close(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
48 return apply(self._cobj.close, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
49 def open(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
50 return apply(self._cobj.open, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
51 def remove(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
52 return apply(self._cobj.remove, args, kwargs) |
|
30227
c30ed13d3582
Support DBEnv.set_shm_key() to allow multi-threaded multi-process
Gregory P. Smith <greg@mad-scientist.com>
parents:
29789
diff
changeset
|
53 def set_shm_key(self, *args, **kwargs): |
|
c30ed13d3582
Support DBEnv.set_shm_key() to allow multi-threaded multi-process
Gregory P. Smith <greg@mad-scientist.com>
parents:
29789
diff
changeset
|
54 return apply(self._cobj.set_shm_key, args, kwargs) |
|
26280
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
55 def set_cachesize(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
56 return apply(self._cobj.set_cachesize, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
57 def set_data_dir(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
58 return apply(self._cobj.set_data_dir, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
59 def set_flags(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
60 return apply(self._cobj.set_flags, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
61 def set_lg_bsize(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
62 return apply(self._cobj.set_lg_bsize, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
63 def set_lg_dir(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
64 return apply(self._cobj.set_lg_dir, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
65 def set_lg_max(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
66 return apply(self._cobj.set_lg_max, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
67 def set_lk_detect(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
68 return apply(self._cobj.set_lk_detect, args, kwargs) |
|
40544
f9b27820798b
Support linking of the bsddb module against BerkeleyDB 4.5.x
Gregory P. Smith <greg@mad-scientist.com>
parents:
38609
diff
changeset
|
69 if db.version() < (4,5): |
|
f9b27820798b
Support linking of the bsddb module against BerkeleyDB 4.5.x
Gregory P. Smith <greg@mad-scientist.com>
parents:
38609
diff
changeset
|
70 def set_lk_max(self, *args, **kwargs): |
|
f9b27820798b
Support linking of the bsddb module against BerkeleyDB 4.5.x
Gregory P. Smith <greg@mad-scientist.com>
parents:
38609
diff
changeset
|
71 return apply(self._cobj.set_lk_max, args, kwargs) |
|
26280
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
72 def set_lk_max_locks(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
73 return apply(self._cobj.set_lk_max_locks, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
74 def set_lk_max_lockers(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
75 return apply(self._cobj.set_lk_max_lockers, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
76 def set_lk_max_objects(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
77 return apply(self._cobj.set_lk_max_objects, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
78 def set_mp_mmapsize(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
79 return apply(self._cobj.set_mp_mmapsize, args, kwargs) |
| 29789 | 80 def set_timeout(self, *args, **kwargs): |
| 81 return apply(self._cobj.set_timeout, args, kwargs) | |
|
26280
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
82 def set_tmp_dir(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
83 return apply(self._cobj.set_tmp_dir, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
84 def txn_begin(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
85 return apply(self._cobj.txn_begin, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
86 def txn_checkpoint(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
87 return apply(self._cobj.txn_checkpoint, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
88 def txn_stat(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
89 return apply(self._cobj.txn_stat, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
90 def set_tx_max(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
91 return apply(self._cobj.set_tx_max, args, kwargs) |
|
36417
f0ada6f0f678
Add wrapper for DBEnv.set_tx_timeout method to allow time based DB_RECOVER
Gregory P. Smith <greg@mad-scientist.com>
parents:
34999
diff
changeset
|
92 def set_tx_timestamp(self, *args, **kwargs): |
|
f0ada6f0f678
Add wrapper for DBEnv.set_tx_timeout method to allow time based DB_RECOVER
Gregory P. Smith <greg@mad-scientist.com>
parents:
34999
diff
changeset
|
93 return apply(self._cobj.set_tx_timestamp, args, kwargs) |
|
26280
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
94 def lock_detect(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
95 return apply(self._cobj.lock_detect, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
96 def lock_get(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
97 return apply(self._cobj.lock_get, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
98 def lock_id(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
99 return apply(self._cobj.lock_id, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
100 def lock_put(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
101 return apply(self._cobj.lock_put, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
102 def lock_stat(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
103 return apply(self._cobj.lock_stat, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
104 def log_archive(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
105 return apply(self._cobj.log_archive, args, kwargs) |
|
38604
a4b58ab65202
* support DBEnv.lsn_reset() method on BerkeleyDB >= 4.4 [patch #1494902]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38602
diff
changeset
|
106 |
|
a4b58ab65202
* support DBEnv.lsn_reset() method on BerkeleyDB >= 4.4 [patch #1494902]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38602
diff
changeset
|
107 def set_get_returns_none(self, *args, **kwargs): |
|
a4b58ab65202
* support DBEnv.lsn_reset() method on BerkeleyDB >= 4.4 [patch #1494902]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38602
diff
changeset
|
108 return apply(self._cobj.set_get_returns_none, args, kwargs) |
|
a4b58ab65202
* support DBEnv.lsn_reset() method on BerkeleyDB >= 4.4 [patch #1494902]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38602
diff
changeset
|
109 |
|
48054
10f41adc0d24
bsddb module updated to version 4.7.2devel9.
Jesus Cea <jcea@jcea.es>
parents:
40544
diff
changeset
|
110 def log_stat(self, *args, **kwargs): |
|
10f41adc0d24
bsddb module updated to version 4.7.2devel9.
Jesus Cea <jcea@jcea.es>
parents:
40544
diff
changeset
|
111 return apply(self._cobj.log_stat, args, kwargs) |
|
26280
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
112 |
|
26878
c249607ef535
Port BerkeleyDB 4.1 support from the pybsddb project. bsddb is now at
Barry Warsaw <barry@python.org>
parents:
26387
diff
changeset
|
113 if db.version() >= (4,1): |
|
c249607ef535
Port BerkeleyDB 4.1 support from the pybsddb project. bsddb is now at
Barry Warsaw <barry@python.org>
parents:
26387
diff
changeset
|
114 def dbremove(self, *args, **kwargs): |
|
c249607ef535
Port BerkeleyDB 4.1 support from the pybsddb project. bsddb is now at
Barry Warsaw <barry@python.org>
parents:
26387
diff
changeset
|
115 return apply(self._cobj.dbremove, args, kwargs) |
|
c249607ef535
Port BerkeleyDB 4.1 support from the pybsddb project. bsddb is now at
Barry Warsaw <barry@python.org>
parents:
26387
diff
changeset
|
116 def dbrename(self, *args, **kwargs): |
|
c249607ef535
Port BerkeleyDB 4.1 support from the pybsddb project. bsddb is now at
Barry Warsaw <barry@python.org>
parents:
26387
diff
changeset
|
117 return apply(self._cobj.dbrename, args, kwargs) |
|
c249607ef535
Port BerkeleyDB 4.1 support from the pybsddb project. bsddb is now at
Barry Warsaw <barry@python.org>
parents:
26387
diff
changeset
|
118 def set_encrypt(self, *args, **kwargs): |
|
c249607ef535
Port BerkeleyDB 4.1 support from the pybsddb project. bsddb is now at
Barry Warsaw <barry@python.org>
parents:
26387
diff
changeset
|
119 return apply(self._cobj.set_encrypt, args, kwargs) |
|
c249607ef535
Port BerkeleyDB 4.1 support from the pybsddb project. bsddb is now at
Barry Warsaw <barry@python.org>
parents:
26387
diff
changeset
|
120 |
|
38604
a4b58ab65202
* support DBEnv.lsn_reset() method on BerkeleyDB >= 4.4 [patch #1494902]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38602
diff
changeset
|
121 if db.version() >= (4,4): |
|
38609
2177aecd91fc
Whitespace normalization.
Tim Peters <tim.peters@gmail.com>
parents:
38607
diff
changeset
|
122 def lsn_reset(self, *args, **kwargs): |
|
2177aecd91fc
Whitespace normalization.
Tim Peters <tim.peters@gmail.com>
parents:
38607
diff
changeset
|
123 return apply(self._cobj.lsn_reset, args, kwargs) |
|
38604
a4b58ab65202
* support DBEnv.lsn_reset() method on BerkeleyDB >= 4.4 [patch #1494902]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38602
diff
changeset
|
124 |
|
26280
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
125 |
|
48054
10f41adc0d24
bsddb module updated to version 4.7.2devel9.
Jesus Cea <jcea@jcea.es>
parents:
40544
diff
changeset
|
126 class DB(MutableMapping): |
|
26280
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
127 def __init__(self, dbenv, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
128 # give it the proper DBEnv C object that its expecting |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
129 self._cobj = apply(db.DB, (dbenv._cobj,) + args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
130 |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
131 # TODO are there other dict methods that need to be overridden? |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
132 def __len__(self): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
133 return len(self._cobj) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
134 def __getitem__(self, arg): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
135 return self._cobj[arg] |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
136 def __setitem__(self, key, value): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
137 self._cobj[key] = value |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
138 def __delitem__(self, arg): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
139 del self._cobj[arg] |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
140 |
|
48054
10f41adc0d24
bsddb module updated to version 4.7.2devel9.
Jesus Cea <jcea@jcea.es>
parents:
40544
diff
changeset
|
141 if sys.version_info[0:2] >= (2, 6) : |
|
10f41adc0d24
bsddb module updated to version 4.7.2devel9.
Jesus Cea <jcea@jcea.es>
parents:
40544
diff
changeset
|
142 def __iter__(self) : |
|
10f41adc0d24
bsddb module updated to version 4.7.2devel9.
Jesus Cea <jcea@jcea.es>
parents:
40544
diff
changeset
|
143 return self._cobj.__iter__() |
|
10f41adc0d24
bsddb module updated to version 4.7.2devel9.
Jesus Cea <jcea@jcea.es>
parents:
40544
diff
changeset
|
144 |
|
26280
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
145 def append(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
146 return apply(self._cobj.append, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
147 def associate(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
148 return apply(self._cobj.associate, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
149 def close(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
150 return apply(self._cobj.close, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
151 def consume(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
152 return apply(self._cobj.consume, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
153 def consume_wait(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
154 return apply(self._cobj.consume_wait, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
155 def cursor(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
156 return apply(self._cobj.cursor, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
157 def delete(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
158 return apply(self._cobj.delete, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
159 def fd(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
160 return apply(self._cobj.fd, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
161 def get(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
162 return apply(self._cobj.get, args, kwargs) |
|
32431
c7d2b24eeff9
Adds support for DB.pget and DBCursor.pget methods.
Gregory P. Smith <greg@mad-scientist.com>
parents:
30227
diff
changeset
|
163 def pget(self, *args, **kwargs): |
|
c7d2b24eeff9
Adds support for DB.pget and DBCursor.pget methods.
Gregory P. Smith <greg@mad-scientist.com>
parents:
30227
diff
changeset
|
164 return apply(self._cobj.pget, args, kwargs) |
|
26280
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
165 def get_both(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
166 return apply(self._cobj.get_both, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
167 def get_byteswapped(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
168 return apply(self._cobj.get_byteswapped, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
169 def get_size(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
170 return apply(self._cobj.get_size, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
171 def get_type(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
172 return apply(self._cobj.get_type, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
173 def join(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
174 return apply(self._cobj.join, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
175 def key_range(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
176 return apply(self._cobj.key_range, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
177 def has_key(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
178 return apply(self._cobj.has_key, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
179 def items(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
180 return apply(self._cobj.items, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
181 def keys(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
182 return apply(self._cobj.keys, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
183 def open(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
184 return apply(self._cobj.open, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
185 def put(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
186 return apply(self._cobj.put, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
187 def remove(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
188 return apply(self._cobj.remove, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
189 def rename(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
190 return apply(self._cobj.rename, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
191 def set_bt_minkey(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
192 return apply(self._cobj.set_bt_minkey, args, kwargs) |
|
34999
fcd2c3847869
pybsddb 4.3.1, adds support for DB.set_bt_compare database btree comparison
Gregory P. Smith <greg@mad-scientist.com>
parents:
32431
diff
changeset
|
193 def set_bt_compare(self, *args, **kwargs): |
|
fcd2c3847869
pybsddb 4.3.1, adds support for DB.set_bt_compare database btree comparison
Gregory P. Smith <greg@mad-scientist.com>
parents:
32431
diff
changeset
|
194 return apply(self._cobj.set_bt_compare, args, kwargs) |
|
26280
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
195 def set_cachesize(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
196 return apply(self._cobj.set_cachesize, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
197 def set_flags(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
198 return apply(self._cobj.set_flags, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
199 def set_h_ffactor(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
200 return apply(self._cobj.set_h_ffactor, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
201 def set_h_nelem(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
202 return apply(self._cobj.set_h_nelem, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
203 def set_lorder(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
204 return apply(self._cobj.set_lorder, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
205 def set_pagesize(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
206 return apply(self._cobj.set_pagesize, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
207 def set_re_delim(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
208 return apply(self._cobj.set_re_delim, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
209 def set_re_len(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
210 return apply(self._cobj.set_re_len, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
211 def set_re_pad(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
212 return apply(self._cobj.set_re_pad, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
213 def set_re_source(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
214 return apply(self._cobj.set_re_source, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
215 def set_q_extentsize(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
216 return apply(self._cobj.set_q_extentsize, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
217 def stat(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
218 return apply(self._cobj.stat, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
219 def sync(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
220 return apply(self._cobj.sync, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
221 def type(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
222 return apply(self._cobj.type, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
223 def upgrade(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
224 return apply(self._cobj.upgrade, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
225 def values(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
226 return apply(self._cobj.values, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
227 def verify(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
228 return apply(self._cobj.verify, args, kwargs) |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
229 def set_get_returns_none(self, *args, **kwargs): |
|
875140d30e17
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
Martin v. Löwis <martin@v.loewis.de>
parents:
diff
changeset
|
230 return apply(self._cobj.set_get_returns_none, args, kwargs) |
|
26878
c249607ef535
Port BerkeleyDB 4.1 support from the pybsddb project. bsddb is now at
Barry Warsaw <barry@python.org>
parents:
26387
diff
changeset
|
231 |
|
c249607ef535
Port BerkeleyDB 4.1 support from the pybsddb project. bsddb is now at
Barry Warsaw <barry@python.org>
parents:
26387
diff
changeset
|
232 if db.version() >= (4,1): |
|
c249607ef535
Port BerkeleyDB 4.1 support from the pybsddb project. bsddb is now at
Barry Warsaw <barry@python.org>
parents:
26387
diff
changeset
|
233 def set_encrypt(self, *args, **kwargs): |
|
c249607ef535
Port BerkeleyDB 4.1 support from the pybsddb project. bsddb is now at
Barry Warsaw <barry@python.org>
parents:
26387
diff
changeset
|
234 return apply(self._cobj.set_encrypt, args, kwargs) |
|
38607
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
235 |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
236 |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
237 class DBSequence: |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
238 def __init__(self, *args, **kwargs): |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
239 self._cobj = apply(db.DBSequence, args, kwargs) |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
240 |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
241 def close(self, *args, **kwargs): |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
242 return apply(self._cobj.close, args, kwargs) |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
243 def get(self, *args, **kwargs): |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
244 return apply(self._cobj.get, args, kwargs) |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
245 def get_dbp(self, *args, **kwargs): |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
246 return apply(self._cobj.get_dbp, args, kwargs) |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
247 def get_key(self, *args, **kwargs): |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
248 return apply(self._cobj.get_key, args, kwargs) |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
249 def init_value(self, *args, **kwargs): |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
250 return apply(self._cobj.init_value, args, kwargs) |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
251 def open(self, *args, **kwargs): |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
252 return apply(self._cobj.open, args, kwargs) |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
253 def remove(self, *args, **kwargs): |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
254 return apply(self._cobj.remove, args, kwargs) |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
255 def stat(self, *args, **kwargs): |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
256 return apply(self._cobj.stat, args, kwargs) |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
257 def set_cachesize(self, *args, **kwargs): |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
258 return apply(self._cobj.set_cachesize, args, kwargs) |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
259 def set_flags(self, *args, **kwargs): |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
260 return apply(self._cobj.set_flags, args, kwargs) |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
261 def set_range(self, *args, **kwargs): |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
262 return apply(self._cobj.set_range, args, kwargs) |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
263 def get_cachesize(self, *args, **kwargs): |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
264 return apply(self._cobj.get_cachesize, args, kwargs) |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
265 def get_flags(self, *args, **kwargs): |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
266 return apply(self._cobj.get_flags, args, kwargs) |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
267 def get_range(self, *args, **kwargs): |
|
02d475405e3b
* add support for DBSequence objects [patch #1466734]
Gregory P. Smith <greg@mad-scientist.com>
parents:
38604
diff
changeset
|
268 return apply(self._cobj.get_range, args, kwargs) |
