generated from tpl/purs
Add FromSQLValue Boolean instance
This commit is contained in:
parent
0566be6dee
commit
a68279e6c4
@ -28,7 +28,7 @@ import Data.Array (head)
|
||||
import Data.ByteString (ByteString)
|
||||
import Data.DateTime.Instant (Instant)
|
||||
import Data.Either (Either(..))
|
||||
import Data.Foreign (Foreign, isNull, readArray, readChar, readInt, readString, toForeign, unsafeFromForeign)
|
||||
import Data.Foreign (Foreign, isNull, readArray, readBoolean, readChar, readInt, readString, toForeign, unsafeFromForeign)
|
||||
import Data.Foreign.Null (writeNull)
|
||||
import Data.List (List)
|
||||
import Data.List as List
|
||||
@ -112,6 +112,9 @@ instance fromSQLRowTuple5 :: (FromSQLValue a, FromSQLValue b, FromSQLValue c, Fr
|
||||
instance toSQLValueBoolean :: ToSQLValue Boolean where
|
||||
toSQLValue = toForeign
|
||||
|
||||
instance fromSQLValueBoolean :: FromSQLValue Boolean where
|
||||
fromSQLValue = fromRight <<< runExcept <<< readBoolean
|
||||
|
||||
instance toSQLValueChar :: ToSQLValue Char where
|
||||
toSQLValue = toForeign
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user