[pybsddb] How to update partial key parameter in get function!

Sury Soni ssoni at nextdigital.com
Tue Apr 14 09:13:15 CEST 2009


Following text snippet is from oracle website for bdb.

 

When partial keys are specified to Berkeley DB, interfaces which
retrieve data items based on a user-specified key (for example, DB->get
<http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/db_
get.html>  and DBcursor->get
<http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/dbc
_get.html>  with the DB_SET
<http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/dbc
_get.html#DB_SET>  flag), [[ will modify the user-specified key by
returning the actual key stored in the database ]].

 

http://www.oracle.com/technology/documentation/berkeley-db/db/ref/am_con
f/bt_compare.html

 

My curiosity is that, how can we return data from DB_get function while
updating partial key with actual returned key.

 

How can we update the passed parameter for key (keyobj) rather than
re-assigning new object using BuildValue_* functions?

 

Function from _bsddb.c file is:

 

static PyObject*

DB_get(DBObject* self, PyObject* args, PyObject* kwargs);

 

____________________________________
Sury Prakash Soni
Developer
____________________________________

Next Digital
Level 8, 15 William St, Melbourne 
VIC 3000 Australia
p +61 3 8612 6888
f  +61 3 8612 6899
m 0433 661 327
ssoni at nextdigital.com <mailto:ssoni at nextdigital.com> 
www.nextdigital.com <http://www.nextdigital.com/> 
____________________________________

This email and any attachments are intended only for the use of the
recipient and may be confidential and/or legally privileged. Next
Digital Group Pty Ltd ("Next Digital") disclaims liability for any
errors, omissions, viruses, loss and/or damage arising from using,
opening or transmitting this email. If you are not the intended
recipient you must not use, interfere with, disclose, copy or retain
this email and you should notify the sender immediately by return email
or by contacting Next Digital by telephone on +61 3 8612 6888.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.jcea.es/pipermail/pybsddb/attachments/20090414/a15393a5/attachment.htm>


More information about the pybsddb mailing list