cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAY-1951) Support ISO-8601 date/time Strings in Expressions
Date Tue, 02 Sep 2014 13:13:21 GMT
Andrus Adamchik created CAY-1951:
------------------------------------

             Summary: Support ISO-8601 date/time Strings in Expressions
                 Key: CAY-1951
                 URL: https://issues.apache.org/jira/browse/CAY-1951
             Project: Cayenne
          Issue Type: Improvement
            Reporter: Andrus Adamchik
            Assignee: Andrus Adamchik


When creating Expression's from Strings, we only distinguish between numeric and String values.
So passing a date/time/datetime as a String is not possible. I think we can improve that...
If a left-hand side path of a binary expression is a property that is a java.util.Date , java.sql.Date,
java.sql.Time, java.sql.Timestamp, we should be able to parse a right-hand side value to the
corresponding object. 

The biggest caveat is that we can't do this transformation at the parse time. Base expressions
are abstract and have no notion of the path type. So only when expression is evaluated (either
translated to SQL or evaluated in-memory) can we make the assertion above.

http://cayenne.apache.org/docs/3.1/cayenne-guide/expressions.html#expressions-from-strings
http://cayenne.apache.org/docs/3.1/cayenne-guide/expressions-bnf.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message