Permalink
Browse files

Merge pull request #24 from sopvop/master

Added ToRow instance for (:.)
  • Loading branch information...
2 parents 2e985d9 + 36e5209 commit 162d9651deb8b51673a2f4b8ce71afceedcfe0cc @lpsmith committed Jul 25, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/Database/PostgreSQL/Simple/ToRow.hs
@@ -22,7 +22,7 @@ module Database.PostgreSQL.Simple.ToRow
) where
import Database.PostgreSQL.Simple.ToField (Action(..), ToField(..))
-import Database.PostgreSQL.Simple.Types (Only(..))
+import Database.PostgreSQL.Simple.Types (Only(..), (:.)(..))
-- | A collection type that can be turned into a list of rendering
-- 'Action's.
@@ -88,3 +88,6 @@ instance (ToField a, ToField b, ToField c, ToField d, ToField e, ToField f,
instance (ToField a) => ToRow [a] where
toRow = map toField
+
+instance (ToRow a, ToRow b) => ToRow (a :. b) where
+ toRow (a :. b) = toRow a ++ toRow b

0 comments on commit 162d965

Please sign in to comment.