Jeremy Hylton wrote:
On 12/9/05, Tim Peters <[EMAIL PROTECTED]> wrote:
Log message for revision 40664:
Nail the type of oids, as agreed ;-) to in
http://mail.zope.org/pipermail/zodb-dev/2005-March/008593.html
Changed:
U ZODB/trunk/src/persistent/interfaces.py
-=-
Modified: ZODB/trunk/src/persistent/interfaces.py
===================================================================
--- ZODB/trunk/src/persistent/interfaces.py 2005-12-09 16:04:25 UTC (rev
40663)
+++ ZODB/trunk/src/persistent/interfaces.py 2005-12-09 16:19:03 UTC (rev
40664)
@@ -167,7 +167,9 @@
It is up to the data manager to assign this.
The special value None is reserved to indicate that an object
- id has not been assigned. Non-None object ids must be strings.
+ id has not been assigned. Non-None object ids must be non-empty
+ strings. The 8-byte string '\0'*8 (8 NUL bytes) is reserved to
+ identify the database root object.
A minor point, but it seems like it would make more sense for the
storage to choose the id of the root object. The database doesn't
actually care what the root is, so long as the storage can return it.
You could add a ROOT_OID class attribute to a storage to distinguis
the value.
As I said, a minor point. If the database doesn't care about the
details of oids, it seems to make more sense to have the storage be
responsible for all aspects of oids.
+1
This is a design change that would need to be implemented.
It's obviously not just a documentation change.
Jim
--
Jim Fulton mailto:[EMAIL PROTECTED] Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/
ZODB-Dev mailing list - ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev