[Patches] [ python-Patches-813877 ] entry size for bsddb cursors

SourceForge.net noreply at sourceforge.net
Wed Oct 1 02:51:27 EDT 2003


Patches item #813877, was opened at 2003-09-27 22:55
Message generated for change (Comment added) made by greg
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=813877&group_id=5470

Category: Modules
Group: Python 2.4
Status: Closed
Resolution: Accepted
Priority: 5
Submitted By: Itamar Shtull-Trauring (itamar)
Assigned to: Gregory P. Smith (greg)
Summary: entry size for bsddb cursors

Initial Comment:
If you store large entries in a database, there is

currently no way to get their size without reading the

whole thing into memory when using cursors. Knowing the

length is useful for doing partial reads from a record. 



The patch adds a method get_current_size() that returns

the length of the data in the current entry the cursor

is pointing at. 



Implemented at the request of the Quotient developers

(divmod.org). 



I have pybsddb cvs access so I can check in the docs

there if/when this goes in to core python.



(Patch is concatenated two files, hope it's ok.)

----------------------------------------------------------------------

>Comment By: Gregory P. Smith (greg)
Date: 2003-09-30 23:51

Message:
Logged In: YES 
user_id=413

please commit your documentation update to pybsddb.

----------------------------------------------------------------------

Comment By: Gregory P. Smith (greg)
Date: 2003-09-30 23:50

Message:
Logged In: YES 
user_id=413

Okay, a working get_current_size() and test case have been committed.

----------------------------------------------------------------------

Comment By: Gregory P. Smith (greg)
Date: 2003-09-30 23:39

Message:
Logged In: YES 
user_id=413

This patch doesn't handle zero length values properly and misuses makeDbErr; i've got a fixed patch and test case in my sandbox currently running the testsuite.  I'll commit it shortly.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=813877&group_id=5470



More information about the Patches mailing list