pybsddb with cffi

Check-in [47e4a41be9]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:pass test_join
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:47e4a41be99ddff6e3415c5182bb5ec7e8de9399
User & Date: broker-3 2013-02-06 17:38:04
Context
2013-02-07
10:13
passed test_associate check-in: e29f86fbe7 user: broker-3 tags: trunk
2013-02-06
17:38
pass test_join check-in: 47e4a41be9 user: broker-3 tags: trunk
17:30
AV fixed check-in: e1116161a5 user: broker-3 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to bsddb3/__init__.py.

91
92
93
94
95
96
97

98
99
100
101
102
103
104
#define DB_REP_IGNORE ...
#define DB_REP_JOIN_FAILURE ...
#define DB_REP_NEWSITE ...
#define DB_REP_NOTPERM ...
#define DB_REP_ISPERM ...
#define DB_REP_ELECTION_TIMEOUT ...
#define DB_REP_UNAVAIL ...


#define DB_CURRENT ...
#define DB_FIRST ...
#define DB_LAST ...
#define DB_NEXT ...
#define DB_PREV ...
#define DB_SET ...







>







91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#define DB_REP_IGNORE ...
#define DB_REP_JOIN_FAILURE ...
#define DB_REP_NEWSITE ...
#define DB_REP_NOTPERM ...
#define DB_REP_ISPERM ...
#define DB_REP_ELECTION_TIMEOUT ...
#define DB_REP_UNAVAIL ...
#define DB_JOIN_ITEM ...

#define DB_CURRENT ...
#define DB_FIRST ...
#define DB_LAST ...
#define DB_NEXT ...
#define DB_PREV ...
#define DB_SET ...

Changes to bsddb3/db.py.

1822
1823
1824
1825
1826
1827
1828










1829
1830
1831
1832
1833
1834
1835
                raise Exception("Not yet (DBCursor.pget)")
            else:
                key_obj = ffi.buffer(key.data, key.size)[:]
            return key_obj, pkey_obj, data_obj
        else:
            return data_obj, pkey_obj











    def get_recno(self):
        key = ffi.new("DBT *")
        data = ffi.new("DBT *")
        check_error(self.dbc.get(self.dbc, key, data, DB_GET_RECNO))
        return int(ffi.cast("db_recno_t *", data.data)[0])

    def set_recno(self, recno, flags=0, dlen= -1, doff= -1):







>
>
>
>
>
>
>
>
>
>







1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
                raise Exception("Not yet (DBCursor.pget)")
            else:
                key_obj = ffi.buffer(key.data, key.size)[:]
            return key_obj, pkey_obj, data_obj
        else:
            return data_obj, pkey_obj

    def join_item(self, flags=0):
        key = ffi.new("DBT *")
        data = ffi.new("DBT *")
        err = self.dbc.get(self.dbc, key, data, flags | DB_JOIN_ITEM)
        if ((err == DB_NOTFOUND or err == DB_KEYEMPTY) and
            self.mydb._getReturnsNone):
            return
        check_error(err)
        return ffi.buffer(key.data, key.size)[:]

    def get_recno(self):
        key = ffi.new("DBT *")
        data = ffi.new("DBT *")
        check_error(self.dbc.get(self.dbc, key, data, DB_GET_RECNO))
        return int(ffi.cast("db_recno_t *", data.data)[0])

    def set_recno(self, recno, flags=0, dlen= -1, doff= -1):