git.iko.soy/typeable/postgresql-simple
on master help sign in
Merge pull request #24 from sopvop/master
162d965Leon P Smith
src/Database/PostgreSQL/Simple/ToRow.hs+4−1
@@ -22,7 +22,7 @@ module Database.PostgreSQL.Simple.ToRow
22 ) where
22 ) where
23
23
24import Database.PostgreSQL.Simple.ToField (Action(..), ToField(..))
24import Database.PostgreSQL.Simple.ToField (Action(..), ToField(..))
25−import Database.PostgreSQL.Simple.Types (Only(..))
25+import Database.PostgreSQL.Simple.Types (Only(..), (:.)(..))
26
26
27-- | A collection type that can be turned into a list of rendering
27-- | A collection type that can be turned into a list of rendering
28-- 'Action's.
28-- 'Action's.
@@ -88,3 +88,6 @@ instance (ToField a, ToField b, ToField c, ToField d, ToField e, ToField f,
88
88
89instance (ToField a) => ToRow [a] where
89instance (ToField a) => ToRow [a] where
90 toRow = map toField
90 toRow = map toField
91+
92+instance (ToRow a, ToRow b) => ToRow (a :. b) where
93+ toRow (a :. b) = toRow a ++ toRow b