mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-11-29 14:45:51 +03:00
Extend default type mapping of SQLite3.
This commit is contained in:
parent
6e02da1a48
commit
7384392956
@ -14,6 +14,7 @@ import Data.ByteString (ByteString)
|
|||||||
import Data.Char (toLower, toUpper)
|
import Data.Char (toLower, toUpper)
|
||||||
import Data.Int (Int8, Int16, Int32, Int64)
|
import Data.Int (Int8, Int16, Int32, Int64)
|
||||||
import Data.Map (Map)
|
import Data.Map (Map)
|
||||||
|
import Data.Time (Day, LocalTime)
|
||||||
import Database.Record.Instances ()
|
import Database.Record.Instances ()
|
||||||
import Database.Relational.Query (Query)
|
import Database.Relational.Query (Query)
|
||||||
import Database.Relational.Query.Type (unsafeTypedQuery)
|
import Database.Relational.Query.Type (unsafeTypedQuery)
|
||||||
@ -48,6 +49,9 @@ mapFromSqlDefault =
|
|||||||
, ("REAL", [t|Double|])
|
, ("REAL", [t|Double|])
|
||||||
, ("DOUBLE", [t|Double|])
|
, ("DOUBLE", [t|Double|])
|
||||||
, ("FLOAT", [t|Float|])
|
, ("FLOAT", [t|Float|])
|
||||||
|
|
||||||
|
, ("DATE", [t|Day|])
|
||||||
|
, ("DATETIME", [t|LocalTime|])
|
||||||
]
|
]
|
||||||
|
|
||||||
normalizeColumn :: String -> String
|
normalizeColumn :: String -> String
|
||||||
|
Loading…
Reference in New Issue
Block a user