[ZODB-Dev] OID length

Tim Peters tim at zope.com
Fri Dec 9 12:02:11 EST 2005


[Florent Guillaume]
> Oh I agree, but if my storage (think SQL) has internally other kinds of
> identifiers, like autoincremented integer primary keys, and several
> tables depending on object kind, I want to reuse its concepts and pack
> them into an oid like 'footable_12345'.

I probably would not.  Instead I'd add another table, mapping "plain old
oids" to data structures that clearly identify the SQL access path -- maybe
even to instances of a class with methods that know how to talk with SQL and
"do interesting stuff".  If SQL can't understand 'footable_12345' directly,
then you're doing some kind of Florent-unique ;-) encoding anyway.

> Anyway thanks for the answers, I know in what direction to move now.

As the ancient Romans proclaimed, all roads lead to str ;-)



More information about the ZODB-Dev mailing list