[Zope-dev] ZCatalog searching for missing values

2001-10-08 Thread Bjorn Stabell

Hi all,

We've installed Kavio's CatalogQuery product and are very happy with it.
Haven't looked at the ZOQLMethod from iuveno yet, but both look like
great steps in the right direction.

I have one question: is it possible using a normal catalog query or
Kavio's catalog query to check if a value is not set?  The
representation returned is Missing.Value, but I seem to be unable to
say, e.g, 'Description == Missing.Value' etc.  How hard is it to add
such functionality?

Bye,
-- 
Bjorn

___
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 )



Re: [Zope-dev] ZCatalog searching for missing values

2001-10-08 Thread Stephan Richter


We've installed Kavio's CatalogQuery product and are very happy with it.
Haven't looked at the ZOQLMethod from iuveno yet, but both look like
great steps in the right direction.

Thanks.

I actually need to look at Casey's code and see what I can reuse. The 
efficiency of my version is not that great yet, but much more flexible. So 
I want to take Casey's code and optimize mine a little.

BTW, I just added a mailing list and a poll for ZOQL. Please go to 
http://demo.iuveno-net.de/iuveno/Products/ZOQLMethod and vote in the poll, 
so I can get an estimate of the general interest.

I have one question: is it possible using a normal catalog query or
Kavio's catalog query to check if a value is not set?  The
representation returned is Missing.Value, but I seem to be unable to
say, e.g, 'Description == Missing.Value' etc.  How hard is it to add
such functionality?

You mean, whether the system checks, if a property exists at all or is set 
to None? I think both would be no problem.

1. Property exists or not:

I could support a function, like: exists(Property)
Example:

SELECT *
   FROM Test
   WHERE exists(Property);

2. Property is set to None:

Simply use equal: Property == None
Note: That might work already? I have to check...
Example:

SELECT *
   FROM Test
   WHERE Property == None;

Regards,
Stephan

--
Stephan Richter
CBU - Physics and Chemistry Student
Web2k - Web Design/Development  Technical Project Management


___
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 )



RE: [Zope-dev] ZCatalog searching for missing values

2001-10-08 Thread Bjorn Stabell

Having an exists function would be great.  I was trying to do the same
using CatalogQuery, but I found no way to check for Missing.Value, which
is the repr() of what's in the catalog's metadata field for objects that
don't have that attribute/function.  I also ran into problems doing more
complex or'ing and and'ing, and I assume we'll have better luck with
ZOQLMethod for that.

I just tried out ZOQLMethod as well.  Couldn't get it to work, but it
looks like really solid craftsmanship.  I like the user-friendly way of
selecting base object and the complete syntax. :)  Some questions:


1. I couldn't get any query to work.  I keep getting

exceptions.TypeError
argument 2 to map() must be a sequence object

Here's an example query that I've tried

SELECT id
  WHERE title == ''
  RECURSIVE;


2. Is the ZCatalog searching implemented?  How do I activate it?


3. Do you have any plans to implement JOIN?


The exists function would be very cool.


Keep up the great work.  Hope this helps flush out some features :)


Bye,
-- 
Bjorn


Stephan wrote:
[...]
 I actually need to look at Casey's code and see what I can reuse. The 
 efficiency of my version is not that great yet, but much more 
 flexible. So I want to take Casey's code and optimize mine a little.
 
 BTW, I just added a mailing list and a poll for ZOQL. Please go to 
 http://demo.iuveno-net.de/iuveno/Products/ZOQLMethod and vote 
 in the poll, so I can get an estimate of the general interest.
 
 I have one question: is it possible using a normal catalog query or
 Kavio's catalog query to check if a value is not set?  The
 representation returned is Missing.Value, but I seem to be unable to
 say, e.g, 'Description == Missing.Value' etc.  How hard is it to add
 such functionality?
 
 You mean, whether the system checks, if a property exists at 
 all or is set to None? I think both would be no problem.
 
 1. Property exists or not:
 
 I could support a function, like: exists(Property)
 Example:
 
 SELECT *
FROM Test
WHERE exists(Property);
 
 2. Property is set to None:
 
 Simply use equal: Property == None
 Note: That might work already? I have to check...
 Example:
 
 SELECT *
FROM Test
WHERE Property == None;
 
 Regards,
 Stephan
 
 --
 Stephan Richter
 CBU - Physics and Chemistry Student
 Web2k - Web Design/Development  Technical Project Management
 
 
 ___
 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 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 )



RE: [Zope-dev] ZCatalog searching for missing values

2001-10-08 Thread Bjorn Stabell

Ahhh... Got it working now.  Thanks. :)  Not sure I know how to activate
ZCatalog searching though, or if it is on all the time; the example only
mentions ZCatalog once when it deletes it.  What determines if a search
is a raw object-database search and when it uses the ZCatalog?

Always returning the objects is going to a bit slow, though.  Couldn't
it just return the Pluggable Brains if you search the ZCatalog; or at
least have an option to only return them?

Bye,
-- 
Bjorn


 -Original Message-
 From: Stephan Richter [mailto:[EMAIL PROTECTED]]
 Sent: Monday, October 08, 2001 23:33
 To: Bjorn Stabell
 Cc: [EMAIL PROTECTED]
 Subject: RE: [Zope-dev] ZCatalog searching for missing values
 
 
 
 I just tried out ZOQLMethod as well.  Couldn't get it to work, but it
 looks like really solid craftsmanship.  I like the 
 user-friendly way of
 selecting base object and the complete syntax. :)  Some questions:
 
 1. I couldn't get any query to work.  I keep getting
 
  exceptions.TypeError
  argument 2 to map() must be a sequence object
 
 Solved. See below.
 
 Here's an example query that I've tried
 
  SELECT id
WHERE title == ''
RECURSIVE;
 
 You can only select meta types (this is by design; I just 
 don't want to 
 deal with brains and all that stuff right now.)!! Did you see 
 the help? It 
 has a long example in there as well.
 But there is another bug. You have to specify FROM right now. 
 I will fix 
 that. Okay, is fixed for the next release.
 
 So,
 
 SELECT DTML Method
FROM .
WHERE title == ''
RECURSIVE;
 
 should work.
 
 2. Is the ZCatalog searching implemented?  How do I activate it?
 
 Yes, see the Rather Lengthy Example.
 
 3. Do you have any plans to implement JOIN?
 
 No, for the reasons given above. You select only objects, not 
 attributes.
 
 BUT, patches are always welcomed!!! :-)
 
 The exists function would be very cool.
 
 I will look into this. Hopefully it will be not too hard to implement.
 
 Keep up the great work.  Hope this helps flush out some features :)
 
 I hope I will. :-) Yes it does. If you and all the other Zope 
 people could 
 write me some arguments to support attribute selection, then 
 I will look 
 into it (but it will be not that easy).
 
 Regards,
 Stephan
 
 --
 Stephan Richter
 CBU - Physics and Chemistry Student
 Web2k - Web Design/Development  Technical Project Management
 
 

___
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] Adding a role programatically

2001-10-08 Thread Kiran Ambati

Hi All:
I would like to add a role programatically, I was wondering if any one has
tried adding a role, I was looking for a python script that would do this.
I am adding a role into an Oracle table through a form, so I would like to
also add the same role into ZOPE, thus having only one point of entry to
both.
Thanks much.
Kiran.


___
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: core session tracking and zope 2.5 integration

2001-10-08 Thread Joseph Wayne Norton


Chris -

Thanks for your response.  

I had already put together a prototype since my first mail to you on
this subject and just completed integration with version 0.9.  I have
placed a tar bundle at the following url:

  http://www.zope.org/Members/natsukashi/Prototypes/CoreSessionUserFolder.tgz

 or link via zope.org home page

  http://www.zope.org/Members/natsukashi/

with a bundled example (stest_internal.zexp). Please make sure that
you read both of the README.txt files.
   
   bash$ tar --exclude CVS -cvzf CoreSessionUserFolder.tgz
   CoreSessionUserFolder
   CoreSessionUserFolder/
   CoreSessionUserFolder/__init__.py
   CoreSessionUserFolder/User.py
   CoreSessionUserFolder/images/
   CoreSessionUserFolder/images/UserFolder_icon.gif
   CoreSessionUserFolder/help/
   CoreSessionUserFolder/refresh.txt
   CoreSessionUserFolder/patches/
   CoreSessionUserFolder/patches/README.txt
   CoreSessionUserFolder/patches/CMFCore-CookieCrumbler-p1.txt
   CoreSessionUserFolder/patches/CoreSessionTracking0-9-p1.txt
   CoreSessionUserFolder/patches/zope-2.4.1-absolute_url-p1.txt
   CoreSessionUserFolder/SessionIdManager.py
   CoreSessionUserFolder/import/
   CoreSessionUserFolder/import/README.txt
   CoreSessionUserFolder/import/stest_internal.zexp

It is far from perfect but just a proof of concept.  This approach
would also benefit from the encrypted user password support (I
believe).

Please take a look and provide some feedback.

thanks,

- joe

At Sat, 6 Oct 2001 02:04:49 -0400,
Chris McDonough wrote:
 
  I need to elaborate more on my thoughts but I thought it would be
  worthwhile to ask if something like this is already in the works
  before I spend too much investigating how to implement such a acl_user
  folder.
 
 No, nothing like this in the works.  It'd be pretty neat to see something
 like it, at least as proof of concept...
 

___
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 )