[Zope3-dev] Re: I want Object Gadfly

Evan Simpson evan@4-am.com
Fri, 18 Jul 2003 13:13:12 -0500


Jim Fulton wrote:
>   With Object Gadfly, you can create relations between objects using
>   content-space tables or named site-wide utilities. Data can be added
>   to them explicitly, or automatically via event subscription. Tables can
>   be indexed and you can execute automatically optimized queries against
>   them using SQL.

Is the following the sort of thing you envision?

CREATE TABLE user_links (
   source Object,
   target Object,
   creator Object,
   relevance integer
);

INSERT INTO user_links values (
   path('/articles/2003/7/18/ObjectGadfly'),
   path('/documents/d945'),
   user,
   10
);

SELECT * FROM user_links
WHERE source = path('/articles/2003/7/18/ObjectGadfly')
   and relevance > 5;

I presume that you intend tables in Object Gadfly to contain mixtures of 
simple datatypes and Persistent object references, with some method 
(perhaps TALES functions) of spelling such references.  Should queries 
have access to the referenced object directly, or only to some kind of 
referential meta-data?  In other words, is this kosher:

SELECT * from user_links
WHERE source.absolute_url().startswith('/articles/2003')
   and source.title contains 'Gadfly';

Cheers,

Evan @ 4-am