<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-AU link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal>Following text snippet is from oracle website for bdb.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal style='margin-left:36.0pt'>When partial keys are specified
to Berkeley DB, interfaces which retrieve data items based on a user-specified
key (for example, <a
href="http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/db_get.html">DB->get</a>
and <a
href="http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/dbc_get.html">DBcursor->get</a>
with the <a
href="http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/dbc_get.html#DB_SET">DB_SET</a>
flag), <b><span style='color:red'>[[ will modify the user-specified key by
returning the actual key stored in the database ]]</span></b>.<o:p></o:p></p>
<p class=MsoNormal style='margin-left:36.0pt'><o:p> </o:p></p>
<p class=MsoNormal style='margin-left:36.0pt'><a
href="http://www.oracle.com/technology/documentation/berkeley-db/db/ref/am_conf/bt_compare.html">http://www.oracle.com/technology/documentation/berkeley-db/db/ref/am_conf/bt_compare.html</a><o:p></o:p></p>
<p class=MsoNormal style='margin-left:36.0pt'><o:p> </o:p></p>
<p class=MsoNormal>My curiosity is that, how can we return data from DB_get
function while updating partial key with actual returned key.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>How can we update the passed parameter for key (keyobj)
rather than re-assigning new object using BuildValue_* functions?<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Function from _bsddb.c file is:<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>static PyObject*<o:p></o:p></p>
<p class=MsoNormal>DB_get(DBObject* self, PyObject* args, PyObject* kwargs);<o:p></o:p></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Arial","sans-serif";
color:silver'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Arial","sans-serif";
color:silver'>____________________________________<br>
Sury Prakash Soni<br>
Developer</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";
color:silver'><br>
</span><span style='font-size:9.0pt;font-family:"Arial","sans-serif";
color:silver'>____________________________________<br>
<br>
<b>Next Digital<br>
</b>Level 8, 15 William St, Melbourne <br>
VIC 3000 Australia<br>
</span><b><i><span style='font-size:9.0pt;font-family:"Arial","sans-serif";
color:silver'>p</span></i></b><span style='font-size:9.0pt;font-family:"Arial","sans-serif";
color:silver'> +61 3 8612 6888<br>
</span><b><i><span style='font-size:9.0pt;font-family:"Arial","sans-serif";
color:silver'>f</span></i></b><span style='font-size:9.0pt;font-family:"Arial","sans-serif";
color:silver'> +61 3 8612 6899<br>
</span><b><i><span style='font-size:9.0pt;font-family:"Arial","sans-serif";
color:silver'>m 0</span></i></b><span style='font-size:9.0pt;font-family:"Arial","sans-serif";
color:silver'>433 661 327<br>
</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";
color:silver'><a href="mailto:ssoni@nextdigital.com"
title="mailto:rmarshall@nextdigital.com mailto:agoldman@nextdigital.com"><span
style='font-size:9.0pt;font-family:"Arial","sans-serif";color:#0066CC'>ssoni@nextdigital.com</span></a></span><span
style='font-size:12.0pt;font-family:"Arial","sans-serif";color:#0066CC'><br>
</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";
color:silver'><a href="http://www.nextdigital.com/"
title="http://www.nextdigital.com/"><span style='font-size:9.0pt;font-family:
"Arial","sans-serif";color:#0066CC'>www.nextdigital.com</span></a></span><span
style='font-size:12.0pt;font-family:"Arial","sans-serif";color:silver'><br>
</span><span style='font-size:9.0pt;font-family:"Arial","sans-serif";
color:silver'>____________________________________</span><span
style='font-size:12.0pt;font-family:"Times New Roman","serif";color:silver'><br>
<br>
</span><span style='font-size:7.0pt;font-family:"Arial","sans-serif";
color:gray'>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.</span><o:p></o:p></p>
</div>
</body>
</html>