Specifications for date column #2434

Merged
merged 1 commit into from Mar 5, 2014

Conversation

Projects
None yet
2 participants
Member

cchantep commented Mar 3, 2014

Specifications for parsing column as date (+ support for long as date).

@@ -3,7 +3,20 @@ package anorm
import javax.sql.rowset.serial.SerialClob
import acolyte.QueryResult
-import acolyte.RowLists._
+import acolyte.RowLists.{
@cchantep

cchantep Mar 3, 2014

Member

More explicit imports

@@ -163,6 +163,7 @@ object Column {
val MetaDataItem(qualified, nullable, clazz) = meta
value match {
case date: Date => Right(date)
+ case time: Long => Right(new Date(time))
@cchantep

cchantep Mar 3, 2014

Member

Raw time to date parsing

jroper added a commit that referenced this pull request Mar 5, 2014

@jroper jroper merged commit 7d0d75a into playframework:master Mar 5, 2014

1 check passed

default Merged build finished.
Details

@cchantep cchantep deleted the cchantep:anorm-datecol-specs branch Mar 5, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment