[ZODB-Dev] Typechecking oid in getitem
Toby Dickenson
tdickenson at geminidataloggers.com
Mon May 19 17:34:48 EDT 2003
On Monday 19 May 2003 4:22 pm, Christian Reis wrote:
> On Mon, May 19, 2003 at 10:59:28AM -0400, Jeremy Hylton wrote:
> > The type of an oid depends on the storage, so there is no guarantee that
> > it will be a string. In fact, ZODB4 storages will soon change to using
> > Python longs.
Longs as a better type for holding the same old 64 opaque bits?
> Hmmm. So would the correct fix be to implement API so the storage can
> inform what type the OID should be? I could implement something like:
>
> storage.getOIDType()
>
> that returned a TypeObject. Are other storage authors against this
> change? It would make sanity checking easier AFAICT.
Shouldnt the storage be making that check?
If the problem is one storage is raising an ugly exception then I would
consider patching the storage, not the connection.
--
Toby Dickenson
http://www.geminidataloggers.com/people/tdickenson
More information about the ZODB-Dev
mailing list