Subject: CAP: VQUERY new MATCH operator

From: Bernard Desruisseaux <[email-masked]>
Date: Wed, 13 Feb 2002 10:35:16 -0500

Given the following VCAR components,

   BEGIN:VCAR
   CARID:Car-01
   BEGIN:VRIGHT
   GRANT:[email-masked]
   ...
   END:VRIGHT
   END:VCAR

   BEGIN:VCAR
   CARID:Car-02
   BEGIN:VRIGHT
   GRANT:[email-masked]
   ...
   END:VRIGHT
   END:VCAR

I would like to introduce a new MATCH operator such that:

   BEGIN:VQUERY
   QUERYNAME:Query-01
   QUERY:SELECT * FROM VCAR
    USING_PROPERTIES GRANT oneGrant
    WHERE [email-masked]' MATCH oneGrant
   END:VQUERY

would return both VCAR components with CARID:Car-01 and
CARID:Car-02, while

   BEGIN:VQUERY
   QUERYNAME:Query-01
   QUERY:SELECT * FROM VCAR
    USING_PROPERTIES GRANT oneGrant
    WHERE [email-masked]' = oneGrant
   END:VQUERY

would only return CARID:Car-02.

For the time being, the semantic of the MATCH operator would
only be defined for:

   upn MATCH upn-filter

and as it's the case for other operators its semantic could be
defined later on for other value types.

Regards,
Bernard
-- 
Bernard Desruisseaux                    mailto:[email-masked]
Research & Development                  Tel.  : +1 514 733-8500 x4213
Steltor                                 Fax   : +1 514 733-8878

---

From: Doug Royer <[email-masked]>
Date: Wed, 13 Feb 2002 11:43:11 -0700

>     WHERE [email-masked]' MATCH oneGrant

Can't we just add another VQUERY note like his:

 (x) When the CAL-QUERY WHERE clause compares a literal
     UPN to a property that may contain wildcard UPN values,
     the CS MUST return any wildcard matches that would
     expandable into the literal UPN supplied.

     Example (and I'll fill them more in in the real proposal):

	BEGIN:VCAR
	CARID:wildcard-1
	...
	GRANT:*
	...
	END:VCAR

	BEGIN:VCAR
	CARID:literal-1
	...
	GRANT:a-user@realm
	...
	END:VCAR
      
     So that the following QUERY returns 'wildcard-1' and
     'literal-1':

	QUERY:SELECT * FROM VCAR WHERE GRANT = 'a-user@realm'

---

From: Bernard Desruisseaux <[email-masked]>
Date: Wed, 13 Feb 2002 14:26:46 -0500

>         QUERY:SELECT * FROM VCAR WHERE GRANT = 'a-user@realm'

But then I wouldn't have a way of only getting the VCAR
VCAR component with "GRANT:a-user@realm" explicitly set.

Regards,
Bernard

---

From: Doug Royer <[email-masked]>
Date: Wed, 13 Feb 2002 13:04:49 -0700

> VCAR component with "GRANT:a-user@realm" explicitly set.

Okay then how about:

It only does wildcard matches when EXPAND:TRUE.
If EXPAND:FALSE, it only matches on the explicit value

Agree?

---

From: Bernard Desruisseaux <[email-masked]>
Date: Wed, 13 Feb 2002 16:01:23 -0500

> If EXPAND:FALSE, it only matches on the explicit value

There are multiple reasons for not doing that:

1- Everything that influence the selection mechanism
   should be specified within the CAL-QUERY value (i.e.,
   not as an additional property in the VQUERY component)
   such that VCAR components may also use them.

2- It may be acceptable (although arguable) for the
   EXPAND property to influence the format of the
   objects returned by the <search> command, but it
   should not at the same time influence the selection
   mechanism per say.  Those need to be specified
   separately.

3- We already have a proposal that specifies how
   EXPAND should influence the format of the VCAR
   being returned.  Again, EXPAND should not at
   the same time influence which VCAR objects are
   selected AND in which format they should be
   returned.

Regards,
Bernard