Re: Proposed requirements: Operations on primitive types
"Dmitry" <[email protected]> Mon, 21 Jul 2003 19:41:39 -0400
| Newsgroups | gmane.text.xml.xtm.tmql |
|---|---|
| Message-ID | <003701c34fe1$a1eee610$7d01a8c0@dbn> |
From: "Lars Marius Garshol" To: <[email protected]> Sent: Monday, July 21, 2003 10:33 AM Subject: [tmql-wg] Proposed requirements: Operations on primitive types > One issue we have not discussed so far is to what extent we should > support primitive types and operations on them. That is, should a > query be allowed to interpret internal occurrences as containing > numbers? Dates? I personally think that it is very important for real scenarios. I really like the way it is done in XPath 2.0. 1) for literals it is possible to use constructors: xs:date('1993-08-01') 2) dynamic type converters such as: number(price), date(birthdate) 3) 'instance of' operator which allows to verify that operand is of specific type > And, if we support this, should we also support operations on these > values? That is, basic arithmetic functions on numbers like plus, > minus, multiplication, etc? String operations like those of XPath? > Date functions? Regular expressions? I think that, again, XPath 2.0 provides a good example of demarcation line in terms of number of implemented operators and functions. Dmitry