[Zope3-dev] Re: I want Object Gadfly
Jim Fulton
jim@zope.com
Fri, 18 Jul 2003 14:39:22 -0400
Evan Simpson wrote:
> 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
> );
No:
INSERT INTO user_links values (
ob1, ob2
user,
10
);
BTW, I'm less interested in DML than in queries.
> SELECT * FROM user_links
> WHERE source = path('/articles/2003/7/18/ObjectGadfly')
> and relevance > 5;
SELECT * FROM user_links
WHERE source = ob1
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.
Yes
> Should queries
> have access to the referenced object directly, or only to some kind of
> referential meta-data?
Reference to object directly.
> In other words, is this kosher:
>
> SELECT * from user_links
> WHERE source.absolute_url().startswith('/articles/2003')
> and source.title contains 'Gadfly';
Yup.
I'm definately waving my hands a bit. :)
I'd accept a lot less too.
Jim
--
Jim Fulton mailto:jim@zope.com Python Powered!
CTO (703) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org