[Zope-dev] ZPatterns question

2000-12-27 Thread Christian Scholz

Hi there!

Finally I managed to get a basic understanding of how to do things with
ZPatterns ;-) So seems quite cool :)
(and hopefully I find some time to write some basic howto about it)

But I have some little questions: 

1. Is it possible to retrieve the set of known IDs from a specialist? 
   Or would I need to add my own method to it which does this (and change 
   it accordingly if I switch to another storage method)?

2. Is it planned to provide something like a virtual folder which acts like
   a normal object manager but is controlled via ZPatterns (so actually something
   like Folder with Customizer Support just without the "anchor" in ZODB.
   (would also require some mechanism asked for in 1.)

3. Is it possible to use ZPatterns also without some exta ZClass defined in a
   Product? At least if I don't need methods for my objects but simple want to
   define the attribute they know. 
   Would be nice as I could then hold everything together in one place (the
   specialist that is) without requiring to install something also in the
   Products folder of the Control Panel.


That's it for now, I will keep experimenting then.. :)

cheers,
  Christian

-- 
Christian Scholz   MrTopf@IRC
COM.lounge  http://comlounge.net/
communication & design   [EMAIL PROTECTED]

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] Re: zPoPy oid issues

2000-12-27 Thread Casey Duncan

[EMAIL PROTECTED] wrote:
> 
> Hi,
> 
> The problem is inside postgresql ! They use OID type for LOB and for table'oid, PoPy 
>(to simplify LOB handling) detect automagically LOB and returns them to the end user 
>who can handle them easily.
> I study the postgresql sources on the CVS and they haven't resolv this problem.
> We have to write this in the BUGS file we plan to add soon in our release.
> 
> If you have any proposals to resolv this BIG problem ?
> 
> I'm sorry for this but postgresql types are very confused.
> 
> Best regards.
> 
So, if I understand correctly, oids are handled as large binary objects?
>From what I see, oids are 6 bytes in length (using SELECT
length(oid)...) since they have a max value of 4 billion, that leads me
to believe that only 4 bytes are used as a numeric value. So, they are
really just a glorified int4 with 2 extra bytes tacked on for some
reason.

Anyhow, why exactly does this cause PoPy to crash? I can surely work
around this problem for now, but I can certainly see cases where
returning an oid would be an essential function, especially if you are
working on a generalized database tool.

I am certainly willing to help get this fixed. Any additional
information you (or anybody) has regarding this would be greatly
appreciated.

Thanks for your help.
-- 
| Casey Duncan
| Kaivo, Inc.
| [EMAIL PROTECTED]
`-->

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] RE: SQL Alias leak....

2000-12-27 Thread Brian Lloyd

> Making the corresponding change in Results.py appears to have
> corrected the SQLAlias problem.  
> 
> I'm not exactly sure why the SQLAlias solution is any better than
> doing it this way.  Seems less obfuscated to me.

The SQLAlias is better because otherwise Record allocates
3x the memory for each record (thinking that the aliased 
names are distinct fields).

In any case, Jim tracked this down to a subtle bug in 
ExtensionClass that is fixed for 2.2.5 b1 (which I'm 
uploading the zope.org now).


Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.371.6909  
Digital Creations  http://www.digicool.com 




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] Re: zPoPy oid issues

2000-12-27 Thread Casey Duncan

Actually I found that the Postgres length function returns the string
length (i.e. number of digits) of a number, so my previous message was
wrong about the byte length of an oid. AFAIK they are 4 byte integers.

I have found a way to retrieve oids without crashing Python or Zope. You
must do an explicit type conversion to a 4 byte integer like so:

SELECT int4(oid) FROM foo;

This behaves in a much friendlier manner. I would still like to see the
problem resolved, as I find the fact that an innocuous SELECT query
could crash Zope a bit troubling.

-- 
| Casey Duncan
| Kaivo, Inc.
| [EMAIL PROTECTED]
`-->

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )