on dev help sign in
P pair binary
0a95a9dEitan Chatav
squeal-postgresql/src/Squeal/PostgreSQL/Binary.hs+3
@@ -633,6 +633,9 @@ instance
633 = fmap fromRecord
633 = fmap fromRecord
634 . hsequence'
634 . hsequence'
635 . htrans (Proxy @FromField) fromField
635 . htrans (Proxy @FromField) fromField
636+instance (FromField (col ::: pgkey) (col ::: key), FromRow pgval val)
637+ => FromRow (col ::: pgkey ': pgval) (P (col ::: key), val) where
638+ fromRow (key :* val) = (,) <$> (unComp . fromField) key <*> fromRow val
636
639
637-- | `Only` is a 1-tuple type, useful for encoding a single parameter with
640-- | `Only` is a 1-tuple type, useful for encoding a single parameter with
638-- `toParams` or decoding a single value with `fromRow`.
641-- `toParams` or decoding a single value with `fromRow`.
squeal-postgresql/src/Squeal/PostgreSQL/Manipulation.hs+2−3
@@ -564,11 +564,10 @@ deleteFrom_
564 , row ~ TableToRow table
564 , row ~ TableToRow table
565 , columns ~ TableToColumns table )
565 , columns ~ TableToColumns table )
566 => QualifiedAlias sch tab -- ^ table to delete from
566 => QualifiedAlias sch tab -- ^ table to delete from
567− -> UsingClause commons schemas params from
568− -> Condition 'Ungrouped commons schemas params (tab ::: row ': from)
567+ -> Condition 'Ungrouped commons schemas params '[tab ::: row]
569 -- ^ condition under which to delete a row
568 -- ^ condition under which to delete a row
570 -> Manipulation commons schemas params '[]
569 -> Manipulation commons schemas params '[]
571−deleteFrom_ tab uses wh = deleteFrom tab uses wh (Returning_ Nil)
570+deleteFrom_ tab wh = deleteFrom tab NoUsing wh (Returning_ Nil)
572
571
573-- | This has the behaviour of a cartesian product, taking all
572-- | This has the behaviour of a cartesian product, taking all
574-- possible combinations between @left@ and @right@ - exactly like a
573-- possible combinations between @left@ and @right@ - exactly like a
squeal-postgresql/src/Squeal/PostgreSQL/Migration.hs+1−1
@@ -283,7 +283,7 @@ insertMigration = insertInto_ (#migrations ! #schema_migrations) . Values_ $
283deleteMigration
283deleteMigration
284 :: Has "migrations" schemas MigrationsSchema
284 :: Has "migrations" schemas MigrationsSchema
285 => Manipulation '[] schemas '[ 'NotNull 'PGtext ] '[]
285 => Manipulation '[] schemas '[ 'NotNull 'PGtext ] '[]
286−deleteMigration = deleteFrom_ (#migrations ! #schema_migrations) NoUsing (#name .== param @1)
286+deleteMigration = deleteFrom_ (#migrations ! #schema_migrations) (#name .== param @1)
287
287
288-- | Selects a `Migration` from the `MigrationsTable`, returning
288-- | Selects a `Migration` from the `MigrationsTable`, returning
289-- the time at which it was executed.
289-- the time at which it was executed.