[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (#2) 4.1.1 Grammar for Search Mechanism
Alan Davies wrote:
>
> Looks like a great step forward Doug; we're starting
> to fill in the holes. I've not studied it in-depth,
> but I've a couple of initial comments:
>
> At 12:33 PM 16/01/2002 -0700, Doug Royer wrote:
> > (f) SELECT * FROM VEVENT WHERE
> > TRIGGER < 20020201T000000Z
> > AND TRIGGER > 20020101T000000Z
>
> How does the CS know that TRIGGER refers to the VALARM
> TRIGGER . What If I'd wanted to refer to the VALARM DURATION,
> which would have been ambiguous with the VEVENT DURATION?
TYPO in my data :-) They should have been:
VALARM.TRIGGER ... and not just TRIGGER
> I suppose I could use VALARM.DURATION :
>
> SELECT * FROM VEVENT WHERE
> VALARM.TRIGGER < 20020201T000000Z
> AND VALARM.TRIGGER > 20020101T000000Z
> AND VALARM.DURATION < PT15M
>
> but if there were multiple VALARMS, how would the CS
> know which was being referred to?
Any that matched. It was not trying to extract out a specific
VALARM, it was trying to extract out all VEVENTs where the TRIGGER
times were within a range. So any/all VALARMs that meets those
criteria would match.
> Seems to me that we need to specify multi-components in a similar way
> to multi-properties. These would therefore both be valid:
>
> SELECT * FROM VEVENT WHERE
> VALARM.TRIGGER < 20020201T000000Z
> AND VALARM.TRIGGER > 20020101T000000Z
> AND VALARM.DURATION < PT15M
>
> (refers to the any one VALARM within the VEVENT)
Yes, the example above would fetch all VEVENTs including ALL
of their VALARMS that met the criteria.
> SELECT * FROM VEVENT
> USING_COMPONENTS VALARM alarm1, VALARM alarm2
> WHERE
> alarm1.ACTION = 'DISPLAY'
> AND alarm1.TRIGGER < 20020116T000000Z
> AND alarm1.TRIGGER > 20020117T000000Z
> AND alarm2.ACTION = 'EMAIL'
> AND alarm2.TRIGGER < 20020201T000000Z
> AND alarm2.TRIGGER > 20020101T000000Z
>
> (i.e. I'm looking for events with a 'DISPLAY' VALARM,
> and an 'EMAIL' VALARM because... I couldn't think of a better
> example right now)
After you correct for my typo (listed above), I think
we can do this? Correct?
> > (h) SELECT DTSTART,UID FROM VEVENT WHERE
> > VEVENT.TRIGGER < 20020201T000000Z
> > AND VEVENT.TRIGGER > 20020101T000000Z
> >
> > (h) Is NOT valid because it violates rule (5).
> > The error is that VEVENT.TRIGGER is in the
> > WHERE clause and it is not directly or
> > indirectly (by '*' or <something>.'*') in
> > the SELECT clause.
>
> I'm not sure what we're gaining from rule (5) here; would
> it also disallow this, which seems perfectly sensible to me:
>
>> SELECT UID FROM VEVENT WHERE DTSTART < 20020201T000000Z
I have no clue :-)
It made sense when I wrote it :-)
begin:vcard
n:Royer;Doug
tel;pager:pager@xxxxxxxxx
tel;cell:208-520-4044
tel;fax:866-594-8574
tel;work:866-594-8574
x-mozilla-html:FALSE
url:http://Royer.com/People/Doug
org:INET-Consulting LLC <http://INET-Consulting.com
adr:;;1795 W. Broadway #266;Idaho Falls;ID;83402;
version:2.1
email;internet:Doug@xxxxxxxxx
title:Chief Executive Manager
x-mozilla-cpt:;-10400
fn:Doug Royer
end:vcard