Issue 813877: entry size for bsddb cursors (original) (raw)
Issue813877
This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/39319
classification
Title: | entry size for bsddb cursors | ||
---|---|---|---|
Type: | Stage: | ||
Components: | Extension Modules | Versions: | Python 2.4 |
process
Status: | closed | Resolution: | accepted |
---|---|---|---|
Dependencies: | Superseder: | ||
Assigned To: | gregory.p.smith | Nosy List: | gregory.p.smith, itamar |
Priority: | normal | Keywords: | patch |
Created on 2003-09-28 05:55 by itamar, last changed 2022-04-10 16:11 by admin. This issue is now closed.
Files | |||
---|---|---|---|
File name | Uploaded | Description | Edit |
size.patch | itamar,2003-09-28 05:55 | patches for _bsddb.c and tests |
Messages (5) | ||
---|---|---|
msg44711 - (view) | Author: Itamar Shtull-Trauring (itamar) | Date: 2003-09-28 05:55 |
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.) | ||
msg44712 - (view) | Author: Gregory P. Smith (gregory.p.smith) * ![]() |
Date: 2003-10-01 06:39 |
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. | ||
msg44713 - (view) | Author: Gregory P. Smith (gregory.p.smith) * ![]() |
Date: 2003-10-01 06:50 |
Logged In: YES user_id=413 Okay, a working get_current_size() and test case have been committed. | ||
msg44714 - (view) | Author: Gregory P. Smith (gregory.p.smith) * ![]() |
Date: 2003-10-01 06:51 |
Logged In: YES user_id=413 please commit your documentation update to pybsddb. | ||
msg44715 - (view) | Author: Itamar Shtull-Trauring (itamar) | Date: 2003-10-01 16:16 |
Logged In: YES user_id=32065 Sorry about the bugs. Docs commited. I guess next step is to look at making a cursor specific dbrecio and unscrewing dbrecio in general. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-10 16:11:27 | admin | set | github: 39319 |
2003-09-28 05:55:39 | itamar | create |