From 35f9da6f50ef5dcce6ce081cdf9c4989de210bd6 Mon Sep 17 00:00:00 2001 From: rightfold Date: Thu, 8 Jun 2017 13:56:21 +0200 Subject: [PATCH] Add Foreign instances --- src/Database/PostgreSQL/Value.purs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Database/PostgreSQL/Value.purs b/src/Database/PostgreSQL/Value.purs index adbbcc4..471f500 100644 --- a/src/Database/PostgreSQL/Value.purs +++ b/src/Database/PostgreSQL/Value.purs @@ -77,6 +77,12 @@ instance fromSQLValueMaybe :: (FromSQLValue a) => FromSQLValue (Maybe a) where fromSQLValue x | isNull x = pure Nothing | otherwise = Just <$> fromSQLValue x +instance toSQLValueForeign :: ToSQLValue Foreign where + toSQLValue = id + +instance fromSQLValueForeign :: FromSQLValue Foreign where + fromSQLValue = pure + foreign import null :: Foreign foreign import instantToString :: Instant -> Foreign foreign import unsafeIsBuffer :: ∀ a. a -> Boolean