[Zope-dev] reading the entire DB

nw_moriarty Last Name nw_moriarty@my-deja.com
Thu, 26 Apr 2001 11:38:04 -0700


This is a multi-part message in MIME format...

------------=_988310284-16688-0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary

Jim

Were you able to run the script I sent previously?  I have attached it again.  It demonstrates that the entire DB is read each time an item is read.

Nigel



------------------------------------------------------------
--== Sent via Deja.com ==--
http://www.deja.com/

------------=_988310284-16688-0
Content-Type: application/octet-stream; name="nikeDB.py"
Content-Disposition: inline; filename="nikeDB.py"
Content-Transfer-Encoding: base64

aW1wb3J0IFpPREIKZnJvbSBQZXJzaXN0ZW5jZSBpbXBvcnQgUGVyc2lzdGVu
dApmcm9tIFpPREIgaW1wb3J0IEZpbGVTdG9yYWdlLCBEQgoKY2xhc3MgZGF0
YTEoUGVyc2lzdGVudCk6CiAgZGVmIF9faW5pdF9fKHNlbGYsYSk6CiAgICBw
cmludCAiQ29uc3RydWN0b3Igb2YgZGF0YTEgd2l0aCBhcmd1bWVudCA9Iixh
CiAgICBzZWxmLmRlc2NyaXB0aW9uID0gKCJJIGFtIGFuIGluc3RhbmNlIG9m
IGRhdGExIHdpdGgiLGEpCiAgICBzZWxmLm51bWJlcj1hCiAgZGVmIF9fZGVs
X18oc2VsZik6CiAgICBwcmludCAiRGVzdHJ1Y3RvciBvZiBkYXRhMSIKICBk
ZWYgX19nZXRpbml0YXJnc19fKHNlbGYpOgogICAgcmV0dXJuIChzZWxmLm51
bWJlciwpCgpkZWYgU3RvcmVPYmplY3RzKCk6CiAgICBkMSA9IGRhdGExKDEx
MTExKQogICAgZDIgPSBkYXRhMSgyMjIyMikKICAgIHN0b3JhZ2UgPSBGaWxl
U3RvcmFnZS5GaWxlU3RvcmFnZSgnZGF0YS5mcycpCiAgICBkYiA9IERCKHN0
b3JhZ2UpCiAgICBjb25uID0gZGIub3BlbigpCiAgICBkYnJvb3QgPSBjb25u
LnJvb3QoKQoKICAgIGlmIG5vdCBkYnJvb3Qua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