[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (#2) 4.1.1 Grammar for Search Mechanism




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?

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?

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)


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)


                (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 VEVEI Z

--Alan