Lists Home |
Date Index |
On Wed, Apr 07, 2004 at 05:22:48PM -0700, Joe Fawcett wrote:
> If I have a database that supports XQuery and I construct a query that uses
> the following XPath as part of a flower statement:
> customer[surname = 'smith']
> how would you both want and expect the query to run?
> 1) Return all customers where surname equalled exactly 'smith' or
> 2) Follow the datbase matching and return 'Smith' and 'smith' and other case
> insensitive strings or
> 3) I can choose by setting a parameter before running the query which mode
> to use
(3) - in partcular, see the XPath and Functions and Operators
descriptions of collations and of equality. (1) will
generally be the default.
> On a similar note if I ask for
> customer[age > 20.5]
> but age is stored as an integer would you want/expect the same sort of
> conversion to be made
Yes because you can compare an integer and a decimal.
XQuery operates on instances of the XPath 2 Data Model. It's up
to the implementor to map correctly from the database into the
data model. The implementation can do the casting anywhere it
likes - it should have all the information it needs to make the
decision -- but conceptually it happens on data model instances.
Liam Quin, W3C XML Activity Lead, http://www.w3.org/People/Quin/