Subject: CAL-QUERY definition

From: Mark Davidson <[email-masked]>
Date: Thu, 08 Aug 2002 16:01:30 +0100

Hi,

Section 6.1.1 of cap draft 08

The formal definition has a number of things that are not used in it:
   cauprops
   capcprops
   uprop-list
   cprop-list

There is not a cap-using, so cap-local cannot be defined so should be
removed?

The querycomp and queries seem to be defining a VQUERY which is done in 8.6
and should also be removed.

If I am correct, it should look more like this:

    Formal Definition: The value type is defined by the following
    notation:

          cal-query  = "SELECT"   SP   cap-cols  SP
                       "FROM"     SP   comp-name SP
                       "WHERE"    SP   cap-expr

                     / "SELECT" SP cap-cols SP
                       "FROM"   SP comp-name

          cap-cols    = cap-col / ( cap-cols "," cap-col)
                        / "*"

          cap-col     = ; Any property name found in the component
                        ; named in the comp-name used in the FROM clause.
                        ;
                        ;   SELECT ORGANIZER FROM VEVENT ...
                        ;
                        ; OR
                        ;
                        ; A component name of an existing component contained
                        ; inside of the comp-name used in the FROM clause.
                        ;
                        ;   SELECT VALARM FROM VEVENT ...

                        ; NOTE: there is NO space around the "," on
                        ; the next line

          comp-name  = "VEVENT"    / "VTODO"   / "VJOURNAL"
                     / "VTIMEZONE" / "VALARM"  / "VFREEBUSY"
                     / "VAGENDA"   / "VCAR"    / "VCALSTORE"
                     / "VQUERY"    / iana-name / x-comp

          cap-expr    = "(" cap-expr ")"
                      / cap-term

          cap-term    = cap-expr SP cap-logical SP cap-expr
                      / cap-factor

          cap-logical = "AND" / "OR"

          cap-factor  = cap-colval SP cap-oper SP col-value
                      / cap-colval SP "NOT LIKE" SP col-value
                      / cap-colval SP "LIKE" SP col-value
                      / cap-colval SP "IS NULL"
                      / cap-colval SP "IS NOT NULL"
                      / col-value SP "NOT IN" cap-colval"
                      / col-value SP "IN" cap-colval"

          cap-colval     = cap-col
                      / "PARAM(" cap-col "," cap-param ")"

          cap-param   = ; Any parameter that may be contained in the cap-col
                        ; in the supplied PARAM() function

          col-value   = col-literal
                      / "STATE()"
                      / "SELF()"
                      / "CAL-OWNERS()"
                      / "CAL-OWNERS(" cal-address ")"
                      / "CURRENT-TARGET()"

          cal-address = ; A CALID as define by CAP

          col-literal = "'" literal-data "'"

         literal-data = ; Any data that matches the value type of the
                        ; column that is being compared. That is you can
                        ; not compare PRIORITY to "some string" because
                        ; PRIORITY has a value type of integer. If it is
                        ; not preceded by the LIKE element, any '%' and '_'
                        ; characters in the literal data are not treated as
                        ; wildcard characters and do not have to be backslash
                        ; escaped.
                        ;
                        ; OR
                        ;
                        ; If the literal-data is preceded by the LIKE
                        ; element it may also contain the '%' and '_'
                        ; wildcard characters. And if the literal data
                        ; that is comparing contains any '%' or '_'
                        ; characters, they MUST BE backslash escaped as
                        ; described in the notes below in order for them not
                        ; to be treated as wildcard characters.

          cap-oper    = "="
                      / "!="
                      / "<"
                      / ">"
                      / "<="
                      / ">="

          SP          = ; A single white space ascii character
                        ; (value in HEX %x20).

          x-comp      = ; As defined in RFC 2445.

          iana-name   = ; As defined in RFC 2445.

Mark Davidson

---

From: Doug Royer <[email-masked]>
Date: Sat, 24 Aug 2002 10:40:38 -0600

Thanks, it looks great to me and there have been no objections.
I replaced the ABNF with the text you provided in the source.

-Doug

Mark Davidson wrote:
> ... 

(see archives)