merging sqlite and bs branches
Since the sqlite branch uses blobs extensively, there are some performance benefits, ByteStrings now get stored and retrieved w/o conversion in some cases like in Database.Export.
This commit is contained in:
commit
2f9a80d803
266 changed files with 2860 additions and 1325 deletions
|
@ -18,7 +18,6 @@ module Database.Types (
|
|||
import Database.Persist.Class hiding (Key)
|
||||
import Database.Persist.Sql hiding (Key)
|
||||
import qualified Data.ByteString as S
|
||||
import qualified Data.ByteString.Lazy as L
|
||||
import qualified Data.Text as T
|
||||
import qualified Data.Attoparsec.ByteString as A
|
||||
import System.PosixCompat.Types
|
||||
|
@ -35,7 +34,7 @@ import Types.UUID
|
|||
import Types.Import
|
||||
|
||||
instance PersistField Key where
|
||||
toPersistValue = toPersistValue . L.toStrict . serializeKey'
|
||||
toPersistValue = toPersistValue . serializeKey'
|
||||
fromPersistValue b = fromPersistValue b >>= parse
|
||||
where
|
||||
parse = either (Left . T.pack) Right . A.parseOnly keyParser
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue