squeal-postgresql 0.7.0.1 → 0.8.0.0
raw patch · 36 files changed
+1152/−557 lines, 36 filesdep −unliftio-poolPVP ok
version bump matches the API change (PVP)
Dependencies removed: unliftio-pool
API changes (from Hackage documentation)
- Squeal.PostgreSQL.Definition: instance (db0 Data.Type.Equality.~ db1) => GHC.Base.Monoid (Squeal.PostgreSQL.Definition.Definition db0 db1)
- Squeal.PostgreSQL.Definition: instance (db0 Data.Type.Equality.~ db1) => GHC.Base.Semigroup (Squeal.PostgreSQL.Definition.Definition db0 db1)
- Squeal.PostgreSQL.Definition.Function: instance forall k1 k2 k3 (db :: k3) (args :: k2) (ret :: k1). Squeal.PostgreSQL.Render.RenderSQL (Squeal.PostgreSQL.Definition.Function.FunctionDefinition db args ret)
- Squeal.PostgreSQL.Definition.Procedure: instance forall k1 k2 (db :: k2) (args :: k1). Squeal.PostgreSQL.Render.RenderSQL (Squeal.PostgreSQL.Definition.Procedure.ProcedureDefinition db args)
- Squeal.PostgreSQL.Expression: instance (Squeal.PostgreSQL.Type.Alias.Has tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, Squeal.PostgreSQL.Type.Alias.GroupedBy tab col bys, column Data.Type.Equality.~ (col Squeal.PostgreSQL.Type.Alias.::: ty)) => Squeal.PostgreSQL.Type.Alias.IsQualified tab col (Squeal.PostgreSQL.Type.Alias.Aliased (Squeal.PostgreSQL.Expression.Expression ('Squeal.PostgreSQL.Type.Alias.Grouped bys) lat with db params from) column)
- Squeal.PostgreSQL.Expression: instance (Squeal.PostgreSQL.Type.Alias.Has tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, Squeal.PostgreSQL.Type.Alias.GroupedBy tab col bys, columns Data.Type.Equality.~ '[col Squeal.PostgreSQL.Type.Alias.::: ty]) => Squeal.PostgreSQL.Type.Alias.IsQualified tab col (Data.SOP.NP.NP (Squeal.PostgreSQL.Type.Alias.Aliased (Squeal.PostgreSQL.Expression.Expression ('Squeal.PostgreSQL.Type.Alias.Grouped bys) lat with db params from)) columns)
- Squeal.PostgreSQL.Expression: instance (Squeal.PostgreSQL.Type.Alias.Has tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, Squeal.PostgreSQL.Type.Alias.GroupedBy tab col bys, tys Data.Type.Equality.~ '[ty]) => Squeal.PostgreSQL.Type.Alias.IsQualified tab col (Data.SOP.NP.NP (Squeal.PostgreSQL.Expression.Expression ('Squeal.PostgreSQL.Type.Alias.Grouped bys) lat with db params from) tys)
- Squeal.PostgreSQL.Expression: instance (Squeal.PostgreSQL.Type.Alias.Has tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, column Data.Type.Equality.~ (col Squeal.PostgreSQL.Type.Alias.::: ty)) => Squeal.PostgreSQL.Type.Alias.IsQualified tab col (Squeal.PostgreSQL.Type.Alias.Aliased (Squeal.PostgreSQL.Expression.Expression 'Squeal.PostgreSQL.Type.Alias.Ungrouped lat with db params from) column)
- Squeal.PostgreSQL.Expression: instance (Squeal.PostgreSQL.Type.Alias.Has tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, columns Data.Type.Equality.~ '[col Squeal.PostgreSQL.Type.Alias.::: ty]) => Squeal.PostgreSQL.Type.Alias.IsQualified tab col (Data.SOP.NP.NP (Squeal.PostgreSQL.Type.Alias.Aliased (Squeal.PostgreSQL.Expression.Expression 'Squeal.PostgreSQL.Type.Alias.Ungrouped lat with db params from)) columns)
- Squeal.PostgreSQL.Expression: instance (Squeal.PostgreSQL.Type.Alias.Has tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, tys Data.Type.Equality.~ '[ty]) => Squeal.PostgreSQL.Type.Alias.IsQualified tab col (Data.SOP.NP.NP (Squeal.PostgreSQL.Expression.Expression 'Squeal.PostgreSQL.Type.Alias.Ungrouped lat with db params from) tys)
- Squeal.PostgreSQL.Expression: instance (Squeal.PostgreSQL.Type.Alias.HasUnique tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, Squeal.PostgreSQL.Type.Alias.GroupedBy tab col bys, column Data.Type.Equality.~ (col Squeal.PostgreSQL.Type.Alias.::: ty)) => GHC.OverloadedLabels.IsLabel col (Squeal.PostgreSQL.Type.Alias.Aliased (Squeal.PostgreSQL.Expression.Expression ('Squeal.PostgreSQL.Type.Alias.Grouped bys) lat with db params from) column)
- Squeal.PostgreSQL.Expression: instance (Squeal.PostgreSQL.Type.Alias.HasUnique tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, Squeal.PostgreSQL.Type.Alias.GroupedBy tab col bys, columns Data.Type.Equality.~ '[col Squeal.PostgreSQL.Type.Alias.::: ty]) => GHC.OverloadedLabels.IsLabel col (Data.SOP.NP.NP (Squeal.PostgreSQL.Type.Alias.Aliased (Squeal.PostgreSQL.Expression.Expression ('Squeal.PostgreSQL.Type.Alias.Grouped bys) lat with db params from)) columns)
- Squeal.PostgreSQL.Expression: instance (Squeal.PostgreSQL.Type.Alias.HasUnique tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, Squeal.PostgreSQL.Type.Alias.GroupedBy tab col bys, tys Data.Type.Equality.~ '[ty]) => GHC.OverloadedLabels.IsLabel col (Data.SOP.NP.NP (Squeal.PostgreSQL.Expression.Expression ('Squeal.PostgreSQL.Type.Alias.Grouped bys) lat with db params from) tys)
- Squeal.PostgreSQL.Expression: instance (Squeal.PostgreSQL.Type.Alias.HasUnique tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, column Data.Type.Equality.~ (col Squeal.PostgreSQL.Type.Alias.::: ty)) => GHC.OverloadedLabels.IsLabel col (Squeal.PostgreSQL.Type.Alias.Aliased (Squeal.PostgreSQL.Expression.Expression 'Squeal.PostgreSQL.Type.Alias.Ungrouped lat with db params from) column)
- Squeal.PostgreSQL.Expression: instance (Squeal.PostgreSQL.Type.Alias.HasUnique tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, columns Data.Type.Equality.~ '[col Squeal.PostgreSQL.Type.Alias.::: ty]) => GHC.OverloadedLabels.IsLabel col (Data.SOP.NP.NP (Squeal.PostgreSQL.Type.Alias.Aliased (Squeal.PostgreSQL.Expression.Expression 'Squeal.PostgreSQL.Type.Alias.Ungrouped lat with db params from)) columns)
- Squeal.PostgreSQL.Expression: instance (Squeal.PostgreSQL.Type.Alias.HasUnique tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, tys Data.Type.Equality.~ '[ty]) => GHC.OverloadedLabels.IsLabel col (Data.SOP.NP.NP (Squeal.PostgreSQL.Expression.Expression 'Squeal.PostgreSQL.Type.Alias.Ungrouped lat with db params from) tys)
- Squeal.PostgreSQL.Expression.Inline: instance (Squeal.PostgreSQL.Expression.Inline.Inline x, pg Data.Type.Equality.~ Squeal.PostgreSQL.Type.PG.PG x) => Squeal.PostgreSQL.Expression.Inline.InlineParam (GHC.Maybe.Maybe x) ('Squeal.PostgreSQL.Type.Schema.Null pg)
- Squeal.PostgreSQL.Expression.Inline: instance (Squeal.PostgreSQL.Expression.Inline.Inline x, pg Data.Type.Equality.~ Squeal.PostgreSQL.Type.PG.PG x) => Squeal.PostgreSQL.Expression.Inline.InlineParam x ('Squeal.PostgreSQL.Type.Schema.NotNull pg)
- Squeal.PostgreSQL.Expression.Parameter: instance (GHC.TypeNats.KnownNat n, Squeal.PostgreSQL.Expression.Parameter.HasParameter (n GHC.TypeNats.- 1) xs x, params Data.Type.Equality.~ (y : xs)) => Squeal.PostgreSQL.Expression.Parameter.HasParameter n params x
- Squeal.PostgreSQL.Expression.Parameter: instance (params Data.Type.Equality.~ (x : xs)) => Squeal.PostgreSQL.Expression.Parameter.HasParameter 1 params x
- Squeal.PostgreSQL.Expression.Type: instance (Squeal.PostgreSQL.Type.Schema.UserType db ('Squeal.PostgreSQL.Type.Schema.PGcomposite row) Data.Type.Equality.~ '(sch, td), Squeal.PostgreSQL.Type.Alias.Has sch db schema, Squeal.PostgreSQL.Type.Alias.Has td schema ('Squeal.PostgreSQL.Type.Schema.Typedef ('Squeal.PostgreSQL.Type.Schema.PGcomposite row))) => Squeal.PostgreSQL.Expression.Type.PGTyped db ('Squeal.PostgreSQL.Type.Schema.PGcomposite row)
- Squeal.PostgreSQL.Expression.Type: instance (Squeal.PostgreSQL.Type.Schema.UserType db ('Squeal.PostgreSQL.Type.Schema.PGenum labels) Data.Type.Equality.~ '(sch, td), Squeal.PostgreSQL.Type.Alias.Has sch db schema, Squeal.PostgreSQL.Type.Alias.Has td schema ('Squeal.PostgreSQL.Type.Schema.Typedef ('Squeal.PostgreSQL.Type.Schema.PGenum labels))) => Squeal.PostgreSQL.Expression.Type.PGTyped db ('Squeal.PostgreSQL.Type.Schema.PGenum labels)
- Squeal.PostgreSQL.Query.Select: instance (GHC.TypeLits.KnownSymbol col, row Data.Type.Equality.~ '[col Squeal.PostgreSQL.Type.Alias.::: ty]) => Squeal.PostgreSQL.Type.Alias.Aliasable col (Squeal.PostgreSQL.Expression.Expression grp lat with db params from ty) (Squeal.PostgreSQL.Query.Select.Selection grp lat with db params from row)
- Squeal.PostgreSQL.Query.Select: instance (Squeal.PostgreSQL.Type.Alias.Has tab (Squeal.PostgreSQL.Type.List.Join from lat) row0, Squeal.PostgreSQL.Type.Alias.Has col row0 ty, row1 Data.Type.Equality.~ '[col Squeal.PostgreSQL.Type.Alias.::: ty]) => Squeal.PostgreSQL.Type.Alias.IsQualified tab col (Squeal.PostgreSQL.Query.Select.Selection 'Squeal.PostgreSQL.Type.Alias.Ungrouped lat with db params from row1)
- Squeal.PostgreSQL.Query.Select: instance (Squeal.PostgreSQL.Type.Alias.Has tab (Squeal.PostgreSQL.Type.List.Join from lat) row0, Squeal.PostgreSQL.Type.Alias.Has col row0 ty, row1 Data.Type.Equality.~ '[col Squeal.PostgreSQL.Type.Alias.::: ty], Squeal.PostgreSQL.Type.Alias.GroupedBy tab col bys) => Squeal.PostgreSQL.Type.Alias.IsQualified tab col (Squeal.PostgreSQL.Query.Select.Selection ('Squeal.PostgreSQL.Type.Alias.Grouped bys) lat with db params from row1)
- Squeal.PostgreSQL.Query.Select: instance (Squeal.PostgreSQL.Type.Alias.HasUnique tab (Squeal.PostgreSQL.Type.List.Join from lat) row0, Squeal.PostgreSQL.Type.Alias.Has col row0 ty, row1 Data.Type.Equality.~ '[col Squeal.PostgreSQL.Type.Alias.::: ty]) => GHC.OverloadedLabels.IsLabel col (Squeal.PostgreSQL.Query.Select.Selection 'Squeal.PostgreSQL.Type.Alias.Ungrouped lat with db params from row1)
- Squeal.PostgreSQL.Query.Select: instance (Squeal.PostgreSQL.Type.Alias.HasUnique tab (Squeal.PostgreSQL.Type.List.Join from lat) row0, Squeal.PostgreSQL.Type.Alias.Has col row0 ty, row1 Data.Type.Equality.~ '[col Squeal.PostgreSQL.Type.Alias.::: ty], Squeal.PostgreSQL.Type.Alias.GroupedBy tab col bys) => GHC.OverloadedLabels.IsLabel col (Squeal.PostgreSQL.Query.Select.Selection ('Squeal.PostgreSQL.Type.Alias.Grouped bys) lat with db params from row1)
- Squeal.PostgreSQL.Query.Table: instance (Squeal.PostgreSQL.Type.Alias.Has rel rels cols, Squeal.PostgreSQL.Type.Alias.Has col cols ty, by Data.Type.Equality.~ '(rel, col)) => Squeal.PostgreSQL.Type.Alias.IsQualified rel col (Squeal.PostgreSQL.Query.Table.By rels by)
- Squeal.PostgreSQL.Query.Table: instance (Squeal.PostgreSQL.Type.Alias.Has rel rels cols, Squeal.PostgreSQL.Type.Alias.Has col cols ty, bys Data.Type.Equality.~ '[ '(rel, col)]) => Squeal.PostgreSQL.Type.Alias.IsQualified rel col (Data.SOP.NP.NP (Squeal.PostgreSQL.Query.Table.By rels) bys)
- Squeal.PostgreSQL.Query.Table: instance (Squeal.PostgreSQL.Type.Alias.HasUnique rel rels cols, Squeal.PostgreSQL.Type.Alias.Has col cols ty, by Data.Type.Equality.~ '(rel, col)) => GHC.OverloadedLabels.IsLabel col (Squeal.PostgreSQL.Query.Table.By rels by)
- Squeal.PostgreSQL.Query.Table: instance (Squeal.PostgreSQL.Type.Alias.HasUnique rel rels cols, Squeal.PostgreSQL.Type.Alias.Has col cols ty, bys Data.Type.Equality.~ '[ '(rel, col)]) => GHC.OverloadedLabels.IsLabel col (Data.SOP.NP.NP (Squeal.PostgreSQL.Query.Table.By rels) bys)
- Squeal.PostgreSQL.Query.Table: instance forall k1 k2 (grp :: k2) (from :: k1). Squeal.PostgreSQL.Render.RenderSQL (Squeal.PostgreSQL.Query.Table.GroupByClause grp from)
- Squeal.PostgreSQL.Query.With: instance (GHC.TypeLits.KnownSymbol cte, with1 Data.Type.Equality.~ ((cte Squeal.PostgreSQL.Type.Alias.::: common) : with)) => Squeal.PostgreSQL.Type.Alias.Aliasable cte (statement with db params common) (Control.Category.Free.Path (Squeal.PostgreSQL.Query.With.CommonTableExpression statement db params) with with1)
- Squeal.PostgreSQL.Query.With: instance (GHC.TypeLits.KnownSymbol cte, with1 Data.Type.Equality.~ ((cte Squeal.PostgreSQL.Type.Alias.::: common) : with)) => Squeal.PostgreSQL.Type.Alias.Aliasable cte (statement with db params common) (Squeal.PostgreSQL.Query.With.CommonTableExpression statement db params with with1)
- Squeal.PostgreSQL.Session: instance (Control.Monad.Catch.MonadCatch m, db0 Data.Type.Equality.~ db1) => Control.Monad.Catch.MonadCatch (Squeal.PostgreSQL.Session.PQ db0 db1 m)
- Squeal.PostgreSQL.Session: instance (Control.Monad.Catch.MonadMask m, db0 Data.Type.Equality.~ db1) => Control.Monad.Catch.MonadMask (Squeal.PostgreSQL.Session.PQ db0 db1 m)
- Squeal.PostgreSQL.Session: instance (Control.Monad.Catch.MonadThrow m, db0 Data.Type.Equality.~ db1) => Control.Monad.Catch.MonadThrow (Squeal.PostgreSQL.Session.PQ db0 db1 m)
- Squeal.PostgreSQL.Session: instance (Control.Monad.IO.Class.MonadIO io, db0 Data.Type.Equality.~ db, db1 Data.Type.Equality.~ db) => Squeal.PostgreSQL.Session.Monad.MonadPQ db (Squeal.PostgreSQL.Session.PQ db0 db1 io)
- Squeal.PostgreSQL.Session: instance (Control.Monad.IO.Class.MonadIO m, schema0 Data.Type.Equality.~ schema1) => Control.Monad.IO.Class.MonadIO (Squeal.PostgreSQL.Session.PQ schema0 schema1 m)
- Squeal.PostgreSQL.Session: instance (Control.Monad.IO.Unlift.MonadUnliftIO m, db0 Data.Type.Equality.~ db1) => Control.Monad.IO.Unlift.MonadUnliftIO (Squeal.PostgreSQL.Session.PQ db0 db1 m)
- Squeal.PostgreSQL.Session: instance (Control.Monad.Trans.Control.MonadBaseControl b m, schema0 Data.Type.Equality.~ schema1) => Control.Monad.Trans.Control.MonadBaseControl b (Squeal.PostgreSQL.Session.PQ schema0 schema1 m)
- Squeal.PostgreSQL.Session: instance (GHC.Base.Monad m, GHC.Base.Monoid r, db0 Data.Type.Equality.~ db1) => GHC.Base.Monoid (Squeal.PostgreSQL.Session.PQ db0 db1 m r)
- Squeal.PostgreSQL.Session: instance (GHC.Base.Monad m, GHC.Base.Semigroup r, db0 Data.Type.Equality.~ db1) => GHC.Base.Semigroup (Squeal.PostgreSQL.Session.PQ db0 db1 m r)
- Squeal.PostgreSQL.Session: instance (GHC.Base.Monad m, db0 Data.Type.Equality.~ db1) => Control.Monad.Fail.MonadFail (Squeal.PostgreSQL.Session.PQ db0 db1 m)
- Squeal.PostgreSQL.Session: instance (GHC.Base.Monad m, db0 Data.Type.Equality.~ db1) => GHC.Base.Applicative (Squeal.PostgreSQL.Session.PQ db0 db1 m)
- Squeal.PostgreSQL.Session: instance (GHC.Base.Monad m, db0 Data.Type.Equality.~ db1) => GHC.Base.Monad (Squeal.PostgreSQL.Session.PQ db0 db1 m)
- Squeal.PostgreSQL.Session: instance (db0 Data.Type.Equality.~ db1) => Control.Monad.Morph.MFunctor (Squeal.PostgreSQL.Session.PQ db0 db1)
- Squeal.PostgreSQL.Session: instance (db0 Data.Type.Equality.~ db1) => Control.Monad.Morph.MMonad (Squeal.PostgreSQL.Session.PQ db0 db1)
- Squeal.PostgreSQL.Session: instance (db0 Data.Type.Equality.~ db1) => Control.Monad.Trans.Class.MonadTrans (Squeal.PostgreSQL.Session.PQ db0 db1)
- Squeal.PostgreSQL.Session: instance (db0 Data.Type.Equality.~ db1) => Control.Monad.Trans.Control.MonadTransControl (Squeal.PostgreSQL.Session.PQ db0 db1)
- Squeal.PostgreSQL.Session.Connection: newtype K a (b :: k) :: forall k. () => Type -> k -> Type
- Squeal.PostgreSQL.Session.Decode: instance (Generics.SOP.Record.IsRecord y ys, Data.SOP.Constraint.AllZip Squeal.PostgreSQL.Session.Decode.FromField row ys, Squeal.PostgreSQL.Type.PG.RowPG y Data.Type.Equality.~ row) => Squeal.PostgreSQL.Session.Decode.FromPG (Squeal.PostgreSQL.Type.Composite y)
- Squeal.PostgreSQL.Session.Decode: instance (Generics.SOP.Universe.IsEnumType y, Generics.SOP.Universe.HasDatatypeInfo y, Squeal.PostgreSQL.Type.PG.LabelsPG y Data.Type.Equality.~ labels) => Squeal.PostgreSQL.Session.Decode.FromPG (Squeal.PostgreSQL.Type.Enumerated y)
- Squeal.PostgreSQL.Session.Decode: instance (Generics.SOP.Universe.IsProductType product ys, Squeal.PostgreSQL.Type.List.Length ys Data.Type.Equality.~ dim, Data.SOP.Constraint.All ((Data.Type.Equality.~) y) ys, Squeal.PostgreSQL.Session.Decode.FromArray dims ty y) => Squeal.PostgreSQL.Session.Decode.FromArray (dim : dims) ty product
- Squeal.PostgreSQL.Session.Decode: instance (Squeal.PostgreSQL.Session.Decode.FromArray '[] ty y, ty Data.Type.Equality.~ Squeal.PostgreSQL.Type.PG.NullPG y) => Squeal.PostgreSQL.Session.Decode.FromPG (Squeal.PostgreSQL.Type.VarArray (Data.Vector.Vector y))
- Squeal.PostgreSQL.Session.Decode: instance (Squeal.PostgreSQL.Session.Decode.FromArray '[] ty y, ty Data.Type.Equality.~ Squeal.PostgreSQL.Type.PG.NullPG y) => Squeal.PostgreSQL.Session.Decode.FromPG (Squeal.PostgreSQL.Type.VarArray [y])
- Squeal.PostgreSQL.Session.Decode: instance (Squeal.PostgreSQL.Session.Decode.FromPG y, pg Data.Type.Equality.~ Squeal.PostgreSQL.Type.PG.PG y) => Squeal.PostgreSQL.Session.Decode.FromArray '[] ('Squeal.PostgreSQL.Type.Schema.NotNull pg) y
- Squeal.PostgreSQL.Session.Decode: instance (Squeal.PostgreSQL.Session.Decode.FromPG y, pg Data.Type.Equality.~ Squeal.PostgreSQL.Type.PG.PG y) => Squeal.PostgreSQL.Session.Decode.FromArray '[] ('Squeal.PostgreSQL.Type.Schema.Null pg) (GHC.Maybe.Maybe y)
- Squeal.PostgreSQL.Session.Decode: instance (Squeal.PostgreSQL.Session.Decode.FromPG y, pg Data.Type.Equality.~ Squeal.PostgreSQL.Type.PG.PG y) => Squeal.PostgreSQL.Session.Decode.FromValue ('Squeal.PostgreSQL.Type.Schema.NotNull pg) y
- Squeal.PostgreSQL.Session.Decode: instance (Squeal.PostgreSQL.Session.Decode.FromPG y, pg Data.Type.Equality.~ Squeal.PostgreSQL.Type.PG.PG y) => Squeal.PostgreSQL.Session.Decode.FromValue ('Squeal.PostgreSQL.Type.Schema.Null pg) (GHC.Maybe.Maybe y)
- Squeal.PostgreSQL.Session.Decode: instance (Squeal.PostgreSQL.Session.Decode.FromValue ty y, fld0 Data.Type.Equality.~ fld1) => Squeal.PostgreSQL.Session.Decode.FromField (fld0 Squeal.PostgreSQL.Type.Alias.::: ty) (fld1 Squeal.PostgreSQL.Type.Alias.::: y)
- Squeal.PostgreSQL.Session.Decode: instance Squeal.PostgreSQL.Session.Decode.FromValue ty (GHC.Maybe.Maybe y) => GHC.OverloadedLabels.IsLabel fld (Control.Monad.Trans.Maybe.MaybeT (Squeal.PostgreSQL.Session.Decode.DecodeRow ((fld Squeal.PostgreSQL.Type.Alias.::: ty) : row)) y)
- Squeal.PostgreSQL.Session.Decode: instance Squeal.PostgreSQL.Session.Decode.FromValue ty y => GHC.OverloadedLabels.IsLabel fld (Squeal.PostgreSQL.Session.Decode.DecodeRow ((fld Squeal.PostgreSQL.Type.Alias.::: ty) : row) y)
- Squeal.PostgreSQL.Session.Encode: instance (Data.SOP.Constraint.SListI fields, Generics.SOP.Record.IsRecord x xs, Data.SOP.Constraint.AllZip (Squeal.PostgreSQL.Session.Encode.ToField db) fields xs, Data.SOP.Constraint.All (Squeal.PostgreSQL.Session.Oid.OidOfField db) fields, Squeal.PostgreSQL.Type.PG.RowPG x Data.Type.Equality.~ fields) => Squeal.PostgreSQL.Session.Encode.ToPG db (Squeal.PostgreSQL.Type.Composite x)
- Squeal.PostgreSQL.Session.Encode: instance (Generics.SOP.Universe.IsEnumType x, Generics.SOP.Universe.HasDatatypeInfo x, Squeal.PostgreSQL.Type.PG.LabelsPG x Data.Type.Equality.~ labels) => Squeal.PostgreSQL.Session.Encode.ToPG db (Squeal.PostgreSQL.Type.Enumerated x)
- Squeal.PostgreSQL.Session.Encode: instance (Generics.SOP.Universe.IsProductType tuple xs, Squeal.PostgreSQL.Type.List.Length xs Data.Type.Equality.~ dim, Data.SOP.Constraint.All ((Data.Type.Equality.~) x) xs, Squeal.PostgreSQL.Session.Encode.ToArray db dims ty x, GHC.TypeNats.KnownNat dim) => Squeal.PostgreSQL.Session.Encode.ToArray db (dim : dims) ty tuple
- Squeal.PostgreSQL.Session.Encode: instance (Squeal.PostgreSQL.Session.Encode.ToPG db x, pg Data.Type.Equality.~ Squeal.PostgreSQL.Type.PG.PG x) => Squeal.PostgreSQL.Session.Encode.ToArray db '[] ('Squeal.PostgreSQL.Type.Schema.NotNull pg) x
- Squeal.PostgreSQL.Session.Encode: instance (Squeal.PostgreSQL.Session.Encode.ToPG db x, pg Data.Type.Equality.~ Squeal.PostgreSQL.Type.PG.PG x) => Squeal.PostgreSQL.Session.Encode.ToArray db '[] ('Squeal.PostgreSQL.Type.Schema.Null pg) (GHC.Maybe.Maybe x)
- Squeal.PostgreSQL.Session.Encode: instance (Squeal.PostgreSQL.Session.Encode.ToPG db x, pg Data.Type.Equality.~ Squeal.PostgreSQL.Type.PG.PG x) => Squeal.PostgreSQL.Session.Encode.ToParam db ('Squeal.PostgreSQL.Type.Schema.NotNull pg) x
- Squeal.PostgreSQL.Session.Encode: instance (Squeal.PostgreSQL.Session.Encode.ToPG db x, pg Data.Type.Equality.~ Squeal.PostgreSQL.Type.PG.PG x) => Squeal.PostgreSQL.Session.Encode.ToParam db ('Squeal.PostgreSQL.Type.Schema.Null pg) (GHC.Maybe.Maybe x)
- Squeal.PostgreSQL.Session.Encode: instance (Squeal.PostgreSQL.Type.PG.NullPG x Data.Type.Equality.~ ty, Squeal.PostgreSQL.Session.Encode.ToArray db '[] ty x, Squeal.PostgreSQL.Session.Oid.OidOfNull db ty) => Squeal.PostgreSQL.Session.Encode.ToPG db (Squeal.PostgreSQL.Type.VarArray (Data.Vector.Vector x))
- Squeal.PostgreSQL.Session.Encode: instance (Squeal.PostgreSQL.Type.PG.NullPG x Data.Type.Equality.~ ty, Squeal.PostgreSQL.Session.Encode.ToArray db '[] ty x, Squeal.PostgreSQL.Session.Oid.OidOfNull db ty) => Squeal.PostgreSQL.Session.Encode.ToPG db (Squeal.PostgreSQL.Type.VarArray [x])
- Squeal.PostgreSQL.Session.Encode: instance (fld0 Data.Type.Equality.~ fld1, Squeal.PostgreSQL.Session.Encode.ToParam db ty x) => Squeal.PostgreSQL.Session.Encode.ToField db (fld0 Squeal.PostgreSQL.Type.Alias.::: ty) (fld1 Squeal.PostgreSQL.Type.Alias.::: x)
- Squeal.PostgreSQL.Session.Migration: data IsoQ (c :: k -> k -> Type) (x :: k) (y :: k) :: forall k. () => k -> k -> Type -> k -> k -> Type
- Squeal.PostgreSQL.Session.Oid: instance (Squeal.PostgreSQL.Type.Schema.UserType db ('Squeal.PostgreSQL.Type.Schema.PGcomposite row) Data.Type.Equality.~ '(sch, td), Squeal.PostgreSQL.Type.Alias.Has sch db schema, Squeal.PostgreSQL.Type.Alias.Has td schema ('Squeal.PostgreSQL.Type.Schema.Typedef ('Squeal.PostgreSQL.Type.Schema.PGcomposite row))) => Squeal.PostgreSQL.Session.Oid.OidOf db ('Squeal.PostgreSQL.Type.Schema.PGcomposite row)
- Squeal.PostgreSQL.Session.Oid: instance (Squeal.PostgreSQL.Type.Schema.UserType db ('Squeal.PostgreSQL.Type.Schema.PGcomposite row) Data.Type.Equality.~ '(sch, td), Squeal.PostgreSQL.Type.Alias.Has sch db schema, Squeal.PostgreSQL.Type.Alias.Has td schema ('Squeal.PostgreSQL.Type.Schema.Typedef ('Squeal.PostgreSQL.Type.Schema.PGcomposite row))) => Squeal.PostgreSQL.Session.Oid.OidOfArray db ('Squeal.PostgreSQL.Type.Schema.PGcomposite row)
- Squeal.PostgreSQL.Session.Oid: instance (Squeal.PostgreSQL.Type.Schema.UserType db ('Squeal.PostgreSQL.Type.Schema.PGenum labels) Data.Type.Equality.~ '(sch, td), Squeal.PostgreSQL.Type.Alias.Has sch db schema, Squeal.PostgreSQL.Type.Alias.Has td schema ('Squeal.PostgreSQL.Type.Schema.Typedef ('Squeal.PostgreSQL.Type.Schema.PGenum labels))) => Squeal.PostgreSQL.Session.Oid.OidOf db ('Squeal.PostgreSQL.Type.Schema.PGenum labels)
- Squeal.PostgreSQL.Session.Oid: instance (Squeal.PostgreSQL.Type.Schema.UserType db ('Squeal.PostgreSQL.Type.Schema.PGenum labels) Data.Type.Equality.~ '(sch, td), Squeal.PostgreSQL.Type.Alias.Has sch db schema, Squeal.PostgreSQL.Type.Alias.Has td schema ('Squeal.PostgreSQL.Type.Schema.Typedef ('Squeal.PostgreSQL.Type.Schema.PGenum labels))) => Squeal.PostgreSQL.Session.Oid.OidOfArray db ('Squeal.PostgreSQL.Type.Schema.PGenum labels)
- Squeal.PostgreSQL.Session.Pool: type Pool = Pool
- Squeal.PostgreSQL.Session.Statement: type GenericParams db params x xs = (All (OidOfNull db) params, IsProductType x xs, AllZip (ToParam db) params xs)
- Squeal.PostgreSQL.Session.Statement: type GenericRow row y ys = (IsRecord y ys, AllZip FromField row ys)
- Squeal.PostgreSQL.Session.Transaction: begin :: TransactionMode -> Manipulation_ db () ()
- Squeal.PostgreSQL.Session.Transaction: commit :: Manipulation_ db () ()
- Squeal.PostgreSQL.Session.Transaction: instance GHC.Classes.Eq Squeal.PostgreSQL.Session.Transaction.AccessMode
- Squeal.PostgreSQL.Session.Transaction: instance GHC.Classes.Eq Squeal.PostgreSQL.Session.Transaction.DeferrableMode
- Squeal.PostgreSQL.Session.Transaction: instance GHC.Classes.Eq Squeal.PostgreSQL.Session.Transaction.IsolationLevel
- Squeal.PostgreSQL.Session.Transaction: instance GHC.Classes.Eq Squeal.PostgreSQL.Session.Transaction.TransactionMode
- Squeal.PostgreSQL.Session.Transaction: instance GHC.Show.Show Squeal.PostgreSQL.Session.Transaction.AccessMode
- Squeal.PostgreSQL.Session.Transaction: instance GHC.Show.Show Squeal.PostgreSQL.Session.Transaction.DeferrableMode
- Squeal.PostgreSQL.Session.Transaction: instance GHC.Show.Show Squeal.PostgreSQL.Session.Transaction.IsolationLevel
- Squeal.PostgreSQL.Session.Transaction: instance GHC.Show.Show Squeal.PostgreSQL.Session.Transaction.TransactionMode
- Squeal.PostgreSQL.Session.Transaction: instance Squeal.PostgreSQL.Render.RenderSQL Squeal.PostgreSQL.Session.Transaction.AccessMode
- Squeal.PostgreSQL.Session.Transaction: instance Squeal.PostgreSQL.Render.RenderSQL Squeal.PostgreSQL.Session.Transaction.DeferrableMode
- Squeal.PostgreSQL.Session.Transaction: instance Squeal.PostgreSQL.Render.RenderSQL Squeal.PostgreSQL.Session.Transaction.IsolationLevel
- Squeal.PostgreSQL.Session.Transaction: instance Squeal.PostgreSQL.Render.RenderSQL Squeal.PostgreSQL.Session.Transaction.TransactionMode
- Squeal.PostgreSQL.Session.Transaction: rollback :: Manipulation_ db () ()
- Squeal.PostgreSQL.Type.Alias: instance (alias0 Data.Type.Equality.~ alias1, alias0 Data.Type.Equality.~ alias2, GHC.TypeLits.KnownSymbol alias2) => GHC.OverloadedLabels.IsLabel alias0 (Squeal.PostgreSQL.Type.Alias.Aliased Squeal.PostgreSQL.Type.Alias.Alias (alias1 Squeal.PostgreSQL.Type.Alias.::: alias2))
- Squeal.PostgreSQL.Type.Alias: instance (alias1 Data.Type.Equality.~ alias2) => GHC.OverloadedLabels.IsLabel alias1 (Squeal.PostgreSQL.Type.Alias.Alias alias2)
- Squeal.PostgreSQL.Type.Alias: instance (aliases Data.Type.Equality.~ '[alias]) => GHC.OverloadedLabels.IsLabel alias (Data.SOP.NP.NP Squeal.PostgreSQL.Type.Alias.Alias aliases)
- Squeal.PostgreSQL.Type.Alias: instance (q Data.Type.Equality.~ "public", a0 Data.Type.Equality.~ a1, a1 Data.Type.Equality.~ a2, GHC.TypeLits.KnownSymbol a2) => GHC.OverloadedLabels.IsLabel a0 (Squeal.PostgreSQL.Type.Alias.Aliased (Squeal.PostgreSQL.Type.Alias.QualifiedAlias q) (a1 Squeal.PostgreSQL.Type.Alias.::: a2))
- Squeal.PostgreSQL.Type.Alias: instance (q Data.Type.Equality.~ q', a Data.Type.Equality.~ a') => Squeal.PostgreSQL.Type.Alias.IsQualified q a (Squeal.PostgreSQL.Type.Alias.QualifiedAlias q' a')
- Squeal.PostgreSQL.Type.Alias: instance (q' Data.Type.Equality.~ "public", a Data.Type.Equality.~ a') => GHC.OverloadedLabels.IsLabel a (Squeal.PostgreSQL.Type.Alias.QualifiedAlias q' a')
- Squeal.PostgreSQL.Type.Alias: instance (q0 Data.Type.Equality.~ q1, a0 Data.Type.Equality.~ a1, a1 Data.Type.Equality.~ a2, GHC.TypeLits.KnownSymbol a2) => Squeal.PostgreSQL.Type.Alias.IsQualified q0 a0 (Squeal.PostgreSQL.Type.Alias.Aliased (Squeal.PostgreSQL.Type.Alias.QualifiedAlias q1) (a1 Squeal.PostgreSQL.Type.Alias.::: a2))
- Squeal.PostgreSQL.Type.Alias: instance forall k (alias :: GHC.Types.Symbol) (aliased :: (GHC.Types.Symbol, k)) (ty :: k) (expression :: k -> *). (GHC.TypeLits.KnownSymbol alias, aliased Data.Type.Equality.~ (alias Squeal.PostgreSQL.Type.Alias.::: ty)) => Squeal.PostgreSQL.Type.Alias.Aliasable alias (expression ty) (Squeal.PostgreSQL.Type.Alias.Aliased expression aliased)
- Squeal.PostgreSQL.Type.Alias: instance forall k (alias :: GHC.Types.Symbol) (tys :: [(GHC.Types.Symbol, k)]) (ty :: k) (expression :: k -> *). (GHC.TypeLits.KnownSymbol alias, tys Data.Type.Equality.~ '[alias Squeal.PostgreSQL.Type.Alias.::: ty]) => Squeal.PostgreSQL.Type.Alias.Aliasable alias (expression ty) (Data.SOP.NP.NP (Squeal.PostgreSQL.Type.Alias.Aliased expression) tys)
- Squeal.PostgreSQL.Type.Alias: instance forall k kind (alias :: GHC.Types.Symbol) (field0 :: kind) (field1 :: kind) (err :: k) (fields :: [(GHC.Types.Symbol, kind)]). (GHC.TypeLits.KnownSymbol alias, field0 Data.Type.Equality.~ field1) => Squeal.PostgreSQL.Type.Alias.HasErr err alias ((alias Squeal.PostgreSQL.Type.Alias.::: field0) : fields) field1
- Squeal.PostgreSQL.Type.Alias: instance forall kind k (alias :: GHC.Types.Symbol) (err :: k) (fields :: [(GHC.Types.Symbol, kind)]) (field :: kind) (field' :: (GHC.Types.Symbol, kind)). (GHC.TypeLits.KnownSymbol alias, Squeal.PostgreSQL.Type.Alias.HasErr err alias fields field) => Squeal.PostgreSQL.Type.Alias.HasErr err alias (field' : fields) field
- Squeal.PostgreSQL.Type.List: data Path (p :: k -> k -> Type) (x :: k) (y :: k) :: forall k. () => k -> k -> Type -> k -> k -> Type
- Squeal.PostgreSQL.Type.Schema: instance (label Data.Type.Equality.~ label1) => Squeal.PostgreSQL.Type.Schema.IsPGlabel label (Squeal.PostgreSQL.Type.Schema.PGlabel label1)
- Squeal.PostgreSQL.Type.Schema: instance (labels Data.Type.Equality.~ '[label]) => Squeal.PostgreSQL.Type.Schema.IsPGlabel label (Data.SOP.NP.NP Squeal.PostgreSQL.Type.Schema.PGlabel labels)
- Squeal.PostgreSQL.Type.Schema: instance forall k (ty0 :: k) (ty1 :: k) (alias0 :: GHC.Types.Symbol) (def0 :: Squeal.PostgreSQL.Type.Schema.Optionality) (null0 :: k -> Squeal.PostgreSQL.Type.Schema.NullType) (alias1 :: GHC.Types.Symbol) (def1 :: Squeal.PostgreSQL.Type.Schema.Optionality) (null1 :: k -> Squeal.PostgreSQL.Type.Schema.NullType). (ty0 Data.Type.Equality.~ ty1) => Squeal.PostgreSQL.Type.Schema.SamePGType (alias0 Squeal.PostgreSQL.Type.Alias.::: (def0 Squeal.PostgreSQL.Type.Schema.:=> null0 ty0)) (alias1 Squeal.PostgreSQL.Type.Alias.::: (def1 Squeal.PostgreSQL.Type.Schema.:=> null1 ty1))
- Squeal.PostgreSQL.Type.Schema: instance forall k1 k2 (alias :: k2) (a :: k1). (TypeError ...) => Squeal.PostgreSQL.Type.Schema.IsNotElem '(alias, a) 'GHC.Types.True
+ Squeal.PostgreSQL.Definition: instance (db0 GHC.Types.~ db1) => GHC.Base.Monoid (Squeal.PostgreSQL.Definition.Definition db0 db1)
+ Squeal.PostgreSQL.Definition: instance (db0 GHC.Types.~ db1) => GHC.Base.Semigroup (Squeal.PostgreSQL.Definition.Definition db0 db1)
+ Squeal.PostgreSQL.Definition.Function: instance forall k1 k2 k3 (db :: k1) (args :: k2) (ret :: k3). Squeal.PostgreSQL.Render.RenderSQL (Squeal.PostgreSQL.Definition.Function.FunctionDefinition db args ret)
+ Squeal.PostgreSQL.Definition.Procedure: instance forall k1 k2 (db :: k1) (args :: k2). Squeal.PostgreSQL.Render.RenderSQL (Squeal.PostgreSQL.Definition.Procedure.ProcedureDefinition db args)
+ Squeal.PostgreSQL.Expression: infix 4 <@
+ Squeal.PostgreSQL.Expression: instance (Squeal.PostgreSQL.Type.Alias.Has tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, Squeal.PostgreSQL.Type.Alias.GroupedBy tab col bys, column GHC.Types.~ (col Squeal.PostgreSQL.Type.Alias.::: ty)) => Squeal.PostgreSQL.Type.Alias.IsQualified tab col (Squeal.PostgreSQL.Type.Alias.Aliased (Squeal.PostgreSQL.Expression.Expression ('Squeal.PostgreSQL.Type.Alias.Grouped bys) lat with db params from) column)
+ Squeal.PostgreSQL.Expression: instance (Squeal.PostgreSQL.Type.Alias.Has tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, Squeal.PostgreSQL.Type.Alias.GroupedBy tab col bys, columns GHC.Types.~ '[col Squeal.PostgreSQL.Type.Alias.::: ty]) => Squeal.PostgreSQL.Type.Alias.IsQualified tab col (Data.SOP.NP.NP (Squeal.PostgreSQL.Type.Alias.Aliased (Squeal.PostgreSQL.Expression.Expression ('Squeal.PostgreSQL.Type.Alias.Grouped bys) lat with db params from)) columns)
+ Squeal.PostgreSQL.Expression: instance (Squeal.PostgreSQL.Type.Alias.Has tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, Squeal.PostgreSQL.Type.Alias.GroupedBy tab col bys, tys GHC.Types.~ '[ty]) => Squeal.PostgreSQL.Type.Alias.IsQualified tab col (Data.SOP.NP.NP (Squeal.PostgreSQL.Expression.Expression ('Squeal.PostgreSQL.Type.Alias.Grouped bys) lat with db params from) tys)
+ Squeal.PostgreSQL.Expression: instance (Squeal.PostgreSQL.Type.Alias.Has tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, column GHC.Types.~ (col Squeal.PostgreSQL.Type.Alias.::: ty)) => Squeal.PostgreSQL.Type.Alias.IsQualified tab col (Squeal.PostgreSQL.Type.Alias.Aliased (Squeal.PostgreSQL.Expression.Expression 'Squeal.PostgreSQL.Type.Alias.Ungrouped lat with db params from) column)
+ Squeal.PostgreSQL.Expression: instance (Squeal.PostgreSQL.Type.Alias.Has tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, columns GHC.Types.~ '[col Squeal.PostgreSQL.Type.Alias.::: ty]) => Squeal.PostgreSQL.Type.Alias.IsQualified tab col (Data.SOP.NP.NP (Squeal.PostgreSQL.Type.Alias.Aliased (Squeal.PostgreSQL.Expression.Expression 'Squeal.PostgreSQL.Type.Alias.Ungrouped lat with db params from)) columns)
+ Squeal.PostgreSQL.Expression: instance (Squeal.PostgreSQL.Type.Alias.Has tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, tys GHC.Types.~ '[ty]) => Squeal.PostgreSQL.Type.Alias.IsQualified tab col (Data.SOP.NP.NP (Squeal.PostgreSQL.Expression.Expression 'Squeal.PostgreSQL.Type.Alias.Ungrouped lat with db params from) tys)
+ Squeal.PostgreSQL.Expression: instance (Squeal.PostgreSQL.Type.Alias.HasUnique tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, Squeal.PostgreSQL.Type.Alias.GroupedBy tab col bys, column GHC.Types.~ (col Squeal.PostgreSQL.Type.Alias.::: ty)) => GHC.OverloadedLabels.IsLabel col (Squeal.PostgreSQL.Type.Alias.Aliased (Squeal.PostgreSQL.Expression.Expression ('Squeal.PostgreSQL.Type.Alias.Grouped bys) lat with db params from) column)
+ Squeal.PostgreSQL.Expression: instance (Squeal.PostgreSQL.Type.Alias.HasUnique tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, Squeal.PostgreSQL.Type.Alias.GroupedBy tab col bys, columns GHC.Types.~ '[col Squeal.PostgreSQL.Type.Alias.::: ty]) => GHC.OverloadedLabels.IsLabel col (Data.SOP.NP.NP (Squeal.PostgreSQL.Type.Alias.Aliased (Squeal.PostgreSQL.Expression.Expression ('Squeal.PostgreSQL.Type.Alias.Grouped bys) lat with db params from)) columns)
+ Squeal.PostgreSQL.Expression: instance (Squeal.PostgreSQL.Type.Alias.HasUnique tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, Squeal.PostgreSQL.Type.Alias.GroupedBy tab col bys, tys GHC.Types.~ '[ty]) => GHC.OverloadedLabels.IsLabel col (Data.SOP.NP.NP (Squeal.PostgreSQL.Expression.Expression ('Squeal.PostgreSQL.Type.Alias.Grouped bys) lat with db params from) tys)
+ Squeal.PostgreSQL.Expression: instance (Squeal.PostgreSQL.Type.Alias.HasUnique tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, column GHC.Types.~ (col Squeal.PostgreSQL.Type.Alias.::: ty)) => GHC.OverloadedLabels.IsLabel col (Squeal.PostgreSQL.Type.Alias.Aliased (Squeal.PostgreSQL.Expression.Expression 'Squeal.PostgreSQL.Type.Alias.Ungrouped lat with db params from) column)
+ Squeal.PostgreSQL.Expression: instance (Squeal.PostgreSQL.Type.Alias.HasUnique tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, columns GHC.Types.~ '[col Squeal.PostgreSQL.Type.Alias.::: ty]) => GHC.OverloadedLabels.IsLabel col (Data.SOP.NP.NP (Squeal.PostgreSQL.Type.Alias.Aliased (Squeal.PostgreSQL.Expression.Expression 'Squeal.PostgreSQL.Type.Alias.Ungrouped lat with db params from)) columns)
+ Squeal.PostgreSQL.Expression: instance (Squeal.PostgreSQL.Type.Alias.HasUnique tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, tys GHC.Types.~ '[ty]) => GHC.OverloadedLabels.IsLabel col (Data.SOP.NP.NP (Squeal.PostgreSQL.Expression.Expression 'Squeal.PostgreSQL.Type.Alias.Ungrouped lat with db params from) tys)
+ Squeal.PostgreSQL.Expression.Aggregate: instance (Squeal.PostgreSQL.Type.Alias.Has tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty) => Squeal.PostgreSQL.Type.Alias.IsQualified tab col (Squeal.PostgreSQL.Expression.Aggregate.AggregateArg '[ty] lat with db params from)
+ Squeal.PostgreSQL.Expression.Aggregate: instance (Squeal.PostgreSQL.Type.Alias.HasUnique tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty) => GHC.OverloadedLabels.IsLabel col (Squeal.PostgreSQL.Expression.Aggregate.AggregateArg '[ty] lat with db params from)
+ Squeal.PostgreSQL.Expression.Inline: instance (Squeal.PostgreSQL.Expression.Inline.Inline x, pg GHC.Types.~ Squeal.PostgreSQL.Type.PG.PG x) => Squeal.PostgreSQL.Expression.Inline.InlineParam (GHC.Maybe.Maybe x) ('Squeal.PostgreSQL.Type.Schema.Null pg)
+ Squeal.PostgreSQL.Expression.Inline: instance (Squeal.PostgreSQL.Expression.Inline.Inline x, pg GHC.Types.~ Squeal.PostgreSQL.Type.PG.PG x) => Squeal.PostgreSQL.Expression.Inline.InlineParam x ('Squeal.PostgreSQL.Type.Schema.NotNull pg)
+ Squeal.PostgreSQL.Expression.Inline: instance Squeal.PostgreSQL.Expression.Inline.Inline x => Squeal.PostgreSQL.Expression.Inline.Inline (Data.Functor.Const.Const x tag)
+ Squeal.PostgreSQL.Expression.Inline: instance Squeal.PostgreSQL.Expression.Inline.Inline x => Squeal.PostgreSQL.Expression.Inline.Inline (Data.Functor.Constant.Constant x tag)
+ Squeal.PostgreSQL.Expression.Inline: instance Squeal.PostgreSQL.Expression.Inline.Inline x => Squeal.PostgreSQL.Expression.Inline.Inline (Data.SOP.BasicFunctors.K x tag)
+ Squeal.PostgreSQL.Expression.Json: jsonArrayElementsText :: null 'PGjson -|-> ("json_array_elements_text" ::: '["value" ::: 'NotNull 'PGtext])
+ Squeal.PostgreSQL.Expression.Json: jsonbArrayElementsText :: null 'PGjsonb -|-> ("jsonb_array_elements_text" ::: '["value" ::: 'NotNull 'PGtext])
+ Squeal.PostgreSQL.Expression.Null: type family CombineNullity (lhs :: PGType -> NullType) (rhs :: PGType -> NullType) :: PGType -> NullType
+ Squeal.PostgreSQL.Expression.Parameter: instance (GHC.TypeNats.KnownNat n, Squeal.PostgreSQL.Expression.Parameter.HasParameter (n GHC.TypeNats.- 1) xs x, params GHC.Types.~ (y : xs)) => Squeal.PostgreSQL.Expression.Parameter.HasParameter n params x
+ Squeal.PostgreSQL.Expression.Parameter: instance (params GHC.Types.~ (x : xs)) => Squeal.PostgreSQL.Expression.Parameter.HasParameter 1 params x
+ Squeal.PostgreSQL.Expression.Text: replace :: '[null 'PGtext, null 'PGtext, null 'PGtext] ---> null 'PGtext
+ Squeal.PostgreSQL.Expression.Text: strpos :: '[null 'PGtext, null 'PGtext] ---> null 'PGint4
+ Squeal.PostgreSQL.Expression.Time: Quarter :: TimeUnit
+ Squeal.PostgreSQL.Expression.Time: atTimeZone :: zone `In` '[ 'PGtext, 'PGinterval] => Operator (null time) (null zone) (null (PGAtTimeZone time))
+ Squeal.PostgreSQL.Expression.Time: dateTrunc :: time `In` '[ 'PGtimestamp, 'PGtimestamptz] => TimeUnit -> null time --> null time
+ Squeal.PostgreSQL.Expression.Time: type family PGAtTimeZone ty
+ Squeal.PostgreSQL.Expression.Type: instance (Squeal.PostgreSQL.Type.Schema.UserType db ('Squeal.PostgreSQL.Type.Schema.PGcomposite row) GHC.Types.~ '(sch, td), Squeal.PostgreSQL.Type.Alias.Has sch db schema, Squeal.PostgreSQL.Type.Alias.Has td schema ('Squeal.PostgreSQL.Type.Schema.Typedef ('Squeal.PostgreSQL.Type.Schema.PGcomposite row))) => Squeal.PostgreSQL.Expression.Type.PGTyped db ('Squeal.PostgreSQL.Type.Schema.PGcomposite row)
+ Squeal.PostgreSQL.Expression.Type: instance (Squeal.PostgreSQL.Type.Schema.UserType db ('Squeal.PostgreSQL.Type.Schema.PGenum labels) GHC.Types.~ '(sch, td), Squeal.PostgreSQL.Type.Alias.Has sch db schema, Squeal.PostgreSQL.Type.Alias.Has td schema ('Squeal.PostgreSQL.Type.Schema.Typedef ('Squeal.PostgreSQL.Type.Schema.PGenum labels))) => Squeal.PostgreSQL.Expression.Type.PGTyped db ('Squeal.PostgreSQL.Type.Schema.PGenum labels)
+ Squeal.PostgreSQL.Expression.Window: instance (Squeal.PostgreSQL.Type.Alias.Has tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty) => Squeal.PostgreSQL.Type.Alias.IsQualified tab col (Squeal.PostgreSQL.Expression.Window.WindowArg 'Squeal.PostgreSQL.Type.Alias.Ungrouped '[ty] lat with db params from)
+ Squeal.PostgreSQL.Expression.Window: instance (Squeal.PostgreSQL.Type.Alias.Has tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, Squeal.PostgreSQL.Type.Alias.GroupedBy tab col bys) => Squeal.PostgreSQL.Type.Alias.IsQualified tab col (Squeal.PostgreSQL.Expression.Window.WindowArg ('Squeal.PostgreSQL.Type.Alias.Grouped bys) '[ty] lat with db params from)
+ Squeal.PostgreSQL.Expression.Window: instance (Squeal.PostgreSQL.Type.Alias.HasUnique tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty) => GHC.OverloadedLabels.IsLabel col (Squeal.PostgreSQL.Expression.Window.WindowArg 'Squeal.PostgreSQL.Type.Alias.Ungrouped '[ty] lat with db params from)
+ Squeal.PostgreSQL.Expression.Window: instance (Squeal.PostgreSQL.Type.Alias.HasUnique tab (Squeal.PostgreSQL.Type.List.Join from lat) row, Squeal.PostgreSQL.Type.Alias.Has col row ty, Squeal.PostgreSQL.Type.Alias.GroupedBy tab col bys) => GHC.OverloadedLabels.IsLabel col (Squeal.PostgreSQL.Expression.Window.WindowArg ('Squeal.PostgreSQL.Type.Alias.Grouped bys) '[ty] lat with db params from)
+ Squeal.PostgreSQL.Query.Select: instance (GHC.TypeLits.KnownSymbol col, row GHC.Types.~ '[col Squeal.PostgreSQL.Type.Alias.::: ty]) => Squeal.PostgreSQL.Type.Alias.Aliasable col (Squeal.PostgreSQL.Expression.Expression grp lat with db params from ty) (Squeal.PostgreSQL.Query.Select.Selection grp lat with db params from row)
+ Squeal.PostgreSQL.Query.Select: instance (Squeal.PostgreSQL.Type.Alias.Has tab (Squeal.PostgreSQL.Type.List.Join from lat) row0, Squeal.PostgreSQL.Type.Alias.Has col row0 ty, row1 GHC.Types.~ '[col Squeal.PostgreSQL.Type.Alias.::: ty]) => Squeal.PostgreSQL.Type.Alias.IsQualified tab col (Squeal.PostgreSQL.Query.Select.Selection 'Squeal.PostgreSQL.Type.Alias.Ungrouped lat with db params from row1)
+ Squeal.PostgreSQL.Query.Select: instance (Squeal.PostgreSQL.Type.Alias.Has tab (Squeal.PostgreSQL.Type.List.Join from lat) row0, Squeal.PostgreSQL.Type.Alias.Has col row0 ty, row1 GHC.Types.~ '[col Squeal.PostgreSQL.Type.Alias.::: ty], Squeal.PostgreSQL.Type.Alias.GroupedBy tab col bys) => Squeal.PostgreSQL.Type.Alias.IsQualified tab col (Squeal.PostgreSQL.Query.Select.Selection ('Squeal.PostgreSQL.Type.Alias.Grouped bys) lat with db params from row1)
+ Squeal.PostgreSQL.Query.Select: instance (Squeal.PostgreSQL.Type.Alias.HasUnique tab (Squeal.PostgreSQL.Type.List.Join from lat) row0, Squeal.PostgreSQL.Type.Alias.Has col row0 ty, row1 GHC.Types.~ '[col Squeal.PostgreSQL.Type.Alias.::: ty]) => GHC.OverloadedLabels.IsLabel col (Squeal.PostgreSQL.Query.Select.Selection 'Squeal.PostgreSQL.Type.Alias.Ungrouped lat with db params from row1)
+ Squeal.PostgreSQL.Query.Select: instance (Squeal.PostgreSQL.Type.Alias.HasUnique tab (Squeal.PostgreSQL.Type.List.Join from lat) row0, Squeal.PostgreSQL.Type.Alias.Has col row0 ty, row1 GHC.Types.~ '[col Squeal.PostgreSQL.Type.Alias.::: ty], Squeal.PostgreSQL.Type.Alias.GroupedBy tab col bys) => GHC.OverloadedLabels.IsLabel col (Squeal.PostgreSQL.Query.Select.Selection ('Squeal.PostgreSQL.Type.Alias.Grouped bys) lat with db params from row1)
+ Squeal.PostgreSQL.Query.Table: instance (Squeal.PostgreSQL.Type.Alias.Has rel rels cols, Squeal.PostgreSQL.Type.Alias.Has col cols ty, by GHC.Types.~ '(rel, col)) => Squeal.PostgreSQL.Type.Alias.IsQualified rel col (Squeal.PostgreSQL.Query.Table.By rels by)
+ Squeal.PostgreSQL.Query.Table: instance (Squeal.PostgreSQL.Type.Alias.Has rel rels cols, Squeal.PostgreSQL.Type.Alias.Has col cols ty, bys GHC.Types.~ '[ '(rel, col)]) => Squeal.PostgreSQL.Type.Alias.IsQualified rel col (Data.SOP.NP.NP (Squeal.PostgreSQL.Query.Table.By rels) bys)
+ Squeal.PostgreSQL.Query.Table: instance (Squeal.PostgreSQL.Type.Alias.HasUnique rel rels cols, Squeal.PostgreSQL.Type.Alias.Has col cols ty, by GHC.Types.~ '(rel, col)) => GHC.OverloadedLabels.IsLabel col (Squeal.PostgreSQL.Query.Table.By rels by)
+ Squeal.PostgreSQL.Query.Table: instance (Squeal.PostgreSQL.Type.Alias.HasUnique rel rels cols, Squeal.PostgreSQL.Type.Alias.Has col cols ty, bys GHC.Types.~ '[ '(rel, col)]) => GHC.OverloadedLabels.IsLabel col (Data.SOP.NP.NP (Squeal.PostgreSQL.Query.Table.By rels) bys)
+ Squeal.PostgreSQL.Query.Table: instance forall k1 k2 (grp :: k1) (from :: k2). Squeal.PostgreSQL.Render.RenderSQL (Squeal.PostgreSQL.Query.Table.GroupByClause grp from)
+ Squeal.PostgreSQL.Query.With: DefaultMaterialization :: Materialization
+ Squeal.PostgreSQL.Query.With: Materialized :: Materialization
+ Squeal.PostgreSQL.Query.With: NotMaterialized :: Materialization
+ Squeal.PostgreSQL.Query.With: data Materialization
+ Squeal.PostgreSQL.Query.With: instance (GHC.TypeLits.KnownSymbol cte, with1 GHC.Types.~ ((cte Squeal.PostgreSQL.Type.Alias.::: common) : with)) => Squeal.PostgreSQL.Type.Alias.Aliasable cte (statement with db params common) (Control.Category.Free.Path (Squeal.PostgreSQL.Query.With.CommonTableExpression statement db params) with with1)
+ Squeal.PostgreSQL.Query.With: instance (GHC.TypeLits.KnownSymbol cte, with1 GHC.Types.~ ((cte Squeal.PostgreSQL.Type.Alias.::: common) : with)) => Squeal.PostgreSQL.Type.Alias.Aliasable cte (statement with db params common) (Squeal.PostgreSQL.Query.With.CommonTableExpression statement db params with with1)
+ Squeal.PostgreSQL.Query.With: instance GHC.Classes.Eq Squeal.PostgreSQL.Query.With.Materialization
+ Squeal.PostgreSQL.Query.With: instance GHC.Classes.Ord Squeal.PostgreSQL.Query.With.Materialization
+ Squeal.PostgreSQL.Query.With: instance GHC.Enum.Enum Squeal.PostgreSQL.Query.With.Materialization
+ Squeal.PostgreSQL.Query.With: instance GHC.Generics.Generic Squeal.PostgreSQL.Query.With.Materialization
+ Squeal.PostgreSQL.Query.With: instance GHC.Read.Read Squeal.PostgreSQL.Query.With.Materialization
+ Squeal.PostgreSQL.Query.With: instance GHC.Show.Show Squeal.PostgreSQL.Query.With.Materialization
+ Squeal.PostgreSQL.Query.With: instance Generics.SOP.Universe.Generic Squeal.PostgreSQL.Query.With.Materialization
+ Squeal.PostgreSQL.Query.With: instance Generics.SOP.Universe.HasDatatypeInfo Squeal.PostgreSQL.Query.With.Materialization
+ Squeal.PostgreSQL.Query.With: instance Squeal.PostgreSQL.Render.RenderSQL Squeal.PostgreSQL.Query.With.Materialization
+ Squeal.PostgreSQL.Query.With: materialized :: Aliased (statement with db params) (cte ::: common) -> CommonTableExpression statement db params with ((cte ::: common) : with)
+ Squeal.PostgreSQL.Query.With: notMaterialized :: Aliased (statement with db params) (cte ::: common) -> CommonTableExpression statement db params with ((cte ::: common) : with)
+ Squeal.PostgreSQL.Session: instance (Control.Monad.Catch.MonadCatch m, db0 GHC.Types.~ db1) => Control.Monad.Catch.MonadCatch (Squeal.PostgreSQL.Session.PQ db0 db1 m)
+ Squeal.PostgreSQL.Session: instance (Control.Monad.Catch.MonadMask m, db0 GHC.Types.~ db1) => Control.Monad.Catch.MonadMask (Squeal.PostgreSQL.Session.PQ db0 db1 m)
+ Squeal.PostgreSQL.Session: instance (Control.Monad.Catch.MonadThrow m, db0 GHC.Types.~ db1) => Control.Monad.Catch.MonadThrow (Squeal.PostgreSQL.Session.PQ db0 db1 m)
+ Squeal.PostgreSQL.Session: instance (Control.Monad.IO.Class.MonadIO io, db0 GHC.Types.~ db, db1 GHC.Types.~ db) => Squeal.PostgreSQL.Session.Monad.MonadPQ db (Squeal.PostgreSQL.Session.PQ db0 db1 io)
+ Squeal.PostgreSQL.Session: instance (Control.Monad.IO.Class.MonadIO m, schema0 GHC.Types.~ schema1) => Control.Monad.IO.Class.MonadIO (Squeal.PostgreSQL.Session.PQ schema0 schema1 m)
+ Squeal.PostgreSQL.Session: instance (Control.Monad.IO.Unlift.MonadUnliftIO m, db0 GHC.Types.~ db1) => Control.Monad.IO.Unlift.MonadUnliftIO (Squeal.PostgreSQL.Session.PQ db0 db1 m)
+ Squeal.PostgreSQL.Session: instance (Control.Monad.Trans.Control.MonadBaseControl b m, schema0 GHC.Types.~ schema1) => Control.Monad.Trans.Control.MonadBaseControl b (Squeal.PostgreSQL.Session.PQ schema0 schema1 m)
+ Squeal.PostgreSQL.Session: instance (GHC.Base.Monad m, GHC.Base.Monoid r, db0 GHC.Types.~ db1) => GHC.Base.Monoid (Squeal.PostgreSQL.Session.PQ db0 db1 m r)
+ Squeal.PostgreSQL.Session: instance (GHC.Base.Monad m, GHC.Base.Semigroup r, db0 GHC.Types.~ db1) => GHC.Base.Semigroup (Squeal.PostgreSQL.Session.PQ db0 db1 m r)
+ Squeal.PostgreSQL.Session: instance (GHC.Base.Monad m, db0 GHC.Types.~ db1) => Control.Monad.Fail.MonadFail (Squeal.PostgreSQL.Session.PQ db0 db1 m)
+ Squeal.PostgreSQL.Session: instance (GHC.Base.Monad m, db0 GHC.Types.~ db1) => GHC.Base.Applicative (Squeal.PostgreSQL.Session.PQ db0 db1 m)
+ Squeal.PostgreSQL.Session: instance (GHC.Base.Monad m, db0 GHC.Types.~ db1) => GHC.Base.Monad (Squeal.PostgreSQL.Session.PQ db0 db1 m)
+ Squeal.PostgreSQL.Session: instance (db0 GHC.Types.~ db1) => Control.Monad.Morph.MFunctor (Squeal.PostgreSQL.Session.PQ db0 db1)
+ Squeal.PostgreSQL.Session: instance (db0 GHC.Types.~ db1) => Control.Monad.Morph.MMonad (Squeal.PostgreSQL.Session.PQ db0 db1)
+ Squeal.PostgreSQL.Session: instance (db0 GHC.Types.~ db1) => Control.Monad.Trans.Class.MonadTrans (Squeal.PostgreSQL.Session.PQ db0 db1)
+ Squeal.PostgreSQL.Session: instance (db0 GHC.Types.~ db1) => Control.Monad.Trans.Control.MonadTransControl (Squeal.PostgreSQL.Session.PQ db0 db1)
+ Squeal.PostgreSQL.Session.Connection: newtype K a (b :: k)
+ Squeal.PostgreSQL.Session.Decode: class (IsRecord y ys, row ~ RowPG y, AllZip FromField row ys) => GenericRow row y ys
+ Squeal.PostgreSQL.Session.Decode: instance (GHC.TypeLits.KnownSymbol fld, Squeal.PostgreSQL.Session.Decode.FromValue ty (GHC.Maybe.Maybe y)) => GHC.OverloadedLabels.IsLabel fld (Control.Monad.Trans.Maybe.MaybeT (Squeal.PostgreSQL.Session.Decode.DecodeRow ((fld Squeal.PostgreSQL.Type.Alias.::: ty) : row)) y)
+ Squeal.PostgreSQL.Session.Decode: instance (GHC.TypeLits.KnownSymbol fld, Squeal.PostgreSQL.Session.Decode.FromValue ty y) => GHC.OverloadedLabels.IsLabel fld (Squeal.PostgreSQL.Session.Decode.DecodeRow ((fld Squeal.PostgreSQL.Type.Alias.::: ty) : row) y)
+ Squeal.PostgreSQL.Session.Decode: instance (Generics.SOP.Record.IsRecord y ys, Data.SOP.Constraint.AllZip Squeal.PostgreSQL.Session.Decode.FromField row ys, Squeal.PostgreSQL.Type.PG.RowPG y GHC.Types.~ row) => Squeal.PostgreSQL.Session.Decode.FromPG (Squeal.PostgreSQL.Type.Composite y)
+ Squeal.PostgreSQL.Session.Decode: instance (Generics.SOP.Universe.IsEnumType y, Generics.SOP.Universe.HasDatatypeInfo y, Squeal.PostgreSQL.Type.PG.LabelsPG y GHC.Types.~ labels) => Squeal.PostgreSQL.Session.Decode.FromPG (Squeal.PostgreSQL.Type.Enumerated y)
+ Squeal.PostgreSQL.Session.Decode: instance (Generics.SOP.Universe.IsProductType product ys, Squeal.PostgreSQL.Type.List.Length ys GHC.Types.~ dim, Data.SOP.Constraint.All ((GHC.Types.~) y) ys, Squeal.PostgreSQL.Session.Decode.FromArray dims ty y) => Squeal.PostgreSQL.Session.Decode.FromArray (dim : dims) ty product
+ Squeal.PostgreSQL.Session.Decode: instance (Squeal.PostgreSQL.Session.Decode.FromArray '[] ty y, ty GHC.Types.~ Squeal.PostgreSQL.Type.PG.NullPG y) => Squeal.PostgreSQL.Session.Decode.FromPG (Squeal.PostgreSQL.Type.VarArray (Data.Vector.Vector y))
+ Squeal.PostgreSQL.Session.Decode: instance (Squeal.PostgreSQL.Session.Decode.FromArray '[] ty y, ty GHC.Types.~ Squeal.PostgreSQL.Type.PG.NullPG y) => Squeal.PostgreSQL.Session.Decode.FromPG (Squeal.PostgreSQL.Type.VarArray [y])
+ Squeal.PostgreSQL.Session.Decode: instance (Squeal.PostgreSQL.Session.Decode.FromPG y, pg GHC.Types.~ Squeal.PostgreSQL.Type.PG.PG y) => Squeal.PostgreSQL.Session.Decode.FromArray '[] ('Squeal.PostgreSQL.Type.Schema.NotNull pg) y
+ Squeal.PostgreSQL.Session.Decode: instance (Squeal.PostgreSQL.Session.Decode.FromPG y, pg GHC.Types.~ Squeal.PostgreSQL.Type.PG.PG y) => Squeal.PostgreSQL.Session.Decode.FromArray '[] ('Squeal.PostgreSQL.Type.Schema.Null pg) (GHC.Maybe.Maybe y)
+ Squeal.PostgreSQL.Session.Decode: instance (Squeal.PostgreSQL.Session.Decode.FromPG y, pg GHC.Types.~ Squeal.PostgreSQL.Type.PG.PG y) => Squeal.PostgreSQL.Session.Decode.FromValue ('Squeal.PostgreSQL.Type.Schema.NotNull pg) y
+ Squeal.PostgreSQL.Session.Decode: instance (Squeal.PostgreSQL.Session.Decode.FromPG y, pg GHC.Types.~ Squeal.PostgreSQL.Type.PG.PG y) => Squeal.PostgreSQL.Session.Decode.FromValue ('Squeal.PostgreSQL.Type.Schema.Null pg) (GHC.Maybe.Maybe y)
+ Squeal.PostgreSQL.Session.Decode: instance (Squeal.PostgreSQL.Session.Decode.FromValue ty y, fld0 GHC.Types.~ fld1) => Squeal.PostgreSQL.Session.Decode.FromField (fld0 Squeal.PostgreSQL.Type.Alias.::: ty) (fld1 Squeal.PostgreSQL.Type.Alias.::: y)
+ Squeal.PostgreSQL.Session.Decode: instance (row GHC.Types.~ Squeal.PostgreSQL.Type.PG.RowPG y, Generics.SOP.Record.IsRecord y ys, Data.SOP.Constraint.AllZip Squeal.PostgreSQL.Session.Decode.FromField row ys) => Squeal.PostgreSQL.Session.Decode.GenericRow row y ys
+ Squeal.PostgreSQL.Session.Decode: instance forall k x (tag :: k). Squeal.PostgreSQL.Session.Decode.FromPG x => Squeal.PostgreSQL.Session.Decode.FromPG (Data.Functor.Const.Const x tag)
+ Squeal.PostgreSQL.Session.Decode: instance forall k x (tag :: k). Squeal.PostgreSQL.Session.Decode.FromPG x => Squeal.PostgreSQL.Session.Decode.FromPG (Data.Functor.Constant.Constant x tag)
+ Squeal.PostgreSQL.Session.Decode: instance forall k x (tag :: k). Squeal.PostgreSQL.Session.Decode.FromPG x => Squeal.PostgreSQL.Session.Decode.FromPG (Data.SOP.BasicFunctors.K x tag)
+ Squeal.PostgreSQL.Session.Encode: class (IsProductType x xs, params ~ TuplePG x, All (OidOfNull db) params, AllZip (ToParam db) params xs) => GenericParams db params x xs
+ Squeal.PostgreSQL.Session.Encode: instance (Data.SOP.Constraint.SListI fields, Generics.SOP.Record.IsRecord x xs, Data.SOP.Constraint.AllZip (Squeal.PostgreSQL.Session.Encode.ToField db) fields xs, Data.SOP.Constraint.All (Squeal.PostgreSQL.Session.Oid.OidOfField db) fields, Squeal.PostgreSQL.Type.PG.RowPG x GHC.Types.~ fields) => Squeal.PostgreSQL.Session.Encode.ToPG db (Squeal.PostgreSQL.Type.Composite x)
+ Squeal.PostgreSQL.Session.Encode: instance (Generics.SOP.Universe.IsEnumType x, Generics.SOP.Universe.HasDatatypeInfo x, Squeal.PostgreSQL.Type.PG.LabelsPG x GHC.Types.~ labels) => Squeal.PostgreSQL.Session.Encode.ToPG db (Squeal.PostgreSQL.Type.Enumerated x)
+ Squeal.PostgreSQL.Session.Encode: instance (Generics.SOP.Universe.IsProductType tuple xs, Squeal.PostgreSQL.Type.List.Length xs GHC.Types.~ dim, Data.SOP.Constraint.All ((GHC.Types.~) x) xs, Squeal.PostgreSQL.Session.Encode.ToArray db dims ty x, GHC.TypeNats.KnownNat dim) => Squeal.PostgreSQL.Session.Encode.ToArray db (dim : dims) ty tuple
+ Squeal.PostgreSQL.Session.Encode: instance (Squeal.PostgreSQL.Session.Encode.ToPG db x, pg GHC.Types.~ Squeal.PostgreSQL.Type.PG.PG x) => Squeal.PostgreSQL.Session.Encode.ToArray db '[] ('Squeal.PostgreSQL.Type.Schema.NotNull pg) x
+ Squeal.PostgreSQL.Session.Encode: instance (Squeal.PostgreSQL.Session.Encode.ToPG db x, pg GHC.Types.~ Squeal.PostgreSQL.Type.PG.PG x) => Squeal.PostgreSQL.Session.Encode.ToArray db '[] ('Squeal.PostgreSQL.Type.Schema.Null pg) (GHC.Maybe.Maybe x)
+ Squeal.PostgreSQL.Session.Encode: instance (Squeal.PostgreSQL.Session.Encode.ToPG db x, pg GHC.Types.~ Squeal.PostgreSQL.Type.PG.PG x) => Squeal.PostgreSQL.Session.Encode.ToParam db ('Squeal.PostgreSQL.Type.Schema.NotNull pg) x
+ Squeal.PostgreSQL.Session.Encode: instance (Squeal.PostgreSQL.Session.Encode.ToPG db x, pg GHC.Types.~ Squeal.PostgreSQL.Type.PG.PG x) => Squeal.PostgreSQL.Session.Encode.ToParam db ('Squeal.PostgreSQL.Type.Schema.Null pg) (GHC.Maybe.Maybe x)
+ Squeal.PostgreSQL.Session.Encode: instance (Squeal.PostgreSQL.Type.PG.NullPG x GHC.Types.~ ty, Squeal.PostgreSQL.Session.Encode.ToArray db '[] ty x, Squeal.PostgreSQL.Session.Oid.OidOfNull db ty) => Squeal.PostgreSQL.Session.Encode.ToPG db (Squeal.PostgreSQL.Type.VarArray (Data.Vector.Vector x))
+ Squeal.PostgreSQL.Session.Encode: instance (Squeal.PostgreSQL.Type.PG.NullPG x GHC.Types.~ ty, Squeal.PostgreSQL.Session.Encode.ToArray db '[] ty x, Squeal.PostgreSQL.Session.Oid.OidOfNull db ty) => Squeal.PostgreSQL.Session.Encode.ToPG db (Squeal.PostgreSQL.Type.VarArray [x])
+ Squeal.PostgreSQL.Session.Encode: instance (fld0 GHC.Types.~ fld1, Squeal.PostgreSQL.Session.Encode.ToParam db ty x) => Squeal.PostgreSQL.Session.Encode.ToField db (fld0 Squeal.PostgreSQL.Type.Alias.::: ty) (fld1 Squeal.PostgreSQL.Type.Alias.::: x)
+ Squeal.PostgreSQL.Session.Encode: instance (params GHC.Types.~ Squeal.PostgreSQL.Type.PG.TuplePG x, Data.SOP.Constraint.All (Squeal.PostgreSQL.Session.Oid.OidOfNull db) params, Generics.SOP.Universe.IsProductType x xs, Data.SOP.Constraint.AllZip (Squeal.PostgreSQL.Session.Encode.ToParam db) params xs) => Squeal.PostgreSQL.Session.Encode.GenericParams db params x xs
+ Squeal.PostgreSQL.Session.Encode: instance forall k (db :: Squeal.PostgreSQL.Type.Schema.SchemasType) x (tag :: k). Squeal.PostgreSQL.Session.Encode.ToPG db x => Squeal.PostgreSQL.Session.Encode.ToPG db (Data.Functor.Const.Const x tag)
+ Squeal.PostgreSQL.Session.Encode: instance forall k (db :: Squeal.PostgreSQL.Type.Schema.SchemasType) x (tag :: k). Squeal.PostgreSQL.Session.Encode.ToPG db x => Squeal.PostgreSQL.Session.Encode.ToPG db (Data.Functor.Constant.Constant x tag)
+ Squeal.PostgreSQL.Session.Encode: instance forall k (db :: Squeal.PostgreSQL.Type.Schema.SchemasType) x (tag :: k). Squeal.PostgreSQL.Session.Encode.ToPG db x => Squeal.PostgreSQL.Session.Encode.ToPG db (Data.SOP.BasicFunctors.K x tag)
+ Squeal.PostgreSQL.Session.Exception: pattern DeadlockDetected :: ByteString -> SquealException
+ Squeal.PostgreSQL.Session.Migration: data IsoQ (c :: k -> k -> Type) (x :: k) (y :: k)
+ Squeal.PostgreSQL.Session.Oid: instance (Squeal.PostgreSQL.Type.Schema.UserType db ('Squeal.PostgreSQL.Type.Schema.PGcomposite row) GHC.Types.~ '(sch, td), Squeal.PostgreSQL.Type.Alias.Has sch db schema, Squeal.PostgreSQL.Type.Alias.Has td schema ('Squeal.PostgreSQL.Type.Schema.Typedef ('Squeal.PostgreSQL.Type.Schema.PGcomposite row))) => Squeal.PostgreSQL.Session.Oid.OidOf db ('Squeal.PostgreSQL.Type.Schema.PGcomposite row)
+ Squeal.PostgreSQL.Session.Oid: instance (Squeal.PostgreSQL.Type.Schema.UserType db ('Squeal.PostgreSQL.Type.Schema.PGcomposite row) GHC.Types.~ '(sch, td), Squeal.PostgreSQL.Type.Alias.Has sch db schema, Squeal.PostgreSQL.Type.Alias.Has td schema ('Squeal.PostgreSQL.Type.Schema.Typedef ('Squeal.PostgreSQL.Type.Schema.PGcomposite row))) => Squeal.PostgreSQL.Session.Oid.OidOfArray db ('Squeal.PostgreSQL.Type.Schema.PGcomposite row)
+ Squeal.PostgreSQL.Session.Oid: instance (Squeal.PostgreSQL.Type.Schema.UserType db ('Squeal.PostgreSQL.Type.Schema.PGenum labels) GHC.Types.~ '(sch, td), Squeal.PostgreSQL.Type.Alias.Has sch db schema, Squeal.PostgreSQL.Type.Alias.Has td schema ('Squeal.PostgreSQL.Type.Schema.Typedef ('Squeal.PostgreSQL.Type.Schema.PGenum labels))) => Squeal.PostgreSQL.Session.Oid.OidOf db ('Squeal.PostgreSQL.Type.Schema.PGenum labels)
+ Squeal.PostgreSQL.Session.Oid: instance (Squeal.PostgreSQL.Type.Schema.UserType db ('Squeal.PostgreSQL.Type.Schema.PGenum labels) GHC.Types.~ '(sch, td), Squeal.PostgreSQL.Type.Alias.Has sch db schema, Squeal.PostgreSQL.Type.Alias.Has td schema ('Squeal.PostgreSQL.Type.Schema.Typedef ('Squeal.PostgreSQL.Type.Schema.PGenum labels))) => Squeal.PostgreSQL.Session.Oid.OidOfArray db ('Squeal.PostgreSQL.Type.Schema.PGenum labels)
+ Squeal.PostgreSQL.Session.Pool: data Pool a
+ Squeal.PostgreSQL.Session.Result: class Monad m => MonadResult m
+ Squeal.PostgreSQL.Session.Result: instance (GHC.Base.Monad io, Control.Monad.IO.Class.MonadIO io) => Squeal.PostgreSQL.Session.Result.MonadResult io
+ Squeal.PostgreSQL.Session.Transaction: retryMode :: TransactionMode
+ Squeal.PostgreSQL.Session.Transaction: transactionallyRetry_ :: (MonadMask tx, MonadResult tx, MonadPQ db tx) => Transaction db x -> tx x
+ Squeal.PostgreSQL.Session.Transaction: type Transaction db x = forall m. (MonadPQ db m, MonadResult m, MonadCatch m) => m x
+ Squeal.PostgreSQL.Session.Transaction: withSavepoint :: ByteString -> Transaction db (Either e x) -> Transaction db (Either e x)
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: Deferrable :: DeferrableMode
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: NotDeferrable :: DeferrableMode
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: ReadCommitted :: IsolationLevel
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: ReadOnly :: AccessMode
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: ReadUncommitted :: IsolationLevel
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: ReadWrite :: AccessMode
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: RepeatableRead :: IsolationLevel
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: Serializable :: IsolationLevel
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: TransactionMode :: IsolationLevel -> AccessMode -> DeferrableMode -> TransactionMode
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: [accessMode] :: TransactionMode -> AccessMode
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: [deferrableMode] :: TransactionMode -> DeferrableMode
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: [isolationLevel] :: TransactionMode -> IsolationLevel
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: begin :: TransactionMode -> Manipulation_ db () ()
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: commit :: Manipulation_ db () ()
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: data AccessMode
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: data DeferrableMode
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: data IsolationLevel
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: data TransactionMode
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: defaultMode :: TransactionMode
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: ephemerally :: (MonadMask tx, MonadPQ db tx) => TransactionMode -> tx x -> tx x
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: ephemerally_ :: (MonadMask tx, MonadPQ db tx) => tx x -> tx x
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: instance GHC.Classes.Eq Squeal.PostgreSQL.Session.Transaction.Unsafe.AccessMode
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: instance GHC.Classes.Eq Squeal.PostgreSQL.Session.Transaction.Unsafe.DeferrableMode
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: instance GHC.Classes.Eq Squeal.PostgreSQL.Session.Transaction.Unsafe.IsolationLevel
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: instance GHC.Classes.Eq Squeal.PostgreSQL.Session.Transaction.Unsafe.TransactionMode
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: instance GHC.Show.Show Squeal.PostgreSQL.Session.Transaction.Unsafe.AccessMode
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: instance GHC.Show.Show Squeal.PostgreSQL.Session.Transaction.Unsafe.DeferrableMode
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: instance GHC.Show.Show Squeal.PostgreSQL.Session.Transaction.Unsafe.IsolationLevel
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: instance GHC.Show.Show Squeal.PostgreSQL.Session.Transaction.Unsafe.TransactionMode
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: instance Squeal.PostgreSQL.Render.RenderSQL Squeal.PostgreSQL.Session.Transaction.Unsafe.AccessMode
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: instance Squeal.PostgreSQL.Render.RenderSQL Squeal.PostgreSQL.Session.Transaction.Unsafe.DeferrableMode
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: instance Squeal.PostgreSQL.Render.RenderSQL Squeal.PostgreSQL.Session.Transaction.Unsafe.IsolationLevel
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: instance Squeal.PostgreSQL.Render.RenderSQL Squeal.PostgreSQL.Session.Transaction.Unsafe.TransactionMode
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: longRunningMode :: TransactionMode
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: retryMode :: TransactionMode
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: rollback :: Manipulation_ db () ()
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: transactionally :: (MonadMask tx, MonadPQ db tx) => TransactionMode -> tx x -> tx x
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: transactionallyRetry :: (MonadMask tx, MonadPQ db tx) => TransactionMode -> tx x -> tx x
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: transactionallyRetry_ :: (MonadMask tx, MonadPQ db tx) => tx x -> tx x
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: transactionally_ :: (MonadMask tx, MonadPQ db tx) => tx x -> tx x
+ Squeal.PostgreSQL.Session.Transaction.Unsafe: withSavepoint :: MonadPQ db tx => ByteString -> tx (Either e x) -> tx (Either e x)
+ Squeal.PostgreSQL.Type.Alias: instance (alias0 GHC.Types.~ alias1, alias0 GHC.Types.~ alias2, GHC.TypeLits.KnownSymbol alias2) => GHC.OverloadedLabels.IsLabel alias0 (Squeal.PostgreSQL.Type.Alias.Aliased Squeal.PostgreSQL.Type.Alias.Alias (alias1 Squeal.PostgreSQL.Type.Alias.::: alias2))
+ Squeal.PostgreSQL.Type.Alias: instance (alias1 GHC.Types.~ alias2) => GHC.OverloadedLabels.IsLabel alias1 (Squeal.PostgreSQL.Type.Alias.Alias alias2)
+ Squeal.PostgreSQL.Type.Alias: instance (aliases GHC.Types.~ '[alias]) => GHC.OverloadedLabels.IsLabel alias (Data.SOP.NP.NP Squeal.PostgreSQL.Type.Alias.Alias aliases)
+ Squeal.PostgreSQL.Type.Alias: instance (q GHC.Types.~ "public", a0 GHC.Types.~ a1, a1 GHC.Types.~ a2, GHC.TypeLits.KnownSymbol a2) => GHC.OverloadedLabels.IsLabel a0 (Squeal.PostgreSQL.Type.Alias.Aliased (Squeal.PostgreSQL.Type.Alias.QualifiedAlias q) (a1 Squeal.PostgreSQL.Type.Alias.::: a2))
+ Squeal.PostgreSQL.Type.Alias: instance (q GHC.Types.~ q', a GHC.Types.~ a') => Squeal.PostgreSQL.Type.Alias.IsQualified q a (Squeal.PostgreSQL.Type.Alias.QualifiedAlias q' a')
+ Squeal.PostgreSQL.Type.Alias: instance (q' GHC.Types.~ "public", a GHC.Types.~ a') => GHC.OverloadedLabels.IsLabel a (Squeal.PostgreSQL.Type.Alias.QualifiedAlias q' a')
+ Squeal.PostgreSQL.Type.Alias: instance (q0 GHC.Types.~ q1, a0 GHC.Types.~ a1, a1 GHC.Types.~ a2, GHC.TypeLits.KnownSymbol a2) => Squeal.PostgreSQL.Type.Alias.IsQualified q0 a0 (Squeal.PostgreSQL.Type.Alias.Aliased (Squeal.PostgreSQL.Type.Alias.QualifiedAlias q1) (a1 Squeal.PostgreSQL.Type.Alias.::: a2))
+ Squeal.PostgreSQL.Type.Alias: instance forall k (alias :: GHC.Types.Symbol) (aliased :: (GHC.Types.Symbol, k)) (ty :: k) (expression :: k -> *). (GHC.TypeLits.KnownSymbol alias, aliased GHC.Types.~ (alias Squeal.PostgreSQL.Type.Alias.::: ty)) => Squeal.PostgreSQL.Type.Alias.Aliasable alias (expression ty) (Squeal.PostgreSQL.Type.Alias.Aliased expression aliased)
+ Squeal.PostgreSQL.Type.Alias: instance forall k (alias :: GHC.Types.Symbol) (tys :: [(GHC.Types.Symbol, k)]) (ty :: k) (expression :: k -> *). (GHC.TypeLits.KnownSymbol alias, tys GHC.Types.~ '[alias Squeal.PostgreSQL.Type.Alias.::: ty]) => Squeal.PostgreSQL.Type.Alias.Aliasable alias (expression ty) (Data.SOP.NP.NP (Squeal.PostgreSQL.Type.Alias.Aliased expression) tys)
+ Squeal.PostgreSQL.Type.Alias: instance forall k kind (alias :: GHC.Types.Symbol) (err :: k) (fields :: [(GHC.Types.Symbol, kind)]) (field :: kind) (field' :: (GHC.Types.Symbol, kind)). (GHC.TypeLits.KnownSymbol alias, Squeal.PostgreSQL.Type.Alias.HasErr err alias fields field) => Squeal.PostgreSQL.Type.Alias.HasErr err alias (field' : fields) field
+ Squeal.PostgreSQL.Type.Alias: instance forall kind k (alias :: GHC.Types.Symbol) (field0 :: kind) (field1 :: kind) (err :: k) (fields :: [(GHC.Types.Symbol, kind)]). (GHC.TypeLits.KnownSymbol alias, field0 GHC.Types.~ field1) => Squeal.PostgreSQL.Type.Alias.HasErr err alias ((alias Squeal.PostgreSQL.Type.Alias.::: field0) : fields) field1
+ Squeal.PostgreSQL.Type.List: data NP (a :: k -> Type) (b :: [k])
+ Squeal.PostgreSQL.Type.List: data Path (p :: k -> k -> Type) (x :: k) (y :: k)
+ Squeal.PostgreSQL.Type.PG: instance forall k hask (tag :: k). Squeal.PostgreSQL.Type.PG.IsPG hask => Squeal.PostgreSQL.Type.PG.IsPG (Data.Functor.Const.Const hask tag)
+ Squeal.PostgreSQL.Type.PG: instance forall k hask (tag :: k). Squeal.PostgreSQL.Type.PG.IsPG hask => Squeal.PostgreSQL.Type.PG.IsPG (Data.Functor.Constant.Constant hask tag)
+ Squeal.PostgreSQL.Type.PG: instance forall k hask (tag :: k). Squeal.PostgreSQL.Type.PG.IsPG hask => Squeal.PostgreSQL.Type.PG.IsPG (Data.SOP.BasicFunctors.K hask tag)
+ Squeal.PostgreSQL.Type.Schema: instance (label GHC.Types.~ label1) => Squeal.PostgreSQL.Type.Schema.IsPGlabel label (Squeal.PostgreSQL.Type.Schema.PGlabel label1)
+ Squeal.PostgreSQL.Type.Schema: instance (labels GHC.Types.~ '[label]) => Squeal.PostgreSQL.Type.Schema.IsPGlabel label (Data.SOP.NP.NP Squeal.PostgreSQL.Type.Schema.PGlabel labels)
+ Squeal.PostgreSQL.Type.Schema: instance forall k (ty0 :: k) (ty1 :: k) (alias0 :: GHC.Types.Symbol) (def0 :: Squeal.PostgreSQL.Type.Schema.Optionality) (null0 :: k -> Squeal.PostgreSQL.Type.Schema.NullType) (alias1 :: GHC.Types.Symbol) (def1 :: Squeal.PostgreSQL.Type.Schema.Optionality) (null1 :: k -> Squeal.PostgreSQL.Type.Schema.NullType). (ty0 GHC.Types.~ ty1) => Squeal.PostgreSQL.Type.Schema.SamePGType (alias0 Squeal.PostgreSQL.Type.Alias.::: (def0 Squeal.PostgreSQL.Type.Schema.:=> null0 ty0)) (alias1 Squeal.PostgreSQL.Type.Alias.::: (def1 Squeal.PostgreSQL.Type.Schema.:=> null1 ty1))
+ Squeal.PostgreSQL.Type.Schema: instance forall k1 k2 (alias :: k1) (a :: k2). (TypeError ...) => Squeal.PostgreSQL.Type.Schema.IsNotElem '(alias, a) 'GHC.Types.True
- Squeal.PostgreSQL.Definition: (>>>) :: Category cat => cat a b -> cat b c -> cat a c
+ Squeal.PostgreSQL.Definition: (>>>) :: forall k cat (a :: k) (b :: k) (c :: k). Category cat => cat a b -> cat b c -> cat a c
- Squeal.PostgreSQL.Definition: UnsafeDefinition :: ByteString -> Definition
+ Squeal.PostgreSQL.Definition: UnsafeDefinition :: ByteString -> Definition (db0 :: SchemasType) (db1 :: SchemasType)
- Squeal.PostgreSQL.Definition: [renderDefinition] :: Definition -> ByteString
+ Squeal.PostgreSQL.Definition: [renderDefinition] :: Definition (db0 :: SchemasType) (db1 :: SchemasType) -> ByteString
- Squeal.PostgreSQL.Definition.Comment: commentOnColumn :: (KnownSymbol sch, KnownSymbol tab, KnownSymbol col, Has sch db schema, Has tab schema ( 'Table '(cons, cols)), Has col cols '(def, nulltyp)) => QualifiedAlias sch tab -> Alias col -> Text -> Definition db db
+ Squeal.PostgreSQL.Definition.Comment: commentOnColumn :: (KnownSymbol sch, KnownSymbol tab, KnownSymbol col, Has sch db schema, Has tab schema ('Table '(cons, cols)), Has col cols '(def, nulltyp)) => QualifiedAlias sch tab -> Alias col -> Text -> Definition db db
- Squeal.PostgreSQL.Definition.Comment: commentOnFunction :: (KnownSymbol sch, KnownSymbol fun, Has sch db schema, Has fun schema ( 'Function function)) => QualifiedAlias sch fun -> Text -> Definition db db
+ Squeal.PostgreSQL.Definition.Comment: commentOnFunction :: (KnownSymbol sch, KnownSymbol fun, Has sch db schema, Has fun schema ('Function function)) => QualifiedAlias sch fun -> Text -> Definition db db
- Squeal.PostgreSQL.Definition.Comment: commentOnIndex :: (KnownSymbol sch, KnownSymbol ind, Has sch db schema, Has ind schema ( 'Index index)) => QualifiedAlias sch ind -> Text -> Definition db db
+ Squeal.PostgreSQL.Definition.Comment: commentOnIndex :: (KnownSymbol sch, KnownSymbol ind, Has sch db schema, Has ind schema ('Index index)) => QualifiedAlias sch ind -> Text -> Definition db db
- Squeal.PostgreSQL.Definition.Comment: commentOnTable :: (KnownSymbol sch, KnownSymbol tab, Has sch db schema, Has tab schema ( 'Table table)) => QualifiedAlias sch tab -> Text -> Definition db db
+ Squeal.PostgreSQL.Definition.Comment: commentOnTable :: (KnownSymbol sch, KnownSymbol tab, Has sch db schema, Has tab schema ('Table table)) => QualifiedAlias sch tab -> Text -> Definition db db
- Squeal.PostgreSQL.Definition.Comment: commentOnType :: (KnownSymbol sch, KnownSymbol typ, Has sch db schema, Has typ schema ( 'Typedef type_)) => QualifiedAlias sch typ -> Text -> Definition db db
+ Squeal.PostgreSQL.Definition.Comment: commentOnType :: (KnownSymbol sch, KnownSymbol typ, Has sch db schema, Has typ schema ('Typedef type_)) => QualifiedAlias sch typ -> Text -> Definition db db
- Squeal.PostgreSQL.Definition.Comment: commentOnView :: (KnownSymbol sch, KnownSymbol vie, Has sch db schema, Has vie schema ( 'View view)) => QualifiedAlias sch vie -> Text -> Definition db db
+ Squeal.PostgreSQL.Definition.Comment: commentOnView :: (KnownSymbol sch, KnownSymbol vie, Has sch db schema, Has vie schema ('View view)) => QualifiedAlias sch vie -> Text -> Definition db db
- Squeal.PostgreSQL.Definition.Constraint: UnsafeTableConstraintExpression :: ByteString -> TableConstraintExpression
+ Squeal.PostgreSQL.Definition.Constraint: UnsafeTableConstraintExpression :: ByteString -> TableConstraintExpression (sch :: Symbol) (tab :: Symbol) (db :: SchemasType) (constraint :: TableConstraint)
- Squeal.PostgreSQL.Definition.Constraint: [renderTableConstraintExpression] :: TableConstraintExpression -> ByteString
+ Squeal.PostgreSQL.Definition.Constraint: [renderTableConstraintExpression] :: TableConstraintExpression (sch :: Symbol) (tab :: Symbol) (db :: SchemasType) (constraint :: TableConstraint) -> ByteString
- Squeal.PostgreSQL.Definition.Constraint: check :: (Has sch db schema, Has tab schema ( 'Table table), HasAll aliases (TableToRow table) subcolumns) => NP Alias aliases -> (forall t. Condition 'Ungrouped '[] '[] db '[] '[t ::: subcolumns]) -> TableConstraintExpression sch tab db ( 'Check aliases)
+ Squeal.PostgreSQL.Definition.Constraint: check :: (Has sch db schema, Has tab schema ('Table table), HasAll aliases (TableToRow table) subcolumns) => NP Alias aliases -> (forall t. Condition 'Ungrouped '[] '[] db '[] '[t ::: subcolumns]) -> TableConstraintExpression sch tab db ('Check aliases)
- Squeal.PostgreSQL.Definition.Constraint: foreignKey :: ForeignKeyed db sch0 sch1 schema0 schema1 child parent table reftable columns refcolumns constraints cols reftys tys => NP Alias columns -> QualifiedAlias sch0 parent -> NP Alias refcolumns -> OnDeleteClause -> OnUpdateClause -> TableConstraintExpression sch1 child db ( 'ForeignKey columns sch0 parent refcolumns)
+ Squeal.PostgreSQL.Definition.Constraint: foreignKey :: ForeignKeyed db sch0 sch1 schema0 schema1 child parent table reftable columns refcolumns constraints cols reftys tys => NP Alias columns -> QualifiedAlias sch0 parent -> NP Alias refcolumns -> OnDeleteClause -> OnUpdateClause -> TableConstraintExpression sch1 child db ('ForeignKey columns sch0 parent refcolumns)
- Squeal.PostgreSQL.Definition.Constraint: primaryKey :: (Has sch db schema, Has tab schema ( 'Table table), HasAll aliases (TableToColumns table) subcolumns, AllNotNull subcolumns) => NP Alias aliases -> TableConstraintExpression sch tab db ( 'PrimaryKey aliases)
+ Squeal.PostgreSQL.Definition.Constraint: primaryKey :: (Has sch db schema, Has tab schema ('Table table), HasAll aliases (TableToColumns table) subcolumns, AllNotNull subcolumns) => NP Alias aliases -> TableConstraintExpression sch tab db ('PrimaryKey aliases)
- Squeal.PostgreSQL.Definition.Constraint: type ForeignKeyed db sch0 sch1 schema0 schema1 child parent table reftable columns refcolumns constraints cols reftys tys = (Has sch0 db schema0, Has sch1 db schema1, Has parent schema0 ( 'Table reftable), Has child schema1 ( 'Table table), HasAll columns (TableToColumns table) tys, reftable ~ (constraints :=> cols), HasAll refcolumns cols reftys, AllZip SamePGType tys reftys, Uniquely refcolumns constraints)
+ Squeal.PostgreSQL.Definition.Constraint: type ForeignKeyed db sch0 sch1 schema0 schema1 child parent table reftable columns refcolumns constraints cols reftys tys = (Has sch0 db schema0, Has sch1 db schema1, Has parent schema0 ('Table reftable), Has child schema1 ('Table table), HasAll columns (TableToColumns table) tys, reftable ~ (constraints :=> cols), HasAll refcolumns cols reftys, AllZip SamePGType tys reftys, Uniquely refcolumns constraints)
- Squeal.PostgreSQL.Definition.Constraint: unique :: (Has sch db schema, Has tab schema ( 'Table table), HasAll aliases (TableToRow table) subcolumns) => NP Alias aliases -> TableConstraintExpression sch tab db ( 'Unique aliases)
+ Squeal.PostgreSQL.Definition.Constraint: unique :: (Has sch db schema, Has tab schema ('Table table), HasAll aliases (TableToRow table) subcolumns) => NP Alias aliases -> TableConstraintExpression sch tab db ('Unique aliases)
- Squeal.PostgreSQL.Definition.Function: createFunction :: (Has sch db schema, KnownSymbol fun, SListI args) => QualifiedAlias sch fun -> NP (TypeExpression db) args -> TypeExpression db ret -> FunctionDefinition db args ( 'Returns ret) -> Definition db (Alter sch (Create fun ( 'Function (args :=> 'Returns ret)) schema) db)
+ Squeal.PostgreSQL.Definition.Function: createFunction :: (Has sch db schema, KnownSymbol fun, SListI args) => QualifiedAlias sch fun -> NP (TypeExpression db) args -> TypeExpression db ret -> FunctionDefinition db args ('Returns ret) -> Definition db (Alter sch (Create fun ('Function (args :=> 'Returns ret)) schema) db)
- Squeal.PostgreSQL.Definition.Function: createOrReplaceFunction :: (Has sch db schema, KnownSymbol fun, SListI args) => QualifiedAlias sch fun -> NP (TypeExpression db) args -> TypeExpression db ret -> FunctionDefinition db args ( 'Returns ret) -> Definition db (Alter sch (CreateOrReplace fun ( 'Function (args :=> 'Returns ret)) schema) db)
+ Squeal.PostgreSQL.Definition.Function: createOrReplaceFunction :: (Has sch db schema, KnownSymbol fun, SListI args) => QualifiedAlias sch fun -> NP (TypeExpression db) args -> TypeExpression db ret -> FunctionDefinition db args ('Returns ret) -> Definition db (Alter sch (CreateOrReplace fun ('Function (args :=> 'Returns ret)) schema) db)
- Squeal.PostgreSQL.Definition.Function: createOrReplaceSetFunction :: (Has sch db schema, KnownSymbol fun, SListI args, SListI rets) => QualifiedAlias sch fun -> NP (TypeExpression db) args -> NP (Aliased (TypeExpression db)) rets -> FunctionDefinition db args ( 'ReturnsTable rets) -> Definition db (Alter sch (CreateOrReplace fun ( 'Function (args :=> 'ReturnsTable rets)) schema) db)
+ Squeal.PostgreSQL.Definition.Function: createOrReplaceSetFunction :: (Has sch db schema, KnownSymbol fun, SListI args, SListI rets) => QualifiedAlias sch fun -> NP (TypeExpression db) args -> NP (Aliased (TypeExpression db)) rets -> FunctionDefinition db args ('ReturnsTable rets) -> Definition db (Alter sch (CreateOrReplace fun ('Function (args :=> 'ReturnsTable rets)) schema) db)
- Squeal.PostgreSQL.Definition.Function: createSetFunction :: (Has sch db schema, KnownSymbol fun, SListI args, SListI rets) => QualifiedAlias sch fun -> NP (TypeExpression db) args -> NP (Aliased (TypeExpression db)) rets -> FunctionDefinition db args ( 'ReturnsTable rets) -> Definition db (Alter sch (Create fun ( 'Function (args :=> 'ReturnsTable rets)) schema) db)
+ Squeal.PostgreSQL.Definition.Function: createSetFunction :: (Has sch db schema, KnownSymbol fun, SListI args, SListI rets) => QualifiedAlias sch fun -> NP (TypeExpression db) args -> NP (Aliased (TypeExpression db)) rets -> FunctionDefinition db args ('ReturnsTable rets) -> Definition db (Alter sch (Create fun ('Function (args :=> 'ReturnsTable rets)) schema) db)
- Squeal.PostgreSQL.Definition.Function: dropFunction :: (Has sch db schema, KnownSymbol fun) => QualifiedAlias sch fun -> Definition db (Alter sch (DropSchemum fun 'Function schema) db)
+ Squeal.PostgreSQL.Definition.Function: dropFunction :: (Has sch db schema, KnownSymbol fun) => QualifiedAlias sch fun -> Definition db (Alter sch (DropSchemum fun 'Function schema) db)
- Squeal.PostgreSQL.Definition.Function: dropFunctionIfExists :: (Has sch db schema, KnownSymbol fun) => QualifiedAlias sch fun -> Definition db (Alter sch (DropSchemumIfExists fun 'Function schema) db)
+ Squeal.PostgreSQL.Definition.Function: dropFunctionIfExists :: (Has sch db schema, KnownSymbol fun) => QualifiedAlias sch fun -> Definition db (Alter sch (DropSchemumIfExists fun 'Function schema) db)
- Squeal.PostgreSQL.Definition.Function: languageSqlExpr :: Expression 'Ungrouped '[] '[] db args '[] ret -> FunctionDefinition db args ( 'Returns ret)
+ Squeal.PostgreSQL.Definition.Function: languageSqlExpr :: Expression 'Ungrouped '[] '[] db args '[] ret -> FunctionDefinition db args ('Returns ret)
- Squeal.PostgreSQL.Definition.Function: languageSqlQuery :: Query '[] '[] db args rets -> FunctionDefinition db args ( 'ReturnsTable rets)
+ Squeal.PostgreSQL.Definition.Function: languageSqlQuery :: Query '[] '[] db args rets -> FunctionDefinition db args ('ReturnsTable rets)
- Squeal.PostgreSQL.Definition.Index: brin :: IndexMethod 'Brin
+ Squeal.PostgreSQL.Definition.Index: brin :: IndexMethod 'Brin
- Squeal.PostgreSQL.Definition.Index: btree :: IndexMethod 'Btree
+ Squeal.PostgreSQL.Definition.Index: btree :: IndexMethod 'Btree
- Squeal.PostgreSQL.Definition.Index: createIndex :: (Has sch db schema, Has tab schema ( 'Table table), KnownSymbol ix) => Alias ix -> QualifiedAlias sch tab -> IndexMethod method -> [SortExpression 'Ungrouped '[] '[] db '[] '[tab ::: TableToRow table]] -> Definition db (Alter sch (Create ix ( 'Index method) schema) db)
+ Squeal.PostgreSQL.Definition.Index: createIndex :: (Has sch db schema, Has tab schema ('Table table), KnownSymbol ix) => Alias ix -> QualifiedAlias sch tab -> IndexMethod method -> [SortExpression 'Ungrouped '[] '[] db '[] '[tab ::: TableToRow table]] -> Definition db (Alter sch (Create ix ('Index method) schema) db)
- Squeal.PostgreSQL.Definition.Index: createIndexIfNotExists :: (Has sch db schema, Has tab schema ( 'Table table), KnownSymbol ix) => Alias ix -> QualifiedAlias sch tab -> IndexMethod method -> [SortExpression 'Ungrouped '[] '[] db '[] '[tab ::: TableToRow table]] -> Definition db (Alter sch (CreateIfNotExists ix ( 'Index method) schema) db)
+ Squeal.PostgreSQL.Definition.Index: createIndexIfNotExists :: (Has sch db schema, Has tab schema ('Table table), KnownSymbol ix) => Alias ix -> QualifiedAlias sch tab -> IndexMethod method -> [SortExpression 'Ungrouped '[] '[] db '[] '[tab ::: TableToRow table]] -> Definition db (Alter sch (CreateIfNotExists ix ('Index method) schema) db)
- Squeal.PostgreSQL.Definition.Index: dropIndex :: (Has sch db schema, KnownSymbol ix) => QualifiedAlias sch ix -> Definition db (Alter sch (DropSchemum ix 'Index schema) db)
+ Squeal.PostgreSQL.Definition.Index: dropIndex :: (Has sch db schema, KnownSymbol ix) => QualifiedAlias sch ix -> Definition db (Alter sch (DropSchemum ix 'Index schema) db)
- Squeal.PostgreSQL.Definition.Index: dropIndexIfExists :: (Has sch db schema, KnownSymbol ix) => QualifiedAlias sch ix -> Definition db (Alter sch (DropSchemumIfExists ix 'Index schema) db)
+ Squeal.PostgreSQL.Definition.Index: dropIndexIfExists :: (Has sch db schema, KnownSymbol ix) => QualifiedAlias sch ix -> Definition db (Alter sch (DropSchemumIfExists ix 'Index schema) db)
- Squeal.PostgreSQL.Definition.Index: gin :: IndexMethod 'Gin
+ Squeal.PostgreSQL.Definition.Index: gin :: IndexMethod 'Gin
- Squeal.PostgreSQL.Definition.Index: gist :: IndexMethod 'Gist
+ Squeal.PostgreSQL.Definition.Index: gist :: IndexMethod 'Gist
- Squeal.PostgreSQL.Definition.Index: hash :: IndexMethod 'Hash
+ Squeal.PostgreSQL.Definition.Index: hash :: IndexMethod 'Hash
- Squeal.PostgreSQL.Definition.Index: spgist :: IndexMethod 'Spgist
+ Squeal.PostgreSQL.Definition.Index: spgist :: IndexMethod 'Spgist
- Squeal.PostgreSQL.Definition.Procedure: createOrReplaceProcedure :: (Has sch db schema, KnownSymbol pro, SListI args) => QualifiedAlias sch pro -> NP (TypeExpression db) args -> ProcedureDefinition db args -> Definition db (Alter sch (CreateOrReplace pro ( 'Procedure args) schema) db)
+ Squeal.PostgreSQL.Definition.Procedure: createOrReplaceProcedure :: (Has sch db schema, KnownSymbol pro, SListI args) => QualifiedAlias sch pro -> NP (TypeExpression db) args -> ProcedureDefinition db args -> Definition db (Alter sch (CreateOrReplace pro ('Procedure args) schema) db)
- Squeal.PostgreSQL.Definition.Procedure: createProcedure :: (Has sch db schema, KnownSymbol pro, SListI args) => QualifiedAlias sch pro -> NP (TypeExpression db) args -> ProcedureDefinition db args -> Definition db (Alter sch (Create pro ( 'Procedure args) schema) db)
+ Squeal.PostgreSQL.Definition.Procedure: createProcedure :: (Has sch db schema, KnownSymbol pro, SListI args) => QualifiedAlias sch pro -> NP (TypeExpression db) args -> ProcedureDefinition db args -> Definition db (Alter sch (Create pro ('Procedure args) schema) db)
- Squeal.PostgreSQL.Definition.Procedure: dropProcedure :: (Has sch db schema, KnownSymbol pro) => QualifiedAlias sch pro -> Definition db (Alter sch (DropSchemum pro 'Procedure schema) db)
+ Squeal.PostgreSQL.Definition.Procedure: dropProcedure :: (Has sch db schema, KnownSymbol pro) => QualifiedAlias sch pro -> Definition db (Alter sch (DropSchemum pro 'Procedure schema) db)
- Squeal.PostgreSQL.Definition.Procedure: dropProcedureIfExists :: (Has sch db schema, KnownSymbol pro) => QualifiedAlias sch pro -> Definition db (Alter sch (DropSchemumIfExists pro 'Procedure schema) db)
+ Squeal.PostgreSQL.Definition.Procedure: dropProcedureIfExists :: (Has sch db schema, KnownSymbol pro) => QualifiedAlias sch pro -> Definition db (Alter sch (DropSchemumIfExists pro 'Procedure schema) db)
- Squeal.PostgreSQL.Definition.Table: UnsafeAlterColumn :: ByteString -> AlterColumn
+ Squeal.PostgreSQL.Definition.Table: UnsafeAlterColumn :: ByteString -> AlterColumn (db :: SchemasType) (ty0 :: ColumnType) (ty1 :: ColumnType)
- Squeal.PostgreSQL.Definition.Table: UnsafeAlterTable :: ByteString -> AlterTable
+ Squeal.PostgreSQL.Definition.Table: UnsafeAlterTable :: ByteString -> AlterTable (sch :: Symbol) (tab :: Symbol) (db :: SchemasType) (table :: TableType)
- Squeal.PostgreSQL.Definition.Table: [renderAlterColumn] :: AlterColumn -> ByteString
+ Squeal.PostgreSQL.Definition.Table: [renderAlterColumn] :: AlterColumn (db :: SchemasType) (ty0 :: ColumnType) (ty1 :: ColumnType) -> ByteString
- Squeal.PostgreSQL.Definition.Table: [renderAlterTable] :: AlterTable -> ByteString
+ Squeal.PostgreSQL.Definition.Table: [renderAlterTable] :: AlterTable (sch :: Symbol) (tab :: Symbol) (db :: SchemasType) (table :: TableType) -> ByteString
- Squeal.PostgreSQL.Definition.Table: addColumn :: (AddColumn ty, KnownSymbol column, Has sch db schema, Has tab schema ( 'Table (constraints :=> columns))) => Alias column -> ColumnTypeExpression db ty -> AlterTable sch tab db (constraints :=> Create column ty columns)
+ Squeal.PostgreSQL.Definition.Table: addColumn :: (AddColumn ty, KnownSymbol column, Has sch db schema, Has tab schema ('Table (constraints :=> columns))) => Alias column -> ColumnTypeExpression db ty -> AlterTable sch tab db (constraints :=> Create column ty columns)
- Squeal.PostgreSQL.Definition.Table: addConstraint :: (KnownSymbol alias, Has sch db schema, Has tab schema ( 'Table (constraints :=> columns))) => Alias alias -> TableConstraintExpression sch tab db constraint -> AlterTable sch tab db (Create alias constraint constraints :=> columns)
+ Squeal.PostgreSQL.Definition.Table: addConstraint :: (KnownSymbol alias, Has sch db schema, Has tab schema ('Table (constraints :=> columns))) => Alias alias -> TableConstraintExpression sch tab db constraint -> AlterTable sch tab db (Create alias constraint constraints :=> columns)
- Squeal.PostgreSQL.Definition.Table: alterColumn :: (KnownSymbol column, Has sch db schema, Has tab schema ( 'Table (constraints :=> columns)), Has column columns ty0) => Alias column -> AlterColumn db ty0 ty1 -> AlterTable sch tab db (constraints :=> Alter column ty1 columns)
+ Squeal.PostgreSQL.Definition.Table: alterColumn :: (KnownSymbol column, Has sch db schema, Has tab schema ('Table (constraints :=> columns)), Has column columns ty0) => Alias column -> AlterColumn db ty0 ty1 -> AlterTable sch tab db (constraints :=> Alter column ty1 columns)
- Squeal.PostgreSQL.Definition.Table: alterTable :: (Has sch db schema, KnownSymbol tab) => QualifiedAlias sch tab -> AlterTable sch tab db table -> Definition db (Alter sch (Alter tab ( 'Table table) schema) db)
+ Squeal.PostgreSQL.Definition.Table: alterTable :: (Has sch db schema, KnownSymbol tab) => QualifiedAlias sch tab -> AlterTable sch tab db table -> Definition db (Alter sch (Alter tab ('Table table) schema) db)
- Squeal.PostgreSQL.Definition.Table: alterTableIfExists :: (Has sch db schema, KnownSymbol tab) => QualifiedAlias sch tab -> AlterTable sch tab db table -> Definition db (Alter sch (AlterIfExists tab ( 'Table table) schema) db)
+ Squeal.PostgreSQL.Definition.Table: alterTableIfExists :: (Has sch db schema, KnownSymbol tab) => QualifiedAlias sch tab -> AlterTable sch tab db table -> Definition db (Alter sch (AlterIfExists tab ('Table table) schema) db)
- Squeal.PostgreSQL.Definition.Table: alterTableRename :: (Has sch db schema, KnownSymbol tab1, Has tab0 schema ( 'Table table)) => QualifiedAlias sch tab0 -> Alias tab1 -> Definition db (Alter sch (Rename tab0 tab1 schema) db)
+ Squeal.PostgreSQL.Definition.Table: alterTableRename :: (Has sch db schema, KnownSymbol tab1, Has tab0 schema ('Table table)) => QualifiedAlias sch tab0 -> Alias tab1 -> Definition db (Alter sch (Rename tab0 tab1 schema) db)
- Squeal.PostgreSQL.Definition.Table: alterTableSetSchema :: (Has sch0 db schema0, Has tab schema0 ( 'Table table), Has sch1 db schema1) => QualifiedAlias sch0 tab -> Alias sch1 -> Definition db (SetSchema sch0 sch1 schema0 schema1 tab 'Table table db)
+ Squeal.PostgreSQL.Definition.Table: alterTableSetSchema :: (Has sch0 db schema0, Has tab schema0 ('Table table), Has sch1 db schema1) => QualifiedAlias sch0 tab -> Alias sch1 -> Definition db (SetSchema sch0 sch1 schema0 schema1 tab 'Table table db)
- Squeal.PostgreSQL.Definition.Table: createTable :: (KnownSymbol sch, KnownSymbol tab, columns ~ (col : cols), SListI columns, SListI constraints, Has sch db0 schema0, db1 ~ Alter sch (Create tab ( 'Table (constraints :=> columns)) schema0) db0) => QualifiedAlias sch tab -> NP (Aliased (ColumnTypeExpression db0)) columns -> NP (Aliased (TableConstraintExpression sch tab db1)) constraints -> Definition db0 db1
+ Squeal.PostgreSQL.Definition.Table: createTable :: (KnownSymbol sch, KnownSymbol tab, columns ~ (col : cols), SListI columns, SListI constraints, Has sch db0 schema0, db1 ~ Alter sch (Create tab ('Table (constraints :=> columns)) schema0) db0) => QualifiedAlias sch tab -> NP (Aliased (ColumnTypeExpression db0)) columns -> NP (Aliased (TableConstraintExpression sch tab db1)) constraints -> Definition db0 db1
- Squeal.PostgreSQL.Definition.Table: createTableIfNotExists :: (KnownSymbol sch, KnownSymbol tab, columns ~ (col : cols), SListI columns, SListI constraints, Has sch db0 schema0, db1 ~ Alter sch (CreateIfNotExists tab ( 'Table (constraints :=> columns)) schema0) db0) => QualifiedAlias sch tab -> NP (Aliased (ColumnTypeExpression db0)) columns -> NP (Aliased (TableConstraintExpression sch tab db1)) constraints -> Definition db0 db1
+ Squeal.PostgreSQL.Definition.Table: createTableIfNotExists :: (KnownSymbol sch, KnownSymbol tab, columns ~ (col : cols), SListI columns, SListI constraints, Has sch db0 schema0, db1 ~ Alter sch (CreateIfNotExists tab ('Table (constraints :=> columns)) schema0) db0) => QualifiedAlias sch tab -> NP (Aliased (ColumnTypeExpression db0)) columns -> NP (Aliased (TableConstraintExpression sch tab db1)) constraints -> Definition db0 db1
- Squeal.PostgreSQL.Definition.Table: dropColumn :: (KnownSymbol column, Has sch db schema, Has tab schema ( 'Table (constraints :=> columns))) => Alias column -> AlterTable sch tab db (constraints :=> Drop column columns)
+ Squeal.PostgreSQL.Definition.Table: dropColumn :: (KnownSymbol column, Has sch db schema, Has tab schema ('Table (constraints :=> columns))) => Alias column -> AlterTable sch tab db (constraints :=> Drop column columns)
- Squeal.PostgreSQL.Definition.Table: dropConstraint :: (KnownSymbol constraint, Has sch db schema, Has tab schema ( 'Table (constraints :=> columns))) => Alias constraint -> AlterTable sch tab db (Drop constraint constraints :=> columns)
+ Squeal.PostgreSQL.Definition.Table: dropConstraint :: (KnownSymbol constraint, Has sch db schema, Has tab schema ('Table (constraints :=> columns))) => Alias constraint -> AlterTable sch tab db (Drop constraint constraints :=> columns)
- Squeal.PostgreSQL.Definition.Table: dropDefault :: AlterColumn db ( 'Def :=> ty) ( 'NoDef :=> ty)
+ Squeal.PostgreSQL.Definition.Table: dropDefault :: AlterColumn db ('Def :=> ty) ('NoDef :=> ty)
- Squeal.PostgreSQL.Definition.Table: dropNotNull :: AlterColumn db (constraint :=> 'NotNull ty) (constraint :=> 'Null ty)
+ Squeal.PostgreSQL.Definition.Table: dropNotNull :: AlterColumn db (constraint :=> 'NotNull ty) (constraint :=> 'Null ty)
- Squeal.PostgreSQL.Definition.Table: dropTable :: (Has sch db schema, KnownSymbol tab) => QualifiedAlias sch tab -> Definition db (Alter sch (DropSchemum tab 'Table schema) db)
+ Squeal.PostgreSQL.Definition.Table: dropTable :: (Has sch db schema, KnownSymbol tab) => QualifiedAlias sch tab -> Definition db (Alter sch (DropSchemum tab 'Table schema) db)
- Squeal.PostgreSQL.Definition.Table: dropTableIfExists :: (Has sch db schema, KnownSymbol tab) => QualifiedAlias sch tab -> Definition db (Alter sch (DropSchemumIfExists tab 'Table schema) db)
+ Squeal.PostgreSQL.Definition.Table: dropTableIfExists :: (Has sch db schema, KnownSymbol tab) => QualifiedAlias sch tab -> Definition db (Alter sch (DropSchemumIfExists tab 'Table schema) db)
- Squeal.PostgreSQL.Definition.Table: renameColumn :: (KnownSymbol column0, KnownSymbol column1, Has sch db schema, Has tab schema ( 'Table (constraints :=> columns))) => Alias column0 -> Alias column1 -> AlterTable sch tab db (constraints :=> Rename column0 column1 columns)
+ Squeal.PostgreSQL.Definition.Table: renameColumn :: (KnownSymbol column0, KnownSymbol column1, Has sch db schema, Has tab schema ('Table (constraints :=> columns))) => Alias column0 -> Alias column1 -> AlterTable sch tab db (constraints :=> Rename column0 column1 columns)
- Squeal.PostgreSQL.Definition.Table: setDefault :: Expression 'Ungrouped '[] '[] db '[] '[] ty -> AlterColumn db (constraint :=> ty) ( 'Def :=> ty)
+ Squeal.PostgreSQL.Definition.Table: setDefault :: Expression 'Ungrouped '[] '[] db '[] '[] ty -> AlterColumn db (constraint :=> ty) ('Def :=> ty)
- Squeal.PostgreSQL.Definition.Table: setNotNull :: AlterColumn db (constraint :=> 'Null ty) (constraint :=> 'NotNull ty)
+ Squeal.PostgreSQL.Definition.Table: setNotNull :: AlterColumn db (constraint :=> 'Null ty) (constraint :=> 'NotNull ty)
- Squeal.PostgreSQL.Definition.Type: alterTypeRename :: (Has sch db schema, KnownSymbol ty1, Has ty0 schema ( 'Typedef ty)) => QualifiedAlias sch ty0 -> Alias ty1 -> Definition db (Alter sch (Rename ty0 ty1 schema) db)
+ Squeal.PostgreSQL.Definition.Type: alterTypeRename :: (Has sch db schema, KnownSymbol ty1, Has ty0 schema ('Typedef ty)) => QualifiedAlias sch ty0 -> Alias ty1 -> Definition db (Alter sch (Rename ty0 ty1 schema) db)
- Squeal.PostgreSQL.Definition.Type: alterTypeSetSchema :: (Has sch0 db schema0, Has ty schema0 ( 'Typedef td), Has sch1 db schema1) => QualifiedAlias sch0 ty -> Alias sch1 -> Definition db (SetSchema sch0 sch1 schema0 schema1 ty 'Typedef td db)
+ Squeal.PostgreSQL.Definition.Type: alterTypeSetSchema :: (Has sch0 db schema0, Has ty schema0 ('Typedef td), Has sch1 db schema1) => QualifiedAlias sch0 ty -> Alias sch1 -> Definition db (SetSchema sch0 sch1 schema0 schema1 ty 'Typedef td db)
- Squeal.PostgreSQL.Definition.Type: createDomain :: (Has sch db schema, KnownSymbol dom) => QualifiedAlias sch dom -> (forall null. TypeExpression db (null ty)) -> (forall tab. Condition 'Ungrouped '[] '[] db '[] '[tab ::: '["value" ::: 'Null ty]]) -> Definition db (Alter sch (Create dom ( 'Typedef ty) schema) db)
+ Squeal.PostgreSQL.Definition.Type: createDomain :: (Has sch db schema, KnownSymbol dom) => QualifiedAlias sch dom -> (forall null. TypeExpression db (null ty)) -> (forall tab. Condition 'Ungrouped '[] '[] db '[] '[tab ::: '["value" ::: 'Null ty]]) -> Definition db (Alter sch (Create dom ('Typedef ty) schema) db)
- Squeal.PostgreSQL.Definition.Type: createTypeComposite :: (KnownSymbol ty, Has sch db schema, SListI fields) => QualifiedAlias sch ty -> NP (Aliased (TypeExpression db)) fields -> Definition db (Alter sch (Create ty ( 'Typedef ( 'PGcomposite fields)) schema) db)
+ Squeal.PostgreSQL.Definition.Type: createTypeComposite :: (KnownSymbol ty, Has sch db schema, SListI fields) => QualifiedAlias sch ty -> NP (Aliased (TypeExpression db)) fields -> Definition db (Alter sch (Create ty ('Typedef ('PGcomposite fields)) schema) db)
- Squeal.PostgreSQL.Definition.Type: createTypeCompositeFrom :: forall hask sch ty db schema. (All (FieldTyped db) (RowPG hask), KnownSymbol ty, Has sch db schema) => QualifiedAlias sch ty -> Definition db (Alter sch (Create ty ( 'Typedef (PG (Composite hask))) schema) db)
+ Squeal.PostgreSQL.Definition.Type: createTypeCompositeFrom :: forall hask sch ty db schema. (All (FieldTyped db) (RowPG hask), KnownSymbol ty, Has sch db schema) => QualifiedAlias sch ty -> Definition db (Alter sch (Create ty ('Typedef (PG (Composite hask))) schema) db)
- Squeal.PostgreSQL.Definition.Type: createTypeEnum :: (KnownSymbol enum, Has sch db schema, All KnownSymbol labels) => QualifiedAlias sch enum -> NP PGlabel labels -> Definition db (Alter sch (Create enum ( 'Typedef ( 'PGenum labels)) schema) db)
+ Squeal.PostgreSQL.Definition.Type: createTypeEnum :: (KnownSymbol enum, Has sch db schema, All KnownSymbol labels) => QualifiedAlias sch enum -> NP PGlabel labels -> Definition db (Alter sch (Create enum ('Typedef ('PGenum labels)) schema) db)
- Squeal.PostgreSQL.Definition.Type: createTypeEnumFrom :: forall hask sch enum db schema. (Generic hask, All KnownSymbol (LabelsPG hask), KnownSymbol enum, Has sch db schema) => QualifiedAlias sch enum -> Definition db (Alter sch (Create enum ( 'Typedef (PG (Enumerated hask))) schema) db)
+ Squeal.PostgreSQL.Definition.Type: createTypeEnumFrom :: forall hask sch enum db schema. (Generic hask, All KnownSymbol (LabelsPG hask), KnownSymbol enum, Has sch db schema) => QualifiedAlias sch enum -> Definition db (Alter sch (Create enum ('Typedef (PG (Enumerated hask))) schema) db)
- Squeal.PostgreSQL.Definition.Type: createTypeRange :: (Has sch db schema, KnownSymbol range) => QualifiedAlias sch range -> (forall null. TypeExpression db (null ty)) -> Definition db (Alter sch (Create range ( 'Typedef ( 'PGrange ty)) schema) db)
+ Squeal.PostgreSQL.Definition.Type: createTypeRange :: (Has sch db schema, KnownSymbol range) => QualifiedAlias sch range -> (forall null. TypeExpression db (null ty)) -> Definition db (Alter sch (Create range ('Typedef ('PGrange ty)) schema) db)
- Squeal.PostgreSQL.Definition.Type: dropType :: (Has sch db schema, KnownSymbol td) => QualifiedAlias sch td -> Definition db (Alter sch (DropSchemum td 'Typedef schema) db)
+ Squeal.PostgreSQL.Definition.Type: dropType :: (Has sch db schema, KnownSymbol td) => QualifiedAlias sch td -> Definition db (Alter sch (DropSchemum td 'Typedef schema) db)
- Squeal.PostgreSQL.Definition.Type: dropTypeIfExists :: (Has sch db schema, KnownSymbol td) => QualifiedAlias sch td -> Definition db (Alter sch (DropSchemumIfExists td 'Typedef schema) db)
+ Squeal.PostgreSQL.Definition.Type: dropTypeIfExists :: (Has sch db schema, KnownSymbol td) => QualifiedAlias sch td -> Definition db (Alter sch (DropSchemumIfExists td 'Typedef schema) db)
- Squeal.PostgreSQL.Definition.View: alterViewRename :: (Has sch db schema, KnownSymbol ty1, Has ty0 schema ( 'View vw)) => QualifiedAlias sch ty0 -> Alias ty1 -> Definition db (Alter sch (Rename ty0 ty1 schema) db)
+ Squeal.PostgreSQL.Definition.View: alterViewRename :: (Has sch db schema, KnownSymbol ty1, Has ty0 schema ('View vw)) => QualifiedAlias sch ty0 -> Alias ty1 -> Definition db (Alter sch (Rename ty0 ty1 schema) db)
- Squeal.PostgreSQL.Definition.View: alterViewSetSchema :: (Has sch0 db schema0, Has vw schema0 ( 'View view), Has sch1 db schema1) => QualifiedAlias sch0 vw -> Alias sch1 -> Definition db (SetSchema sch0 sch1 schema0 schema1 vw 'View view db)
+ Squeal.PostgreSQL.Definition.View: alterViewSetSchema :: (Has sch0 db schema0, Has vw schema0 ('View view), Has sch1 db schema1) => QualifiedAlias sch0 vw -> Alias sch1 -> Definition db (SetSchema sch0 sch1 schema0 schema1 vw 'View view db)
- Squeal.PostgreSQL.Definition.View: createOrReplaceView :: (Has sch db schema, KnownSymbol vw) => QualifiedAlias sch vw -> Query '[] '[] db '[] view -> Definition db (Alter sch (CreateOrReplace vw ( 'View view) schema) db)
+ Squeal.PostgreSQL.Definition.View: createOrReplaceView :: (Has sch db schema, KnownSymbol vw) => QualifiedAlias sch vw -> Query '[] '[] db '[] view -> Definition db (Alter sch (CreateOrReplace vw ('View view) schema) db)
- Squeal.PostgreSQL.Definition.View: createView :: (Has sch db schema, KnownSymbol vw) => QualifiedAlias sch vw -> Query '[] '[] db '[] view -> Definition db (Alter sch (Create vw ( 'View view) schema) db)
+ Squeal.PostgreSQL.Definition.View: createView :: (Has sch db schema, KnownSymbol vw) => QualifiedAlias sch vw -> Query '[] '[] db '[] view -> Definition db (Alter sch (Create vw ('View view) schema) db)
- Squeal.PostgreSQL.Definition.View: dropView :: (Has sch db schema, KnownSymbol vw) => QualifiedAlias sch vw -> Definition db (Alter sch (DropSchemum vw 'View schema) db)
+ Squeal.PostgreSQL.Definition.View: dropView :: (Has sch db schema, KnownSymbol vw) => QualifiedAlias sch vw -> Definition db (Alter sch (DropSchemum vw 'View schema) db)
- Squeal.PostgreSQL.Expression: (&) :: () => a -> (a -> b) -> b
+ Squeal.PostgreSQL.Expression: (&) :: a -> (a -> b) -> b
- Squeal.PostgreSQL.Expression: (<@) :: PGSubset ty => Operator (null0 ty) (null1 ty) ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression: (<@) :: PGSubset ty => Operator (null0 ty) (null1 ty) ('Null 'PGbool)
- Squeal.PostgreSQL.Expression: (@&&) :: PGIntersect ty => Operator (null0 ty) (null1 ty) ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression: (@&&) :: PGIntersect ty => Operator (null0 ty) (null1 ty) ('Null 'PGbool)
- Squeal.PostgreSQL.Expression: (@>) :: PGSubset ty => Operator (null0 ty) (null1 ty) ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression: (@>) :: PGSubset ty => Operator (null0 ty) (null1 ty) ('Null 'PGbool)
- Squeal.PostgreSQL.Expression: UnsafeExpression :: ByteString -> Expression
+ Squeal.PostgreSQL.Expression: UnsafeExpression :: ByteString -> Expression (grp :: Grouping) (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (from :: FromType) (ty :: NullType)
- Squeal.PostgreSQL.Expression: [renderExpression] :: Expression -> ByteString
+ Squeal.PostgreSQL.Expression: [renderExpression] :: Expression (grp :: Grouping) (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (from :: FromType) (ty :: NullType) -> ByteString
- Squeal.PostgreSQL.Expression: function :: (Has sch db schema, Has fun schema ( 'Function ('[x] :=> 'Returns y))) => QualifiedAlias sch fun -> Fun db x y
+ Squeal.PostgreSQL.Expression: function :: (Has sch db schema, Has fun schema ('Function ('[x] :=> 'Returns y))) => QualifiedAlias sch fun -> Fun db x y
- Squeal.PostgreSQL.Expression: functionN :: (Has sch db schema, Has fun schema ( 'Function (xs :=> 'Returns y)), SListI xs) => QualifiedAlias sch fun -> FunN db xs y
+ Squeal.PostgreSQL.Expression: functionN :: (Has sch db schema, Has fun schema ('Function (xs :=> 'Returns y)), SListI xs) => QualifiedAlias sch fun -> FunN db xs y
- Squeal.PostgreSQL.Expression.Aggregate: AggregateAll :: NP (Expression 'Ungrouped lat with db params from) xs -> [SortExpression 'Ungrouped lat with db params from] -> [Condition 'Ungrouped lat with db params from] -> AggregateArg
+ Squeal.PostgreSQL.Expression.Aggregate: AggregateAll :: NP (Expression 'Ungrouped lat with db params from) xs -> [SortExpression 'Ungrouped lat with db params from] -> [Condition 'Ungrouped lat with db params from] -> AggregateArg (xs :: [NullType]) (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (from :: FromType)
- Squeal.PostgreSQL.Expression.Aggregate: AggregateDistinct :: NP (Expression 'Ungrouped lat with db params from) xs -> [SortExpression 'Ungrouped lat with db params from] -> [Condition 'Ungrouped lat with db params from] -> AggregateArg
+ Squeal.PostgreSQL.Expression.Aggregate: AggregateDistinct :: NP (Expression 'Ungrouped lat with db params from) xs -> [SortExpression 'Ungrouped lat with db params from] -> [Condition 'Ungrouped lat with db params from] -> AggregateArg (xs :: [NullType]) (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (from :: FromType)
- Squeal.PostgreSQL.Expression.Aggregate: [aggregateArgs] :: AggregateArg -> NP (Expression 'Ungrouped lat with db params from) xs
+ Squeal.PostgreSQL.Expression.Aggregate: [aggregateArgs] :: AggregateArg (xs :: [NullType]) (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (from :: FromType) -> NP (Expression 'Ungrouped lat with db params from) xs
- Squeal.PostgreSQL.Expression.Aggregate: [aggregateFilter] :: AggregateArg -> [Condition 'Ungrouped lat with db params from]
+ Squeal.PostgreSQL.Expression.Aggregate: [aggregateFilter] :: AggregateArg (xs :: [NullType]) (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (from :: FromType) -> [Condition 'Ungrouped lat with db params from]
- Squeal.PostgreSQL.Expression.Aggregate: [aggregateOrder] :: AggregateArg -> [SortExpression 'Ungrouped lat with db params from]
+ Squeal.PostgreSQL.Expression.Aggregate: [aggregateOrder] :: AggregateArg (xs :: [NullType]) (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (from :: FromType) -> [SortExpression 'Ungrouped lat with db params from]
- Squeal.PostgreSQL.Expression.Aggregate: allNotNull :: Expression 'Ungrouped lat with db params from ( 'Null x) -> AggregateArg '[ 'NotNull x] lat with db params from
+ Squeal.PostgreSQL.Expression.Aggregate: allNotNull :: Expression 'Ungrouped lat with db params from ('Null x) -> AggregateArg '[ 'NotNull x] lat with db params from
- Squeal.PostgreSQL.Expression.Aggregate: arrayAgg :: Aggregate arg expr => arg '[ty] lat with db params from -> expr lat with db params from ( 'Null ( 'PGvararray ty))
+ Squeal.PostgreSQL.Expression.Aggregate: arrayAgg :: Aggregate arg expr => arg '[ty] lat with db params from -> expr lat with db params from ('Null ('PGvararray ty))
- Squeal.PostgreSQL.Expression.Aggregate: avg :: Aggregate arg expr => arg '[null ty] lat with db params from -> expr lat with db params from ( 'Null (PGAvg ty))
+ Squeal.PostgreSQL.Expression.Aggregate: avg :: Aggregate arg expr => arg '[null ty] lat with db params from -> expr lat with db params from ('Null (PGAvg ty))
- Squeal.PostgreSQL.Expression.Aggregate: bitAnd :: (Aggregate arg expr, int `In` PGIntegral) => arg '[null int] lat with db params from -> expr lat with db params from ( 'Null int)
+ Squeal.PostgreSQL.Expression.Aggregate: bitAnd :: (Aggregate arg expr, int `In` PGIntegral) => arg '[null int] lat with db params from -> expr lat with db params from ('Null int)
- Squeal.PostgreSQL.Expression.Aggregate: bitOr :: (Aggregate arg expr, int `In` PGIntegral) => arg '[null int] lat with db params from -> expr lat with db params from ( 'Null int)
+ Squeal.PostgreSQL.Expression.Aggregate: bitOr :: (Aggregate arg expr, int `In` PGIntegral) => arg '[null int] lat with db params from -> expr lat with db params from ('Null int)
- Squeal.PostgreSQL.Expression.Aggregate: boolAnd :: Aggregate arg expr => arg '[null 'PGbool] lat with db params from -> expr lat with db params from ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression.Aggregate: boolAnd :: Aggregate arg expr => arg '[null 'PGbool] lat with db params from -> expr lat with db params from ('Null 'PGbool)
- Squeal.PostgreSQL.Expression.Aggregate: boolOr :: Aggregate arg expr => arg '[null 'PGbool] lat with db params from -> expr lat with db params from ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression.Aggregate: boolOr :: Aggregate arg expr => arg '[null 'PGbool] lat with db params from -> expr lat with db params from ('Null 'PGbool)
- Squeal.PostgreSQL.Expression.Aggregate: corr :: Aggregate arg expr => arg '[null 'PGfloat8, null 'PGfloat8] lat with db params from -> expr lat with db params from ( 'Null 'PGfloat8)
+ Squeal.PostgreSQL.Expression.Aggregate: corr :: Aggregate arg expr => arg '[null 'PGfloat8, null 'PGfloat8] lat with db params from -> expr lat with db params from ('Null 'PGfloat8)
- Squeal.PostgreSQL.Expression.Aggregate: count :: Aggregate arg expr => arg '[ty] lat with db params from -> expr lat with db params from ( 'NotNull 'PGint8)
+ Squeal.PostgreSQL.Expression.Aggregate: count :: Aggregate arg expr => arg '[ty] lat with db params from -> expr lat with db params from ('NotNull 'PGint8)
- Squeal.PostgreSQL.Expression.Aggregate: countStar :: Aggregate arg expr => expr lat with db params from ( 'NotNull 'PGint8)
+ Squeal.PostgreSQL.Expression.Aggregate: countStar :: Aggregate arg expr => expr lat with db params from ('NotNull 'PGint8)
- Squeal.PostgreSQL.Expression.Aggregate: covarPop :: Aggregate arg expr => arg '[null 'PGfloat8, null 'PGfloat8] lat with db params from -> expr lat with db params from ( 'Null 'PGfloat8)
+ Squeal.PostgreSQL.Expression.Aggregate: covarPop :: Aggregate arg expr => arg '[null 'PGfloat8, null 'PGfloat8] lat with db params from -> expr lat with db params from ('Null 'PGfloat8)
- Squeal.PostgreSQL.Expression.Aggregate: covarSamp :: Aggregate arg expr => arg '[null 'PGfloat8, null 'PGfloat8] lat with db params from -> expr lat with db params from ( 'Null 'PGfloat8)
+ Squeal.PostgreSQL.Expression.Aggregate: covarSamp :: Aggregate arg expr => arg '[null 'PGfloat8, null 'PGfloat8] lat with db params from -> expr lat with db params from ('Null 'PGfloat8)
- Squeal.PostgreSQL.Expression.Aggregate: distinctNotNull :: Expression 'Ungrouped lat with db params from ( 'Null x) -> AggregateArg '[ 'NotNull x] lat with db params from
+ Squeal.PostgreSQL.Expression.Aggregate: distinctNotNull :: Expression 'Ungrouped lat with db params from ('Null x) -> AggregateArg '[ 'NotNull x] lat with db params from
- Squeal.PostgreSQL.Expression.Aggregate: every :: Aggregate arg expr => arg '[null 'PGbool] lat with db params from -> expr lat with db params from ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression.Aggregate: every :: Aggregate arg expr => arg '[null 'PGbool] lat with db params from -> expr lat with db params from ('Null 'PGbool)
- Squeal.PostgreSQL.Expression.Aggregate: jsonAgg :: Aggregate arg expr => arg '[ty] lat with db params from -> expr lat with db params from ( 'Null 'PGjson)
+ Squeal.PostgreSQL.Expression.Aggregate: jsonAgg :: Aggregate arg expr => arg '[ty] lat with db params from -> expr lat with db params from ('Null 'PGjson)
- Squeal.PostgreSQL.Expression.Aggregate: jsonbAgg :: Aggregate arg expr => arg '[ty] lat with db params from -> expr lat with db params from ( 'Null 'PGjsonb)
+ Squeal.PostgreSQL.Expression.Aggregate: jsonbAgg :: Aggregate arg expr => arg '[ty] lat with db params from -> expr lat with db params from ('Null 'PGjsonb)
- Squeal.PostgreSQL.Expression.Aggregate: max_ :: Aggregate arg expr => arg '[null ty] lat with db params from -> expr lat with db params from ( 'Null ty)
+ Squeal.PostgreSQL.Expression.Aggregate: max_ :: Aggregate arg expr => arg '[null ty] lat with db params from -> expr lat with db params from ('Null ty)
- Squeal.PostgreSQL.Expression.Aggregate: min_ :: Aggregate arg expr => arg '[null ty] lat with db params from -> expr lat with db params from ( 'Null ty)
+ Squeal.PostgreSQL.Expression.Aggregate: min_ :: Aggregate arg expr => arg '[null ty] lat with db params from -> expr lat with db params from ('Null ty)
- Squeal.PostgreSQL.Expression.Aggregate: pattern All :: Expression 'Ungrouped lat with db params from x -> AggregateArg '[x] lat with db params from
+ Squeal.PostgreSQL.Expression.Aggregate: pattern All :: Expression 'Ungrouped lat with db params from x -> AggregateArg '[x] lat with db params from
- Squeal.PostgreSQL.Expression.Aggregate: pattern Alls :: NP (Expression 'Ungrouped lat with db params from) xs -> AggregateArg xs lat with db params from
+ Squeal.PostgreSQL.Expression.Aggregate: pattern Alls :: NP (Expression 'Ungrouped lat with db params from) xs -> AggregateArg xs lat with db params from
- Squeal.PostgreSQL.Expression.Aggregate: pattern Distinct :: Expression 'Ungrouped lat with db params from x -> AggregateArg '[x] lat with db params from
+ Squeal.PostgreSQL.Expression.Aggregate: pattern Distinct :: Expression 'Ungrouped lat with db params from x -> AggregateArg '[x] lat with db params from
- Squeal.PostgreSQL.Expression.Aggregate: pattern Distincts :: NP (Expression 'Ungrouped lat with db params from) xs -> AggregateArg xs lat with db params from
+ Squeal.PostgreSQL.Expression.Aggregate: pattern Distincts :: NP (Expression 'Ungrouped lat with db params from) xs -> AggregateArg xs lat with db params from
- Squeal.PostgreSQL.Expression.Aggregate: regrAvgX :: Aggregate arg expr => arg '[null 'PGfloat8, null 'PGfloat8] lat with db params from -> expr lat with db params from ( 'Null 'PGfloat8)
+ Squeal.PostgreSQL.Expression.Aggregate: regrAvgX :: Aggregate arg expr => arg '[null 'PGfloat8, null 'PGfloat8] lat with db params from -> expr lat with db params from ('Null 'PGfloat8)
- Squeal.PostgreSQL.Expression.Aggregate: regrAvgY :: Aggregate arg expr => arg '[null 'PGfloat8, null 'PGfloat8] lat with db params from -> expr lat with db params from ( 'Null 'PGfloat8)
+ Squeal.PostgreSQL.Expression.Aggregate: regrAvgY :: Aggregate arg expr => arg '[null 'PGfloat8, null 'PGfloat8] lat with db params from -> expr lat with db params from ('Null 'PGfloat8)
- Squeal.PostgreSQL.Expression.Aggregate: regrCount :: Aggregate arg expr => arg '[null 'PGfloat8, null 'PGfloat8] lat with db params from -> expr lat with db params from ( 'Null 'PGint8)
+ Squeal.PostgreSQL.Expression.Aggregate: regrCount :: Aggregate arg expr => arg '[null 'PGfloat8, null 'PGfloat8] lat with db params from -> expr lat with db params from ('Null 'PGint8)
- Squeal.PostgreSQL.Expression.Aggregate: regrIntercept :: Aggregate arg expr => arg '[null 'PGfloat8, null 'PGfloat8] lat with db params from -> expr lat with db params from ( 'Null 'PGfloat8)
+ Squeal.PostgreSQL.Expression.Aggregate: regrIntercept :: Aggregate arg expr => arg '[null 'PGfloat8, null 'PGfloat8] lat with db params from -> expr lat with db params from ('Null 'PGfloat8)
- Squeal.PostgreSQL.Expression.Aggregate: regrR2 :: Aggregate arg expr => arg '[null 'PGfloat8, null 'PGfloat8] lat with db params from -> expr lat with db params from ( 'Null 'PGfloat8)
+ Squeal.PostgreSQL.Expression.Aggregate: regrR2 :: Aggregate arg expr => arg '[null 'PGfloat8, null 'PGfloat8] lat with db params from -> expr lat with db params from ('Null 'PGfloat8)
- Squeal.PostgreSQL.Expression.Aggregate: regrSlope :: Aggregate arg expr => arg '[null 'PGfloat8, null 'PGfloat8] lat with db params from -> expr lat with db params from ( 'Null 'PGfloat8)
+ Squeal.PostgreSQL.Expression.Aggregate: regrSlope :: Aggregate arg expr => arg '[null 'PGfloat8, null 'PGfloat8] lat with db params from -> expr lat with db params from ('Null 'PGfloat8)
- Squeal.PostgreSQL.Expression.Aggregate: regrSxx :: Aggregate arg expr => arg '[null 'PGfloat8, null 'PGfloat8] lat with db params from -> expr lat with db params from ( 'Null 'PGfloat8)
+ Squeal.PostgreSQL.Expression.Aggregate: regrSxx :: Aggregate arg expr => arg '[null 'PGfloat8, null 'PGfloat8] lat with db params from -> expr lat with db params from ('Null 'PGfloat8)
- Squeal.PostgreSQL.Expression.Aggregate: regrSxy :: Aggregate arg expr => arg '[null 'PGfloat8, null 'PGfloat8] lat with db params from -> expr lat with db params from ( 'Null 'PGfloat8)
+ Squeal.PostgreSQL.Expression.Aggregate: regrSxy :: Aggregate arg expr => arg '[null 'PGfloat8, null 'PGfloat8] lat with db params from -> expr lat with db params from ('Null 'PGfloat8)
- Squeal.PostgreSQL.Expression.Aggregate: regrSyy :: Aggregate arg expr => arg '[null 'PGfloat8, null 'PGfloat8] lat with db params from -> expr lat with db params from ( 'Null 'PGfloat8)
+ Squeal.PostgreSQL.Expression.Aggregate: regrSyy :: Aggregate arg expr => arg '[null 'PGfloat8, null 'PGfloat8] lat with db params from -> expr lat with db params from ('Null 'PGfloat8)
- Squeal.PostgreSQL.Expression.Aggregate: stddev :: Aggregate arg expr => arg '[null ty] lat with db params from -> expr lat with db params from ( 'Null (PGAvg ty))
+ Squeal.PostgreSQL.Expression.Aggregate: stddev :: Aggregate arg expr => arg '[null ty] lat with db params from -> expr lat with db params from ('Null (PGAvg ty))
- Squeal.PostgreSQL.Expression.Aggregate: stddevPop :: Aggregate arg expr => arg '[null ty] lat with db params from -> expr lat with db params from ( 'Null (PGAvg ty))
+ Squeal.PostgreSQL.Expression.Aggregate: stddevPop :: Aggregate arg expr => arg '[null ty] lat with db params from -> expr lat with db params from ('Null (PGAvg ty))
- Squeal.PostgreSQL.Expression.Aggregate: stddevSamp :: Aggregate arg expr => arg '[null ty] lat with db params from -> expr lat with db params from ( 'Null (PGAvg ty))
+ Squeal.PostgreSQL.Expression.Aggregate: stddevSamp :: Aggregate arg expr => arg '[null ty] lat with db params from -> expr lat with db params from ('Null (PGAvg ty))
- Squeal.PostgreSQL.Expression.Aggregate: sum_ :: Aggregate arg expr => arg '[null ty] lat with db params from -> expr lat with db params from ( 'Null (PGSum ty))
+ Squeal.PostgreSQL.Expression.Aggregate: sum_ :: Aggregate arg expr => arg '[null ty] lat with db params from -> expr lat with db params from ('Null (PGSum ty))
- Squeal.PostgreSQL.Expression.Aggregate: varPop :: Aggregate arg expr => arg '[null ty] lat with db params from -> expr lat with db params from ( 'Null (PGAvg ty))
+ Squeal.PostgreSQL.Expression.Aggregate: varPop :: Aggregate arg expr => arg '[null ty] lat with db params from -> expr lat with db params from ('Null (PGAvg ty))
- Squeal.PostgreSQL.Expression.Aggregate: varSamp :: Aggregate arg expr => arg '[null ty] lat with db params from -> expr lat with db params from ( 'Null (PGAvg ty))
+ Squeal.PostgreSQL.Expression.Aggregate: varSamp :: Aggregate arg expr => arg '[null ty] lat with db params from -> expr lat with db params from ('Null (PGAvg ty))
- Squeal.PostgreSQL.Expression.Aggregate: variance :: Aggregate arg expr => arg '[null ty] lat with db params from -> expr lat with db params from ( 'Null (PGAvg ty))
+ Squeal.PostgreSQL.Expression.Aggregate: variance :: Aggregate arg expr => arg '[null ty] lat with db params from -> expr lat with db params from ('Null (PGAvg ty))
- Squeal.PostgreSQL.Expression.Array: arrAll :: Expression grp lat with db params from ty1 -> Operator ty1 ty2 ( 'Null 'PGbool) -> Expression grp lat with db params from ( 'Null ( 'PGvararray ty2)) -> Condition grp lat with db params from
+ Squeal.PostgreSQL.Expression.Array: arrAll :: Expression grp lat with db params from ty1 -> Operator ty1 ty2 ('Null 'PGbool) -> Expression grp lat with db params from ('Null ('PGvararray ty2)) -> Condition grp lat with db params from
- Squeal.PostgreSQL.Expression.Array: arrAny :: Expression grp lat with db params from ty1 -> Operator ty1 ty2 ( 'Null 'PGbool) -> Expression grp lat with db params from ( 'Null ( 'PGvararray ty2)) -> Condition grp lat with db params from
+ Squeal.PostgreSQL.Expression.Array: arrAny :: Expression grp lat with db params from ty1 -> Operator ty1 ty2 ('Null 'PGbool) -> Expression grp lat with db params from ('Null ('PGvararray ty2)) -> Condition grp lat with db params from
- Squeal.PostgreSQL.Expression.Array: array :: [Expression grp lat with db params from ty] -> Expression grp lat with db params from (null ( 'PGvararray ty))
+ Squeal.PostgreSQL.Expression.Array: array :: [Expression grp lat with db params from ty] -> Expression grp lat with db params from (null ('PGvararray ty))
- Squeal.PostgreSQL.Expression.Array: array0 :: TypeExpression db ty -> Expression grp lat with db params from (null ( 'PGvararray ty))
+ Squeal.PostgreSQL.Expression.Array: array0 :: TypeExpression db ty -> Expression grp lat with db params from (null ('PGvararray ty))
- Squeal.PostgreSQL.Expression.Array: array1 :: (n ~ Length tys, All ((~) ty) tys) => NP (Expression grp lat with db params from) tys -> Expression grp lat with db params from (null ( 'PGfixarray '[n] ty))
+ Squeal.PostgreSQL.Expression.Array: array1 :: (n ~ Length tys, All ((~) ty) tys) => NP (Expression grp lat with db params from) tys -> Expression grp lat with db params from (null ('PGfixarray '[n] ty))
- Squeal.PostgreSQL.Expression.Array: array2 :: (All ((~) tys) tyss, All SListI tyss, Length tyss ~ n1, All ((~) ty) tys, Length tys ~ n2) => NP (NP (Expression grp lat with db params from)) tyss -> Expression grp lat with db params from (null ( 'PGfixarray '[n1, n2] ty))
+ Squeal.PostgreSQL.Expression.Array: array2 :: (All ((~) tys) tyss, All SListI tyss, Length tyss ~ n1, All ((~) ty) tys, Length tys ~ n2) => NP (NP (Expression grp lat with db params from)) tyss -> Expression grp lat with db params from (null ('PGfixarray '[n1, n2] ty))
- Squeal.PostgreSQL.Expression.Array: cardinality :: null ( 'PGvararray ty) --> null 'PGint8
+ Squeal.PostgreSQL.Expression.Array: cardinality :: null ('PGvararray ty) --> null 'PGint8
- Squeal.PostgreSQL.Expression.Array: index :: Word64 -> null ( 'PGvararray ty) --> NullifyType ty
+ Squeal.PostgreSQL.Expression.Array: index :: Word64 -> null ('PGvararray ty) --> NullifyType ty
- Squeal.PostgreSQL.Expression.Array: index1 :: forall i n ty. (1 <= i, i <= n, KnownNat i) => 'NotNull ( 'PGfixarray '[n] ty) --> ty
+ Squeal.PostgreSQL.Expression.Array: index1 :: forall i n ty. (1 <= i, i <= n, KnownNat i) => 'NotNull ('PGfixarray '[n] ty) --> ty
- Squeal.PostgreSQL.Expression.Array: index2 :: forall i j m n ty. (1 <= i, i <= m, KnownNat i, 1 <= j, j <= n, KnownNat j) => 'NotNull ( 'PGfixarray '[m, n] ty) --> ty
+ Squeal.PostgreSQL.Expression.Array: index2 :: forall i j m n ty. (1 <= i, i <= m, KnownNat i, 1 <= j, j <= n, KnownNat j) => 'NotNull ('PGfixarray '[m, n] ty) --> ty
- Squeal.PostgreSQL.Expression.Array: unnest :: null ( 'PGvararray ty) -|-> ("unnest" ::: '["unnest" ::: ty])
+ Squeal.PostgreSQL.Expression.Array: unnest :: null ('PGvararray ty) -|-> ("unnest" ::: '["unnest" ::: ty])
- Squeal.PostgreSQL.Expression.Comparison: (./=) :: Operator (null0 ty) (null1 ty) ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression.Comparison: (./=) :: Operator (null0 ty) (null1 ty) ('Null 'PGbool)
- Squeal.PostgreSQL.Expression.Comparison: (.<) :: Operator (null0 ty) (null1 ty) ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression.Comparison: (.<) :: Operator (null0 ty) (null1 ty) ('Null 'PGbool)
- Squeal.PostgreSQL.Expression.Comparison: (.<=) :: Operator (null0 ty) (null1 ty) ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression.Comparison: (.<=) :: Operator (null0 ty) (null1 ty) ('Null 'PGbool)
- Squeal.PostgreSQL.Expression.Comparison: (.==) :: Operator (null0 ty) (null1 ty) ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression.Comparison: (.==) :: Operator (null0 ty) (null1 ty) ('Null 'PGbool)
- Squeal.PostgreSQL.Expression.Comparison: (.>) :: Operator (null0 ty) (null1 ty) ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression.Comparison: (.>) :: Operator (null0 ty) (null1 ty) ('Null 'PGbool)
- Squeal.PostgreSQL.Expression.Comparison: (.>=) :: Operator (null0 ty) (null1 ty) ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression.Comparison: (.>=) :: Operator (null0 ty) (null1 ty) ('Null 'PGbool)
- Squeal.PostgreSQL.Expression.Comparison: isDistinctFrom :: Operator (null0 ty) (null1 ty) ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression.Comparison: isDistinctFrom :: Operator (null0 ty) (null1 ty) (null 'PGbool)
- Squeal.PostgreSQL.Expression.Comparison: isFalse :: null0 'PGbool --> null1 'PGbool
+ Squeal.PostgreSQL.Expression.Comparison: isFalse :: null0 'PGbool --> null1 'PGbool
- Squeal.PostgreSQL.Expression.Comparison: isNotDistinctFrom :: Operator (null0 ty) (null1 ty) ( 'NotNull 'PGbool)
+ Squeal.PostgreSQL.Expression.Comparison: isNotDistinctFrom :: Operator (null0 ty) (null1 ty) (null 'PGbool)
- Squeal.PostgreSQL.Expression.Comparison: isNotFalse :: null0 'PGbool --> null1 'PGbool
+ Squeal.PostgreSQL.Expression.Comparison: isNotFalse :: null0 'PGbool --> null1 'PGbool
- Squeal.PostgreSQL.Expression.Comparison: isNotTrue :: null0 'PGbool --> null1 'PGbool
+ Squeal.PostgreSQL.Expression.Comparison: isNotTrue :: null0 'PGbool --> null1 'PGbool
- Squeal.PostgreSQL.Expression.Comparison: isNotUnknown :: null0 'PGbool --> null1 'PGbool
+ Squeal.PostgreSQL.Expression.Comparison: isNotUnknown :: null0 'PGbool --> null1 'PGbool
- Squeal.PostgreSQL.Expression.Comparison: isTrue :: null0 'PGbool --> null1 'PGbool
+ Squeal.PostgreSQL.Expression.Comparison: isTrue :: null0 'PGbool --> null1 'PGbool
- Squeal.PostgreSQL.Expression.Comparison: isUnknown :: null0 'PGbool --> null1 'PGbool
+ Squeal.PostgreSQL.Expression.Comparison: isUnknown :: null0 'PGbool --> null1 'PGbool
- Squeal.PostgreSQL.Expression.Composite: field :: (Has sch db schema, Has tydef schema ( 'Typedef ( 'PGcomposite row)), Has field row ty) => QualifiedAlias sch tydef -> Alias field -> Expression grp lat with db params from ( 'NotNull ( 'PGcomposite row)) -> Expression grp lat with db params from ty
+ Squeal.PostgreSQL.Expression.Composite: field :: (Has sch db schema, Has tydef schema ('Typedef ('PGcomposite row)), Has field row ty) => QualifiedAlias sch tydef -> Alias field -> Expression grp lat with db params from ('NotNull ('PGcomposite row)) -> Expression grp lat with db params from ty
- Squeal.PostgreSQL.Expression.Composite: row :: SListI row => NP (Aliased (Expression grp lat with db params from)) row -> Expression grp lat with db params from (null ( 'PGcomposite row))
+ Squeal.PostgreSQL.Expression.Composite: row :: SListI row => NP (Aliased (Expression grp lat with db params from)) row -> Expression grp lat with db params from (null ('PGcomposite row))
- Squeal.PostgreSQL.Expression.Composite: rowStar :: Has tab from row => Alias tab -> Expression grp lat with db params from (null ( 'PGcomposite row))
+ Squeal.PostgreSQL.Expression.Composite: rowStar :: Has tab from row => Alias tab -> Expression grp lat with db params from (null ('PGcomposite row))
- Squeal.PostgreSQL.Expression.Default: [Default] :: Optional expr ( 'Def :=> ty)
+ Squeal.PostgreSQL.Expression.Default: [Default] :: Optional expr ('Def :=> ty)
- Squeal.PostgreSQL.Expression.Default: pattern NotDefault :: ty -> Optional I ( 'Def :=> ty)
+ Squeal.PostgreSQL.Expression.Default: pattern NotDefault :: ty -> Optional I ('Def :=> ty)
- Squeal.PostgreSQL.Expression.Inline: inlineColumns :: (IsRecord hask xs, AllZip InlineColumn xs columns) => hask -> NP (Aliased (Optional (Expression 'Ungrouped '[] with db params '[]))) columns
+ Squeal.PostgreSQL.Expression.Inline: inlineColumns :: (IsRecord hask xs, AllZip InlineColumn xs columns) => hask -> NP (Aliased (Optional (Expression 'Ungrouped '[] with db params '[]))) columns
- Squeal.PostgreSQL.Expression.Inline: inlineFields :: (IsRecord hask fields, AllZip InlineField fields row) => hask -> NP (Aliased (Expression 'Ungrouped '[] with db params '[])) row
+ Squeal.PostgreSQL.Expression.Inline: inlineFields :: (IsRecord hask fields, AllZip InlineField fields row) => hask -> NP (Aliased (Expression 'Ungrouped '[] with db params '[])) row
- Squeal.PostgreSQL.Expression.Json: (#-.) :: Operator (null 'PGjsonb) (null ( 'PGvararray ( 'NotNull 'PGtext))) (null 'PGjsonb)
+ Squeal.PostgreSQL.Expression.Json: (#-.) :: Operator (null 'PGjsonb) (null ('PGvararray ('NotNull 'PGtext))) (null 'PGjsonb)
- Squeal.PostgreSQL.Expression.Json: (.#>) :: json `In` PGJsonType => Operator (null json) (null ( 'PGvararray ( 'NotNull 'PGtext))) ( 'Null json)
+ Squeal.PostgreSQL.Expression.Json: (.#>) :: json `In` PGJsonType => Operator (null json) (null ('PGvararray ('NotNull 'PGtext))) ('Null json)
- Squeal.PostgreSQL.Expression.Json: (.#>>) :: json `In` PGJsonType => Operator (null json) (null ( 'PGvararray ( 'NotNull 'PGtext))) ( 'Null 'PGtext)
+ Squeal.PostgreSQL.Expression.Json: (.#>>) :: json `In` PGJsonType => Operator (null json) (null ('PGvararray ('NotNull 'PGtext))) ('Null 'PGtext)
- Squeal.PostgreSQL.Expression.Json: (.-.) :: key `In` '[ 'PGtext, 'PGvararray ( 'NotNull 'PGtext), 'PGint4, 'PGint2] => Operator (null 'PGjsonb) (null key) (null 'PGjsonb)
+ Squeal.PostgreSQL.Expression.Json: (.-.) :: key `In` '[ 'PGtext, 'PGvararray ('NotNull 'PGtext), 'PGint4, 'PGint2] => Operator (null 'PGjsonb) (null key) (null 'PGjsonb)
- Squeal.PostgreSQL.Expression.Json: (.->) :: (json `In` PGJsonType, key `In` PGJsonKey) => Operator (null json) (null key) ( 'Null json)
+ Squeal.PostgreSQL.Expression.Json: (.->) :: (json `In` PGJsonType, key `In` PGJsonKey) => Operator (null json) (null key) ('Null json)
- Squeal.PostgreSQL.Expression.Json: (.->>) :: (json `In` PGJsonType, key `In` PGJsonKey) => Operator (null json) (null key) ( 'Null 'PGtext)
+ Squeal.PostgreSQL.Expression.Json: (.->>) :: (json `In` PGJsonType, key `In` PGJsonKey) => Operator (null json) (null key) ('Null 'PGtext)
- Squeal.PostgreSQL.Expression.Json: (.?&) :: Operator (null 'PGjsonb) (null ( 'PGvararray ( 'NotNull 'PGtext))) ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression.Json: (.?&) :: Operator (null 'PGjsonb) (null ('PGvararray ('NotNull 'PGtext))) ('Null 'PGbool)
- Squeal.PostgreSQL.Expression.Json: (.?) :: Operator (null 'PGjsonb) (null 'PGtext) ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression.Json: (.?) :: Operator (null 'PGjsonb) (null 'PGtext) ('Null 'PGbool)
- Squeal.PostgreSQL.Expression.Json: (.?|) :: Operator (null 'PGjsonb) (null ( 'PGvararray ( 'NotNull 'PGtext))) ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression.Json: (.?|) :: Operator (null 'PGjsonb) (null ('PGvararray ('NotNull 'PGtext))) ('Null 'PGbool)
- Squeal.PostgreSQL.Expression.Json: arrayToJson :: null ( 'PGvararray ty) --> null 'PGjson
+ Squeal.PostgreSQL.Expression.Json: arrayToJson :: null ('PGvararray ty) --> null 'PGjson
- Squeal.PostgreSQL.Expression.Json: jsonArrayLength :: null 'PGjson --> null 'PGint4
+ Squeal.PostgreSQL.Expression.Json: jsonArrayLength :: null 'PGjson --> null 'PGint4
- Squeal.PostgreSQL.Expression.Json: jsonBuildArray :: SListI tuple => tuple ---> null 'PGjson
+ Squeal.PostgreSQL.Expression.Json: jsonBuildArray :: SListI tuple => tuple ---> null 'PGjson
- Squeal.PostgreSQL.Expression.Json: jsonBuildObject :: JsonBuildObject tys => tys ---> null 'PGjson
+ Squeal.PostgreSQL.Expression.Json: jsonBuildObject :: JsonBuildObject tys => tys ---> null 'PGjson
- Squeal.PostgreSQL.Expression.Json: jsonEach :: null 'PGjson -|-> ("json_each" ::: '["key" ::: 'NotNull 'PGtext, "value" ::: 'NotNull 'PGjson])
+ Squeal.PostgreSQL.Expression.Json: jsonEach :: null 'PGjson -|-> ("json_each" ::: '["key" ::: 'NotNull 'PGtext, "value" ::: 'NotNull 'PGjson])
- Squeal.PostgreSQL.Expression.Json: jsonEachText :: null 'PGjson -|-> ("json_each_text" ::: '["key" ::: 'NotNull 'PGtext, "value" ::: 'NotNull 'PGtext])
+ Squeal.PostgreSQL.Expression.Json: jsonEachText :: null 'PGjson -|-> ("json_each_text" ::: '["key" ::: 'NotNull 'PGtext, "value" ::: 'NotNull 'PGtext])
- Squeal.PostgreSQL.Expression.Json: jsonObject :: null ( 'PGfixarray '[n, 2] ( 'NotNull 'PGtext)) --> null 'PGjson
+ Squeal.PostgreSQL.Expression.Json: jsonObject :: null ('PGfixarray '[n, 2] ('NotNull 'PGtext)) --> null 'PGjson
- Squeal.PostgreSQL.Expression.Json: jsonObjectKeys :: null 'PGjson -|-> ("json_object_keys" ::: '["json_object_keys" ::: 'NotNull 'PGtext])
+ Squeal.PostgreSQL.Expression.Json: jsonObjectKeys :: null 'PGjson -|-> ("json_object_keys" ::: '["json_object_keys" ::: 'NotNull 'PGtext])
- Squeal.PostgreSQL.Expression.Json: jsonPopulateRecord :: JsonPopulateFunction "json_populate_record" 'PGjson
+ Squeal.PostgreSQL.Expression.Json: jsonPopulateRecord :: JsonPopulateFunction "json_populate_record" 'PGjson
- Squeal.PostgreSQL.Expression.Json: jsonPopulateRecordSet :: JsonPopulateFunction "json_populate_record_set" 'PGjson
+ Squeal.PostgreSQL.Expression.Json: jsonPopulateRecordSet :: JsonPopulateFunction "json_populate_record_set" 'PGjson
- Squeal.PostgreSQL.Expression.Json: jsonStripNulls :: null 'PGjson --> null 'PGjson
+ Squeal.PostgreSQL.Expression.Json: jsonStripNulls :: null 'PGjson --> null 'PGjson
- Squeal.PostgreSQL.Expression.Json: jsonToRecord :: JsonToRecordFunction 'PGjson
+ Squeal.PostgreSQL.Expression.Json: jsonToRecord :: JsonToRecordFunction 'PGjson
- Squeal.PostgreSQL.Expression.Json: jsonToRecordSet :: JsonToRecordFunction 'PGjson
+ Squeal.PostgreSQL.Expression.Json: jsonToRecordSet :: JsonToRecordFunction 'PGjson
- Squeal.PostgreSQL.Expression.Json: jsonTypeof :: null 'PGjson --> null 'PGtext
+ Squeal.PostgreSQL.Expression.Json: jsonTypeof :: null 'PGjson --> null 'PGtext
- Squeal.PostgreSQL.Expression.Json: jsonZipObject :: '[null ( 'PGvararray ( 'NotNull 'PGtext)), null ( 'PGvararray ( 'NotNull 'PGtext))] ---> null 'PGjson
+ Squeal.PostgreSQL.Expression.Json: jsonZipObject :: '[null ('PGvararray ('NotNull 'PGtext)), null ('PGvararray ('NotNull 'PGtext))] ---> null 'PGjson
- Squeal.PostgreSQL.Expression.Json: jsonbArrayLength :: null 'PGjsonb --> null 'PGint4
+ Squeal.PostgreSQL.Expression.Json: jsonbArrayLength :: null 'PGjsonb --> null 'PGint4
- Squeal.PostgreSQL.Expression.Json: jsonbBuildArray :: SListI tuple => tuple ---> null 'PGjsonb
+ Squeal.PostgreSQL.Expression.Json: jsonbBuildArray :: SListI tuple => tuple ---> null 'PGjsonb
- Squeal.PostgreSQL.Expression.Json: jsonbBuildObject :: JsonBuildObject tys => tys ---> null 'PGjsonb
+ Squeal.PostgreSQL.Expression.Json: jsonbBuildObject :: JsonBuildObject tys => tys ---> null 'PGjsonb
- Squeal.PostgreSQL.Expression.Json: jsonbEach :: null 'PGjsonb -|-> ("jsonb_each" ::: '["key" ::: 'NotNull 'PGtext, "value" ::: 'NotNull 'PGjson])
+ Squeal.PostgreSQL.Expression.Json: jsonbEach :: null 'PGjsonb -|-> ("jsonb_each" ::: '["key" ::: 'NotNull 'PGtext, "value" ::: 'NotNull 'PGjson])
- Squeal.PostgreSQL.Expression.Json: jsonbEachText :: null 'PGjsonb -|-> ("jsonb_each_text" ::: '["key" ::: 'NotNull 'PGtext, "value" ::: 'NotNull 'PGtext])
+ Squeal.PostgreSQL.Expression.Json: jsonbEachText :: null 'PGjsonb -|-> ("jsonb_each_text" ::: '["key" ::: 'NotNull 'PGtext, "value" ::: 'NotNull 'PGtext])
- Squeal.PostgreSQL.Expression.Json: jsonbInsert :: '[null 'PGjsonb, null ( 'PGvararray ( 'NotNull 'PGtext)), null 'PGjsonb, null 'PGbool] ---> null 'PGjsonb
+ Squeal.PostgreSQL.Expression.Json: jsonbInsert :: '[null 'PGjsonb, null ('PGvararray ('NotNull 'PGtext)), null 'PGjsonb, null 'PGbool] ---> null 'PGjsonb
- Squeal.PostgreSQL.Expression.Json: jsonbObject :: null ( 'PGfixarray '[n, 2] ( 'NotNull 'PGtext)) --> null 'PGjsonb
+ Squeal.PostgreSQL.Expression.Json: jsonbObject :: null ('PGfixarray '[n, 2] ('NotNull 'PGtext)) --> null 'PGjsonb
- Squeal.PostgreSQL.Expression.Json: jsonbObjectKeys :: null 'PGjsonb -|-> ("jsonb_object_keys" ::: '["jsonb_object_keys" ::: 'NotNull 'PGtext])
+ Squeal.PostgreSQL.Expression.Json: jsonbObjectKeys :: null 'PGjsonb -|-> ("jsonb_object_keys" ::: '["jsonb_object_keys" ::: 'NotNull 'PGtext])
- Squeal.PostgreSQL.Expression.Json: jsonbPopulateRecord :: JsonPopulateFunction "jsonb_populate_record" 'PGjsonb
+ Squeal.PostgreSQL.Expression.Json: jsonbPopulateRecord :: JsonPopulateFunction "jsonb_populate_record" 'PGjsonb
- Squeal.PostgreSQL.Expression.Json: jsonbPopulateRecordSet :: JsonPopulateFunction "jsonb_populate_record_set" 'PGjsonb
+ Squeal.PostgreSQL.Expression.Json: jsonbPopulateRecordSet :: JsonPopulateFunction "jsonb_populate_record_set" 'PGjsonb
- Squeal.PostgreSQL.Expression.Json: jsonbPretty :: null 'PGjsonb --> null 'PGtext
+ Squeal.PostgreSQL.Expression.Json: jsonbPretty :: null 'PGjsonb --> null 'PGtext
- Squeal.PostgreSQL.Expression.Json: jsonbSet :: '[null 'PGjsonb, null ( 'PGvararray ( 'NotNull 'PGtext)), null 'PGjsonb, null 'PGbool] ---> null 'PGjsonb
+ Squeal.PostgreSQL.Expression.Json: jsonbSet :: '[null 'PGjsonb, null ('PGvararray ('NotNull 'PGtext)), null 'PGjsonb, null 'PGbool] ---> null 'PGjsonb
- Squeal.PostgreSQL.Expression.Json: jsonbStripNulls :: null 'PGjsonb --> null 'PGjsonb
+ Squeal.PostgreSQL.Expression.Json: jsonbStripNulls :: null 'PGjsonb --> null 'PGjsonb
- Squeal.PostgreSQL.Expression.Json: jsonbToRecord :: JsonToRecordFunction 'PGjsonb
+ Squeal.PostgreSQL.Expression.Json: jsonbToRecord :: JsonToRecordFunction 'PGjsonb
- Squeal.PostgreSQL.Expression.Json: jsonbToRecordSet :: JsonToRecordFunction 'PGjsonb
+ Squeal.PostgreSQL.Expression.Json: jsonbToRecordSet :: JsonToRecordFunction 'PGjsonb
- Squeal.PostgreSQL.Expression.Json: jsonbTypeof :: null 'PGjsonb --> null 'PGtext
+ Squeal.PostgreSQL.Expression.Json: jsonbTypeof :: null 'PGjsonb --> null 'PGtext
- Squeal.PostgreSQL.Expression.Json: jsonbZipObject :: '[null ( 'PGvararray ( 'NotNull 'PGtext)), null ( 'PGvararray ( 'NotNull 'PGtext))] ---> null 'PGjsonb
+ Squeal.PostgreSQL.Expression.Json: jsonbZipObject :: '[null ('PGvararray ('NotNull 'PGtext)), null ('PGvararray ('NotNull 'PGtext))] ---> null 'PGjsonb
- Squeal.PostgreSQL.Expression.Json: rowToJson :: null ( 'PGcomposite ty) --> null 'PGjson
+ Squeal.PostgreSQL.Expression.Json: rowToJson :: null ('PGcomposite ty) --> null 'PGjson
- Squeal.PostgreSQL.Expression.Json: toJson :: null ty --> null 'PGjson
+ Squeal.PostgreSQL.Expression.Json: toJson :: null ty --> null 'PGjson
- Squeal.PostgreSQL.Expression.Json: toJsonb :: null ty --> null 'PGjsonb
+ Squeal.PostgreSQL.Expression.Json: toJsonb :: null ty --> null 'PGjsonb
- Squeal.PostgreSQL.Expression.Json: type JsonToRecordFunction json = forall lat with db params tab row. (SListI row, json `In` PGJsonType) => Expression 'Ungrouped lat with db params '[] ( 'NotNull json) " json type" -> Aliased (NP (Aliased (TypeExpression db))) (tab ::: row) " row type" -> FromClause lat with db params '[tab ::: row]
+ Squeal.PostgreSQL.Expression.Json: type JsonToRecordFunction json = forall lat with db params tab row. (SListI row, json `In` PGJsonType) => Expression 'Ungrouped lat with db params '[] ('NotNull json) " json type" -> Aliased (NP (Aliased (TypeExpression db))) (tab ::: row) " row type" -> FromClause lat with db params '[tab ::: row]
- Squeal.PostgreSQL.Expression.Json: type JsonPopulateFunction fun json = forall db row lat with params. json `In` PGJsonType => TypeExpression db ( 'NotNull ( 'PGcomposite row)) " row type" -> Expression 'Ungrouped lat with db params '[] ( 'NotNull json) " json type" -> FromClause lat with db params '[fun ::: row]
+ Squeal.PostgreSQL.Expression.Json: type JsonPopulateFunction fun json = forall db row lat with params. json `In` PGJsonType => TypeExpression db ('NotNull ('PGcomposite row)) " row type" -> Expression 'Ungrouped lat with db params '[] ('NotNull json) " json type" -> FromClause lat with db params '[fun ::: row]
- Squeal.PostgreSQL.Expression.Logic: (.&&) :: Operator (null 'PGbool) (null 'PGbool) (null 'PGbool)
+ Squeal.PostgreSQL.Expression.Logic: (.&&) :: Operator (null 'PGbool) (null 'PGbool) (null 'PGbool)
- Squeal.PostgreSQL.Expression.Logic: (.||) :: Operator (null 'PGbool) (null 'PGbool) (null 'PGbool)
+ Squeal.PostgreSQL.Expression.Logic: (.||) :: Operator (null 'PGbool) (null 'PGbool) (null 'PGbool)
- Squeal.PostgreSQL.Expression.Logic: false :: Expr (null 'PGbool)
+ Squeal.PostgreSQL.Expression.Logic: false :: Expr (null 'PGbool)
- Squeal.PostgreSQL.Expression.Logic: not_ :: null 'PGbool --> null 'PGbool
+ Squeal.PostgreSQL.Expression.Logic: not_ :: null 'PGbool --> null 'PGbool
- Squeal.PostgreSQL.Expression.Logic: true :: Expr (null 'PGbool)
+ Squeal.PostgreSQL.Expression.Logic: true :: Expr (null 'PGbool)
- Squeal.PostgreSQL.Expression.Logic: type Condition grp lat with db params from = Expression grp lat with db params from ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression.Logic: type Condition grp lat with db params from = Expression grp lat with db params from ('Null 'PGbool)
- Squeal.PostgreSQL.Expression.Null: coalesce :: FunctionVar ( 'Null ty) (null ty) (null ty)
+ Squeal.PostgreSQL.Expression.Null: coalesce :: FunctionVar ('Null ty) (null ty) (null ty)
- Squeal.PostgreSQL.Expression.Null: fromNull :: Expression grp lat with db params from ( 'NotNull ty) -> Expression grp lat with db params from ( 'Null ty) -> Expression grp lat with db params from ( 'NotNull ty)
+ Squeal.PostgreSQL.Expression.Null: fromNull :: Expression grp lat with db params from ('NotNull ty) -> Expression grp lat with db params from ('Null ty) -> Expression grp lat with db params from ('NotNull ty)
- Squeal.PostgreSQL.Expression.Null: isNotNull :: 'Null ty --> null 'PGbool
+ Squeal.PostgreSQL.Expression.Null: isNotNull :: 'Null ty --> null 'PGbool
- Squeal.PostgreSQL.Expression.Null: isNull :: 'Null ty --> null 'PGbool
+ Squeal.PostgreSQL.Expression.Null: isNull :: 'Null ty --> null 'PGbool
- Squeal.PostgreSQL.Expression.Null: matchNull :: Expression grp lat with db params from nullty -> (Expression grp lat with db params from ( 'NotNull ty) -> Expression grp lat with db params from nullty) -> Expression grp lat with db params from ( 'Null ty) -> Expression grp lat with db params from nullty
+ Squeal.PostgreSQL.Expression.Null: matchNull :: Expression grp lat with db params from nullty -> (Expression grp lat with db params from ('NotNull ty) -> Expression grp lat with db params from nullty) -> Expression grp lat with db params from ('Null ty) -> Expression grp lat with db params from nullty
- Squeal.PostgreSQL.Expression.Null: monoNotNull :: (forall null. Expression grp lat with db params from (null ty)) -> Expression grp lat with db params from ( 'NotNull ty)
+ Squeal.PostgreSQL.Expression.Null: monoNotNull :: (forall null. Expression grp lat with db params from (null ty)) -> Expression grp lat with db params from ('NotNull ty)
- Squeal.PostgreSQL.Expression.Null: notNull :: 'NotNull ty --> 'Null ty
+ Squeal.PostgreSQL.Expression.Null: notNull :: 'NotNull ty --> 'Null ty
- Squeal.PostgreSQL.Expression.Null: nullIf :: '[ 'NotNull ty, 'NotNull ty] ---> 'Null ty
+ Squeal.PostgreSQL.Expression.Null: nullIf :: '[ 'NotNull ty, 'NotNull ty] ---> 'Null ty
- Squeal.PostgreSQL.Expression.Null: null_ :: Expr ( 'Null ty)
+ Squeal.PostgreSQL.Expression.Null: null_ :: Expr ('Null ty)
- Squeal.PostgreSQL.Expression.Null: unsafeNotNull :: 'Null ty --> 'NotNull ty
+ Squeal.PostgreSQL.Expression.Null: unsafeNotNull :: 'Null ty --> 'NotNull ty
- Squeal.PostgreSQL.Expression.Range: (&<) :: Operator (null ( 'PGrange ty)) (null ( 'PGrange ty)) ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression.Range: (&<) :: Operator (null ('PGrange ty)) (null ('PGrange ty)) ('Null 'PGbool)
- Squeal.PostgreSQL.Expression.Range: (&>) :: Operator (null ( 'PGrange ty)) (null ( 'PGrange ty)) ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression.Range: (&>) :: Operator (null ('PGrange ty)) (null ('PGrange ty)) ('Null 'PGbool)
- Squeal.PostgreSQL.Expression.Range: (-|-) :: Operator (null ( 'PGrange ty)) (null ( 'PGrange ty)) ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression.Range: (-|-) :: Operator (null ('PGrange ty)) (null ('PGrange ty)) ('Null 'PGbool)
- Squeal.PostgreSQL.Expression.Range: (.<@) :: Operator ( 'NotNull ty) (null ( 'PGrange ty)) ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression.Range: (.<@) :: Operator ('NotNull ty) (null ('PGrange ty)) ('Null 'PGbool)
- Squeal.PostgreSQL.Expression.Range: (<<@) :: Operator (null ( 'PGrange ty)) (null ( 'PGrange ty)) ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression.Range: (<<@) :: Operator (null ('PGrange ty)) (null ('PGrange ty)) ('Null 'PGbool)
- Squeal.PostgreSQL.Expression.Range: (@*) :: Operator (null ( 'PGrange ty)) (null ( 'PGrange ty)) (null ( 'PGrange ty))
+ Squeal.PostgreSQL.Expression.Range: (@*) :: Operator (null ('PGrange ty)) (null ('PGrange ty)) (null ('PGrange ty))
- Squeal.PostgreSQL.Expression.Range: (@+) :: Operator (null ( 'PGrange ty)) (null ( 'PGrange ty)) (null ( 'PGrange ty))
+ Squeal.PostgreSQL.Expression.Range: (@+) :: Operator (null ('PGrange ty)) (null ('PGrange ty)) (null ('PGrange ty))
- Squeal.PostgreSQL.Expression.Range: (@-) :: Operator (null ( 'PGrange ty)) (null ( 'PGrange ty)) (null ( 'PGrange ty))
+ Squeal.PostgreSQL.Expression.Range: (@-) :: Operator (null ('PGrange ty)) (null ('PGrange ty)) (null ('PGrange ty))
- Squeal.PostgreSQL.Expression.Range: (@>.) :: Operator (null ( 'PGrange ty)) ( 'NotNull ty) ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression.Range: (@>.) :: Operator (null ('PGrange ty)) ('NotNull ty) ('Null 'PGbool)
- Squeal.PostgreSQL.Expression.Range: (@>>) :: Operator (null ( 'PGrange ty)) (null ( 'PGrange ty)) ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression.Range: (@>>) :: Operator (null ('PGrange ty)) (null ('PGrange ty)) ('Null 'PGbool)
- Squeal.PostgreSQL.Expression.Range: isEmpty :: null ( 'PGrange ty) --> 'Null 'PGbool
+ Squeal.PostgreSQL.Expression.Range: isEmpty :: null ('PGrange ty) --> 'Null 'PGbool
- Squeal.PostgreSQL.Expression.Range: lowerBound :: null ( 'PGrange ty) --> 'Null ty
+ Squeal.PostgreSQL.Expression.Range: lowerBound :: null ('PGrange ty) --> 'Null ty
- Squeal.PostgreSQL.Expression.Range: lowerInc :: null ( 'PGrange ty) --> 'Null 'PGbool
+ Squeal.PostgreSQL.Expression.Range: lowerInc :: null ('PGrange ty) --> 'Null 'PGbool
- Squeal.PostgreSQL.Expression.Range: lowerInf :: null ( 'PGrange ty) --> 'Null 'PGbool
+ Squeal.PostgreSQL.Expression.Range: lowerInf :: null ('PGrange ty) --> 'Null 'PGbool
- Squeal.PostgreSQL.Expression.Range: range :: TypeExpression db (null ( 'PGrange ty)) -> Range (Expression grp lat with db params from ( 'NotNull ty)) -> Expression grp lat with db params from (null ( 'PGrange ty))
+ Squeal.PostgreSQL.Expression.Range: range :: TypeExpression db (null ('PGrange ty)) -> Range (Expression grp lat with db params from ('NotNull ty)) -> Expression grp lat with db params from (null ('PGrange ty))
- Squeal.PostgreSQL.Expression.Range: rangeMerge :: '[null ( 'PGrange ty), null ( 'PGrange ty)] ---> null ( 'PGrange ty)
+ Squeal.PostgreSQL.Expression.Range: rangeMerge :: '[null ('PGrange ty), null ('PGrange ty)] ---> null ('PGrange ty)
- Squeal.PostgreSQL.Expression.Range: upperBound :: null ( 'PGrange ty) --> 'Null ty
+ Squeal.PostgreSQL.Expression.Range: upperBound :: null ('PGrange ty) --> 'Null ty
- Squeal.PostgreSQL.Expression.Range: upperInc :: null ( 'PGrange ty) --> 'Null 'PGbool
+ Squeal.PostgreSQL.Expression.Range: upperInc :: null ('PGrange ty) --> 'Null 'PGbool
- Squeal.PostgreSQL.Expression.Range: upperInf :: null ( 'PGrange ty) --> 'Null 'PGbool
+ Squeal.PostgreSQL.Expression.Range: upperInf :: null ('PGrange ty) --> 'Null 'PGbool
- Squeal.PostgreSQL.Expression.Sort: [AscNullsFirst] :: Expression grp lat with db params from ( 'Null ty) -> SortExpression grp lat with db params from
+ Squeal.PostgreSQL.Expression.Sort: [AscNullsFirst] :: Expression grp lat with db params from ('Null ty) -> SortExpression grp lat with db params from
- Squeal.PostgreSQL.Expression.Sort: [AscNullsLast] :: Expression grp lat with db params from ( 'Null ty) -> SortExpression grp lat with db params from
+ Squeal.PostgreSQL.Expression.Sort: [AscNullsLast] :: Expression grp lat with db params from ('Null ty) -> SortExpression grp lat with db params from
- Squeal.PostgreSQL.Expression.Sort: [Asc] :: Expression grp lat with db params from ( 'NotNull ty) -> SortExpression grp lat with db params from
+ Squeal.PostgreSQL.Expression.Sort: [Asc] :: Expression grp lat with db params from ('NotNull ty) -> SortExpression grp lat with db params from
- Squeal.PostgreSQL.Expression.Sort: [DescNullsFirst] :: Expression grp lat with db params from ( 'Null ty) -> SortExpression grp lat with db params from
+ Squeal.PostgreSQL.Expression.Sort: [DescNullsFirst] :: Expression grp lat with db params from ('Null ty) -> SortExpression grp lat with db params from
- Squeal.PostgreSQL.Expression.Sort: [DescNullsLast] :: Expression grp lat with db params from ( 'Null ty) -> SortExpression grp lat with db params from
+ Squeal.PostgreSQL.Expression.Sort: [DescNullsLast] :: Expression grp lat with db params from ('Null ty) -> SortExpression grp lat with db params from
- Squeal.PostgreSQL.Expression.Sort: [Desc] :: Expression grp lat with db params from ( 'NotNull ty) -> SortExpression grp lat with db params from
+ Squeal.PostgreSQL.Expression.Sort: [Desc] :: Expression grp lat with db params from ('NotNull ty) -> SortExpression grp lat with db params from
- Squeal.PostgreSQL.Expression.Subquery: exists :: Query (Join lat from) with db params row -> Expression grp lat with db params from (null 'PGbool)
+ Squeal.PostgreSQL.Expression.Subquery: exists :: Query (Join lat from) with db params row -> Expression grp lat with db params from (null 'PGbool)
- Squeal.PostgreSQL.Expression.Subquery: in_ :: Expression grp lat with db params from ty -> [Expression grp lat with db params from ty] -> Expression grp lat with db params from (null 'PGbool)
+ Squeal.PostgreSQL.Expression.Subquery: in_ :: Expression grp lat with db params from ty -> [Expression grp lat with db params from ty] -> Expression grp lat with db params from ('Null 'PGbool)
- Squeal.PostgreSQL.Expression.Subquery: notIn :: Expression grp lat with db params from ty -> [Expression grp lat with db params from ty] -> Expression grp lat with db params from (null 'PGbool)
+ Squeal.PostgreSQL.Expression.Subquery: notIn :: Expression grp lat with db params from ty -> [Expression grp lat with db params from ty] -> Expression grp lat with db params from ('Null 'PGbool)
- Squeal.PostgreSQL.Expression.Subquery: subAll :: Expression grp lat with db params from ty1 -> Operator ty1 ty2 ( 'Null 'PGbool) -> Query (Join lat from) with db params '[col ::: ty2] -> Condition grp lat with db params from
+ Squeal.PostgreSQL.Expression.Subquery: subAll :: Expression grp lat with db params from ty1 -> Operator ty1 ty2 ('Null 'PGbool) -> Query (Join lat from) with db params '[col ::: ty2] -> Condition grp lat with db params from
- Squeal.PostgreSQL.Expression.Subquery: subAny :: Expression grp lat with db params from ty1 -> Operator ty1 ty2 ( 'Null 'PGbool) -> Query (Join lat from) with db params '[col ::: ty2] -> Condition grp lat with db params from
+ Squeal.PostgreSQL.Expression.Subquery: subAny :: Expression grp lat with db params from ty1 -> Operator ty1 ty2 ('Null 'PGbool) -> Query (Join lat from) with db params '[col ::: ty2] -> Condition grp lat with db params from
- Squeal.PostgreSQL.Expression.Text: charLength :: null 'PGtext --> null 'PGint4
+ Squeal.PostgreSQL.Expression.Text: charLength :: null 'PGtext --> null 'PGint4
- Squeal.PostgreSQL.Expression.Text: ilike :: Operator (null 'PGtext) (null 'PGtext) ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression.Text: ilike :: Operator (null 'PGtext) (null 'PGtext) ('Null 'PGbool)
- Squeal.PostgreSQL.Expression.Text: like :: Operator (null 'PGtext) (null 'PGtext) ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression.Text: like :: Operator (null 'PGtext) (null 'PGtext) ('Null 'PGbool)
- Squeal.PostgreSQL.Expression.Text: lower :: null 'PGtext --> null 'PGtext
+ Squeal.PostgreSQL.Expression.Text: lower :: null 'PGtext --> null 'PGtext
- Squeal.PostgreSQL.Expression.Text: upper :: null 'PGtext --> null 'PGtext
+ Squeal.PostgreSQL.Expression.Text: upper :: null 'PGtext --> null 'PGtext
- Squeal.PostgreSQL.Expression.TextSearch: (.!) :: null 'PGtsquery --> null 'PGtsquery
+ Squeal.PostgreSQL.Expression.TextSearch: (.!) :: null 'PGtsquery --> null 'PGtsquery
- Squeal.PostgreSQL.Expression.TextSearch: (.&) :: Operator (null 'PGtsquery) (null 'PGtsquery) (null 'PGtsquery)
+ Squeal.PostgreSQL.Expression.TextSearch: (.&) :: Operator (null 'PGtsquery) (null 'PGtsquery) (null 'PGtsquery)
- Squeal.PostgreSQL.Expression.TextSearch: (.|) :: Operator (null 'PGtsquery) (null 'PGtsquery) (null 'PGtsquery)
+ Squeal.PostgreSQL.Expression.TextSearch: (.|) :: Operator (null 'PGtsquery) (null 'PGtsquery) (null 'PGtsquery)
- Squeal.PostgreSQL.Expression.TextSearch: (<->) :: Operator (null 'PGtsquery) (null 'PGtsquery) (null 'PGtsquery)
+ Squeal.PostgreSQL.Expression.TextSearch: (<->) :: Operator (null 'PGtsquery) (null 'PGtsquery) (null 'PGtsquery)
- Squeal.PostgreSQL.Expression.TextSearch: (@@) :: Operator (null 'PGtsvector) (null 'PGtsquery) ( 'Null 'PGbool)
+ Squeal.PostgreSQL.Expression.TextSearch: (@@) :: Operator (null 'PGtsvector) (null 'PGtsquery) ('Null 'PGbool)
- Squeal.PostgreSQL.Expression.TextSearch: arrayToTSvector :: null ( 'PGvararray ( 'NotNull 'PGtext)) --> null 'PGtsvector
+ Squeal.PostgreSQL.Expression.TextSearch: arrayToTSvector :: null ('PGvararray ('NotNull 'PGtext)) --> null 'PGtsvector
- Squeal.PostgreSQL.Expression.TextSearch: jsonToTSvector :: '[null 'PGjson, null 'PGjson] ---> null 'PGtsvector
+ Squeal.PostgreSQL.Expression.TextSearch: jsonToTSvector :: '[null 'PGjson, null 'PGjson] ---> null 'PGtsvector
- Squeal.PostgreSQL.Expression.TextSearch: jsonbToTSvector :: '[null 'PGjsonb, null 'PGjsonb] ---> null 'PGtsvector
+ Squeal.PostgreSQL.Expression.TextSearch: jsonbToTSvector :: '[null 'PGjsonb, null 'PGjsonb] ---> null 'PGtsvector
- Squeal.PostgreSQL.Expression.TextSearch: numnode :: null 'PGtsquery --> null 'PGint4
+ Squeal.PostgreSQL.Expression.TextSearch: numnode :: null 'PGtsquery --> null 'PGint4
- Squeal.PostgreSQL.Expression.TextSearch: phraseToTSquery :: null 'PGtext --> null 'PGtsquery
+ Squeal.PostgreSQL.Expression.TextSearch: phraseToTSquery :: null 'PGtext --> null 'PGtsquery
- Squeal.PostgreSQL.Expression.TextSearch: plainToTSquery :: null 'PGtext --> null 'PGtsquery
+ Squeal.PostgreSQL.Expression.TextSearch: plainToTSquery :: null 'PGtext --> null 'PGtsquery
- Squeal.PostgreSQL.Expression.TextSearch: queryTree :: null 'PGtsquery --> null 'PGtext
+ Squeal.PostgreSQL.Expression.TextSearch: queryTree :: null 'PGtsquery --> null 'PGtext
- Squeal.PostgreSQL.Expression.TextSearch: setWeight :: '[null 'PGtsvector, null ( 'PGchar 1)] ---> null 'PGtsvector
+ Squeal.PostgreSQL.Expression.TextSearch: setWeight :: '[null 'PGtsvector, null ('PGchar 1)] ---> null 'PGtsvector
- Squeal.PostgreSQL.Expression.TextSearch: strip :: null 'PGtsvector --> null 'PGtsvector
+ Squeal.PostgreSQL.Expression.TextSearch: strip :: null 'PGtsvector --> null 'PGtsvector
- Squeal.PostgreSQL.Expression.TextSearch: toTSquery :: null 'PGtext --> null 'PGtsquery
+ Squeal.PostgreSQL.Expression.TextSearch: toTSquery :: null 'PGtext --> null 'PGtsquery
- Squeal.PostgreSQL.Expression.TextSearch: toTSvector :: ty `In` '[ 'PGtext, 'PGjson, 'PGjsonb] => null ty --> null 'PGtsvector
+ Squeal.PostgreSQL.Expression.TextSearch: toTSvector :: ty `In` '[ 'PGtext, 'PGjson, 'PGjsonb] => null ty --> null 'PGtsvector
- Squeal.PostgreSQL.Expression.TextSearch: tsDelete :: '[null 'PGtsvector, null ( 'PGvararray ( 'NotNull 'PGtext))] ---> null 'PGtsvector
+ Squeal.PostgreSQL.Expression.TextSearch: tsDelete :: '[null 'PGtsvector, null ('PGvararray ('NotNull 'PGtext))] ---> null 'PGtsvector
- Squeal.PostgreSQL.Expression.TextSearch: tsFilter :: '[null 'PGtsvector, null ( 'PGvararray ( 'NotNull ( 'PGchar 1)))] ---> null 'PGtsvector
+ Squeal.PostgreSQL.Expression.TextSearch: tsFilter :: '[null 'PGtsvector, null ('PGvararray ('NotNull ('PGchar 1)))] ---> null 'PGtsvector
- Squeal.PostgreSQL.Expression.TextSearch: tsHeadline :: document `In` '[ 'PGtext, 'PGjson, 'PGjsonb] => '[null document, null 'PGtsquery] ---> null 'PGtext
+ Squeal.PostgreSQL.Expression.TextSearch: tsHeadline :: document `In` '[ 'PGtext, 'PGjson, 'PGjsonb] => '[null document, null 'PGtsquery] ---> null 'PGtext
- Squeal.PostgreSQL.Expression.TextSearch: tsvectorLength :: null 'PGtsvector --> null 'PGint4
+ Squeal.PostgreSQL.Expression.TextSearch: tsvectorLength :: null 'PGtsvector --> null 'PGint4
- Squeal.PostgreSQL.Expression.TextSearch: websearchToTSquery :: null 'PGtext --> null 'PGtsquery
+ Squeal.PostgreSQL.Expression.TextSearch: websearchToTSquery :: null 'PGtext --> null 'PGtsquery
- Squeal.PostgreSQL.Expression.Time: currentDate :: Expr (null 'PGdate)
+ Squeal.PostgreSQL.Expression.Time: currentDate :: Expr (null 'PGdate)
- Squeal.PostgreSQL.Expression.Time: currentTime :: Expr (null 'PGtimetz)
+ Squeal.PostgreSQL.Expression.Time: currentTime :: Expr (null 'PGtimetz)
- Squeal.PostgreSQL.Expression.Time: currentTimestamp :: Expr (null 'PGtimestamptz)
+ Squeal.PostgreSQL.Expression.Time: currentTimestamp :: Expr (null 'PGtimestamptz)
- Squeal.PostgreSQL.Expression.Time: interval_ :: Milli -> TimeUnit -> Expr (null 'PGinterval)
+ Squeal.PostgreSQL.Expression.Time: interval_ :: Milli -> TimeUnit -> Expr (null 'PGinterval)
- Squeal.PostgreSQL.Expression.Time: localTime :: Expr (null 'PGtime)
+ Squeal.PostgreSQL.Expression.Time: localTime :: Expr (null 'PGtime)
- Squeal.PostgreSQL.Expression.Time: localTimestamp :: Expr (null 'PGtimestamp)
+ Squeal.PostgreSQL.Expression.Time: localTimestamp :: Expr (null 'PGtimestamp)
- Squeal.PostgreSQL.Expression.Time: makeDate :: '[null 'PGint4, null 'PGint4, null 'PGint4] ---> null 'PGdate
+ Squeal.PostgreSQL.Expression.Time: makeDate :: '[null 'PGint4, null 'PGint4, null 'PGint4] ---> null 'PGdate
- Squeal.PostgreSQL.Expression.Time: makeTime :: '[null 'PGint4, null 'PGint4, null 'PGfloat8] ---> null 'PGtime
+ Squeal.PostgreSQL.Expression.Time: makeTime :: '[null 'PGint4, null 'PGint4, null 'PGfloat8] ---> null 'PGtime
- Squeal.PostgreSQL.Expression.Time: makeTimestamp :: '[null 'PGint4, null 'PGint4, null 'PGint4, null 'PGint4, null 'PGint4, null 'PGfloat8] ---> null 'PGtimestamp
+ Squeal.PostgreSQL.Expression.Time: makeTimestamp :: '[null 'PGint4, null 'PGint4, null 'PGint4, null 'PGint4, null 'PGint4, null 'PGfloat8] ---> null 'PGtimestamp
- Squeal.PostgreSQL.Expression.Time: makeTimestamptz :: '[null 'PGint4, null 'PGint4, null 'PGint4, null 'PGint4, null 'PGint4, null 'PGfloat8] ---> null 'PGtimestamptz
+ Squeal.PostgreSQL.Expression.Time: makeTimestamptz :: '[null 'PGint4, null 'PGint4, null 'PGint4, null 'PGint4, null 'PGint4, null 'PGfloat8] ---> null 'PGtimestamptz
- Squeal.PostgreSQL.Expression.Time: now :: Expr (null 'PGtimestamptz)
+ Squeal.PostgreSQL.Expression.Time: now :: Expr (null 'PGtimestamptz)
- Squeal.PostgreSQL.Expression.Type: UnsafeColumnTypeExpression :: ByteString -> ColumnTypeExpression
+ Squeal.PostgreSQL.Expression.Type: UnsafeColumnTypeExpression :: ByteString -> ColumnTypeExpression (db :: SchemasType) (ty :: ColumnType)
- Squeal.PostgreSQL.Expression.Type: UnsafeTypeExpression :: ByteString -> TypeExpression
+ Squeal.PostgreSQL.Expression.Type: UnsafeTypeExpression :: ByteString -> TypeExpression (db :: SchemasType) (ty :: NullType)
- Squeal.PostgreSQL.Expression.Type: [renderColumnTypeExpression] :: ColumnTypeExpression -> ByteString
+ Squeal.PostgreSQL.Expression.Type: [renderColumnTypeExpression] :: ColumnTypeExpression (db :: SchemasType) (ty :: ColumnType) -> ByteString
- Squeal.PostgreSQL.Expression.Type: [renderTypeExpression] :: TypeExpression -> ByteString
+ Squeal.PostgreSQL.Expression.Type: [renderTypeExpression] :: TypeExpression (db :: SchemasType) (ty :: NullType) -> ByteString
- Squeal.PostgreSQL.Expression.Type: bigint :: TypeExpression db (null 'PGint8)
+ Squeal.PostgreSQL.Expression.Type: bigint :: TypeExpression db (null 'PGint8)
- Squeal.PostgreSQL.Expression.Type: bigserial :: ColumnTypeExpression db ( 'Def :=> 'NotNull 'PGint8)
+ Squeal.PostgreSQL.Expression.Type: bigserial :: ColumnTypeExpression db ('Def :=> 'NotNull 'PGint8)
- Squeal.PostgreSQL.Expression.Type: bool :: TypeExpression db (null 'PGbool)
+ Squeal.PostgreSQL.Expression.Type: bool :: TypeExpression db (null 'PGbool)
- Squeal.PostgreSQL.Expression.Type: bytea :: TypeExpression db (null 'PGbytea)
+ Squeal.PostgreSQL.Expression.Type: bytea :: TypeExpression db (null 'PGbytea)
- Squeal.PostgreSQL.Expression.Type: char :: forall n db null. (KnownNat n, 1 <= n) => TypeExpression db (null ( 'PGchar n))
+ Squeal.PostgreSQL.Expression.Type: char :: forall n db null. (KnownNat n, 1 <= n) => TypeExpression db (null ('PGchar n))
- Squeal.PostgreSQL.Expression.Type: character :: forall n db null. (KnownNat n, 1 <= n) => TypeExpression db (null ( 'PGchar n))
+ Squeal.PostgreSQL.Expression.Type: character :: forall n db null. (KnownNat n, 1 <= n) => TypeExpression db (null ('PGchar n))
- Squeal.PostgreSQL.Expression.Type: characterVarying :: forall n db null. (KnownNat n, 1 <= n) => TypeExpression db (null ( 'PGvarchar n))
+ Squeal.PostgreSQL.Expression.Type: characterVarying :: forall n db null. (KnownNat n, 1 <= n) => TypeExpression db (null ('PGvarchar n))
- Squeal.PostgreSQL.Expression.Type: columntypeFrom :: forall hask db. ColumnTyped db ( 'NoDef :=> NullPG hask) => ColumnTypeExpression db ( 'NoDef :=> NullPG hask)
+ Squeal.PostgreSQL.Expression.Type: columntypeFrom :: forall hask db. ColumnTyped db ('NoDef :=> NullPG hask) => ColumnTypeExpression db ('NoDef :=> NullPG hask)
- Squeal.PostgreSQL.Expression.Type: date :: TypeExpression db (null 'PGdate)
+ Squeal.PostgreSQL.Expression.Type: date :: TypeExpression db (null 'PGdate)
- Squeal.PostgreSQL.Expression.Type: daterange :: TypeExpression db (null ( 'PGrange 'PGdate))
+ Squeal.PostgreSQL.Expression.Type: daterange :: TypeExpression db (null ('PGrange 'PGdate))
- Squeal.PostgreSQL.Expression.Type: default_ :: Expression 'Ungrouped '[] '[] db '[] '[] ty -> ColumnTypeExpression db ( 'NoDef :=> ty) -> ColumnTypeExpression db ( 'Def :=> ty)
+ Squeal.PostgreSQL.Expression.Type: default_ :: Expression 'Ungrouped '[] '[] db '[] '[] ty -> ColumnTypeExpression db ('NoDef :=> ty) -> ColumnTypeExpression db ('Def :=> ty)
- Squeal.PostgreSQL.Expression.Type: doublePrecision :: TypeExpression db (null 'PGfloat8)
+ Squeal.PostgreSQL.Expression.Type: doublePrecision :: TypeExpression db (null 'PGfloat8)
- Squeal.PostgreSQL.Expression.Type: fixarray :: forall dims db null pg. All KnownNat dims => TypeExpression db pg -> TypeExpression db (null ( 'PGfixarray dims pg))
+ Squeal.PostgreSQL.Expression.Type: fixarray :: forall dims db null pg. All KnownNat dims => TypeExpression db pg -> TypeExpression db (null ('PGfixarray dims pg))
- Squeal.PostgreSQL.Expression.Type: float4 :: TypeExpression db (null 'PGfloat4)
+ Squeal.PostgreSQL.Expression.Type: float4 :: TypeExpression db (null 'PGfloat4)
- Squeal.PostgreSQL.Expression.Type: float8 :: TypeExpression db (null 'PGfloat8)
+ Squeal.PostgreSQL.Expression.Type: float8 :: TypeExpression db (null 'PGfloat8)
- Squeal.PostgreSQL.Expression.Type: inet :: TypeExpression db (null 'PGinet)
+ Squeal.PostgreSQL.Expression.Type: inet :: TypeExpression db (null 'PGinet)
- Squeal.PostgreSQL.Expression.Type: int :: TypeExpression db (null 'PGint4)
+ Squeal.PostgreSQL.Expression.Type: int :: TypeExpression db (null 'PGint4)
- Squeal.PostgreSQL.Expression.Type: int2 :: TypeExpression db (null 'PGint2)
+ Squeal.PostgreSQL.Expression.Type: int2 :: TypeExpression db (null 'PGint2)
- Squeal.PostgreSQL.Expression.Type: int4 :: TypeExpression db (null 'PGint4)
+ Squeal.PostgreSQL.Expression.Type: int4 :: TypeExpression db (null 'PGint4)
- Squeal.PostgreSQL.Expression.Type: int4range :: TypeExpression db (null ( 'PGrange 'PGint4))
+ Squeal.PostgreSQL.Expression.Type: int4range :: TypeExpression db (null ('PGrange 'PGint4))
- Squeal.PostgreSQL.Expression.Type: int8 :: TypeExpression db (null 'PGint8)
+ Squeal.PostgreSQL.Expression.Type: int8 :: TypeExpression db (null 'PGint8)
- Squeal.PostgreSQL.Expression.Type: int8range :: TypeExpression db (null ( 'PGrange 'PGint8))
+ Squeal.PostgreSQL.Expression.Type: int8range :: TypeExpression db (null ('PGrange 'PGint8))
- Squeal.PostgreSQL.Expression.Type: integer :: TypeExpression db (null 'PGint4)
+ Squeal.PostgreSQL.Expression.Type: integer :: TypeExpression db (null 'PGint4)
- Squeal.PostgreSQL.Expression.Type: interval :: TypeExpression db (null 'PGinterval)
+ Squeal.PostgreSQL.Expression.Type: interval :: TypeExpression db (null 'PGinterval)
- Squeal.PostgreSQL.Expression.Type: json :: TypeExpression db (null 'PGjson)
+ Squeal.PostgreSQL.Expression.Type: json :: TypeExpression db (null 'PGjson)
- Squeal.PostgreSQL.Expression.Type: jsonb :: TypeExpression db (null 'PGjsonb)
+ Squeal.PostgreSQL.Expression.Type: jsonb :: TypeExpression db (null 'PGjsonb)
- Squeal.PostgreSQL.Expression.Type: money :: TypeExpression schema (null 'PGmoney)
+ Squeal.PostgreSQL.Expression.Type: money :: TypeExpression schema (null 'PGmoney)
- Squeal.PostgreSQL.Expression.Type: notNullable :: TypeExpression db (null ty) -> ColumnTypeExpression db ( 'NoDef :=> 'NotNull ty)
+ Squeal.PostgreSQL.Expression.Type: notNullable :: TypeExpression db (null ty) -> ColumnTypeExpression db ('NoDef :=> 'NotNull ty)
- Squeal.PostgreSQL.Expression.Type: nullable :: TypeExpression db (null ty) -> ColumnTypeExpression db ( 'NoDef :=> 'Null ty)
+ Squeal.PostgreSQL.Expression.Type: nullable :: TypeExpression db (null ty) -> ColumnTypeExpression db ('NoDef :=> 'Null ty)
- Squeal.PostgreSQL.Expression.Type: numeric :: TypeExpression db (null 'PGnumeric)
+ Squeal.PostgreSQL.Expression.Type: numeric :: TypeExpression db (null 'PGnumeric)
- Squeal.PostgreSQL.Expression.Type: numrange :: TypeExpression db (null ( 'PGrange 'PGnumeric))
+ Squeal.PostgreSQL.Expression.Type: numrange :: TypeExpression db (null ('PGrange 'PGnumeric))
- Squeal.PostgreSQL.Expression.Type: oid :: TypeExpression db (null 'PGoid)
+ Squeal.PostgreSQL.Expression.Type: oid :: TypeExpression db (null 'PGoid)
- Squeal.PostgreSQL.Expression.Type: real :: TypeExpression db (null 'PGfloat4)
+ Squeal.PostgreSQL.Expression.Type: real :: TypeExpression db (null 'PGfloat4)
- Squeal.PostgreSQL.Expression.Type: record :: TypeExpression db (null ( 'PGcomposite record))
+ Squeal.PostgreSQL.Expression.Type: record :: TypeExpression db (null ('PGcomposite record))
- Squeal.PostgreSQL.Expression.Type: serial :: ColumnTypeExpression db ( 'Def :=> 'NotNull 'PGint4)
+ Squeal.PostgreSQL.Expression.Type: serial :: ColumnTypeExpression db ('Def :=> 'NotNull 'PGint4)
- Squeal.PostgreSQL.Expression.Type: serial2 :: ColumnTypeExpression db ( 'Def :=> 'NotNull 'PGint2)
+ Squeal.PostgreSQL.Expression.Type: serial2 :: ColumnTypeExpression db ('Def :=> 'NotNull 'PGint2)
- Squeal.PostgreSQL.Expression.Type: serial4 :: ColumnTypeExpression db ( 'Def :=> 'NotNull 'PGint4)
+ Squeal.PostgreSQL.Expression.Type: serial4 :: ColumnTypeExpression db ('Def :=> 'NotNull 'PGint4)
- Squeal.PostgreSQL.Expression.Type: serial8 :: ColumnTypeExpression db ( 'Def :=> 'NotNull 'PGint8)
+ Squeal.PostgreSQL.Expression.Type: serial8 :: ColumnTypeExpression db ('Def :=> 'NotNull 'PGint8)
- Squeal.PostgreSQL.Expression.Type: smallint :: TypeExpression db (null 'PGint2)
+ Squeal.PostgreSQL.Expression.Type: smallint :: TypeExpression db (null 'PGint2)
- Squeal.PostgreSQL.Expression.Type: smallserial :: ColumnTypeExpression db ( 'Def :=> 'NotNull 'PGint2)
+ Squeal.PostgreSQL.Expression.Type: smallserial :: ColumnTypeExpression db ('Def :=> 'NotNull 'PGint2)
- Squeal.PostgreSQL.Expression.Type: text :: TypeExpression db (null 'PGtext)
+ Squeal.PostgreSQL.Expression.Type: text :: TypeExpression db (null 'PGtext)
- Squeal.PostgreSQL.Expression.Type: time :: TypeExpression db (null 'PGtime)
+ Squeal.PostgreSQL.Expression.Type: time :: TypeExpression db (null 'PGtime)
- Squeal.PostgreSQL.Expression.Type: timeWithTimeZone :: TypeExpression db (null 'PGtimetz)
+ Squeal.PostgreSQL.Expression.Type: timeWithTimeZone :: TypeExpression db (null 'PGtimetz)
- Squeal.PostgreSQL.Expression.Type: timestamp :: TypeExpression db (null 'PGtimestamp)
+ Squeal.PostgreSQL.Expression.Type: timestamp :: TypeExpression db (null 'PGtimestamp)
- Squeal.PostgreSQL.Expression.Type: timestampWithTimeZone :: TypeExpression db (null 'PGtimestamptz)
+ Squeal.PostgreSQL.Expression.Type: timestampWithTimeZone :: TypeExpression db (null 'PGtimestamptz)
- Squeal.PostgreSQL.Expression.Type: timestamptz :: TypeExpression db (null 'PGtimestamptz)
+ Squeal.PostgreSQL.Expression.Type: timestamptz :: TypeExpression db (null 'PGtimestamptz)
- Squeal.PostgreSQL.Expression.Type: timetz :: TypeExpression db (null 'PGtimetz)
+ Squeal.PostgreSQL.Expression.Type: timetz :: TypeExpression db (null 'PGtimetz)
- Squeal.PostgreSQL.Expression.Type: tsquery :: TypeExpression db (null 'PGtsquery)
+ Squeal.PostgreSQL.Expression.Type: tsquery :: TypeExpression db (null 'PGtsquery)
- Squeal.PostgreSQL.Expression.Type: tsrange :: TypeExpression db (null ( 'PGrange 'PGtimestamp))
+ Squeal.PostgreSQL.Expression.Type: tsrange :: TypeExpression db (null ('PGrange 'PGtimestamp))
- Squeal.PostgreSQL.Expression.Type: tstzrange :: TypeExpression db (null ( 'PGrange 'PGtimestamptz))
+ Squeal.PostgreSQL.Expression.Type: tstzrange :: TypeExpression db (null ('PGrange 'PGtimestamptz))
- Squeal.PostgreSQL.Expression.Type: tsvector :: TypeExpression db (null 'PGtsvector)
+ Squeal.PostgreSQL.Expression.Type: tsvector :: TypeExpression db (null 'PGtsvector)
- Squeal.PostgreSQL.Expression.Type: typedef :: (Has sch db schema, Has td schema ( 'Typedef ty)) => QualifiedAlias sch td -> TypeExpression db (null ty)
+ Squeal.PostgreSQL.Expression.Type: typedef :: (Has sch db schema, Has td schema ('Typedef ty)) => QualifiedAlias sch td -> TypeExpression db (null ty)
- Squeal.PostgreSQL.Expression.Type: typetable :: (Has sch db schema, Has tab schema ( 'Table table)) => QualifiedAlias sch tab -> TypeExpression db (null ( 'PGcomposite (TableToRow table)))
+ Squeal.PostgreSQL.Expression.Type: typetable :: (Has sch db schema, Has tab schema ('Table table)) => QualifiedAlias sch tab -> TypeExpression db (null ('PGcomposite (TableToRow table)))
- Squeal.PostgreSQL.Expression.Type: typeview :: (Has sch db schema, Has vw schema ( 'View view)) => QualifiedAlias sch vw -> TypeExpression db (null ( 'PGcomposite view))
+ Squeal.PostgreSQL.Expression.Type: typeview :: (Has sch db schema, Has vw schema ('View view)) => QualifiedAlias sch vw -> TypeExpression db (null ('PGcomposite view))
- Squeal.PostgreSQL.Expression.Type: uuid :: TypeExpression db (null 'PGuuid)
+ Squeal.PostgreSQL.Expression.Type: uuid :: TypeExpression db (null 'PGuuid)
- Squeal.PostgreSQL.Expression.Type: vararray :: TypeExpression db pg -> TypeExpression db (null ( 'PGvararray pg))
+ Squeal.PostgreSQL.Expression.Type: vararray :: TypeExpression db pg -> TypeExpression db (null ('PGvararray pg))
- Squeal.PostgreSQL.Expression.Type: varchar :: forall n db null. (KnownNat n, 1 <= n) => TypeExpression db (null ( 'PGvarchar n))
+ Squeal.PostgreSQL.Expression.Type: varchar :: forall n db null. (KnownNat n, 1 <= n) => TypeExpression db (null ('PGvarchar n))
- Squeal.PostgreSQL.Expression.Window: UnsafeWindowFunction :: ByteString -> WindowFunction
+ Squeal.PostgreSQL.Expression.Window: UnsafeWindowFunction :: ByteString -> WindowFunction (grp :: Grouping) (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (from :: FromType) (ty :: NullType)
- Squeal.PostgreSQL.Expression.Window: WindowArg :: NP (Expression grp lat with db params from) args -> [Condition grp lat with db params from] -> WindowArg
+ Squeal.PostgreSQL.Expression.Window: WindowArg :: NP (Expression grp lat with db params from) args -> [Condition grp lat with db params from] -> WindowArg (grp :: Grouping) (args :: [NullType]) (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (from :: FromType)
- Squeal.PostgreSQL.Expression.Window: [renderWindowFunction] :: WindowFunction -> ByteString
+ Squeal.PostgreSQL.Expression.Window: [renderWindowFunction] :: WindowFunction (grp :: Grouping) (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (from :: FromType) (ty :: NullType) -> ByteString
- Squeal.PostgreSQL.Expression.Window: [windowArgs] :: WindowArg -> NP (Expression grp lat with db params from) args
+ Squeal.PostgreSQL.Expression.Window: [windowArgs] :: WindowArg (grp :: Grouping) (args :: [NullType]) (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (from :: FromType) -> NP (Expression grp lat with db params from) args
- Squeal.PostgreSQL.Expression.Window: [windowFilter] :: WindowArg -> [Condition grp lat with db params from]
+ Squeal.PostgreSQL.Expression.Window: [windowFilter] :: WindowArg (grp :: Grouping) (args :: [NullType]) (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (from :: FromType) -> [Condition grp lat with db params from]
- Squeal.PostgreSQL.Expression.Window: cumeDist :: WinFun0 ( 'NotNull 'PGfloat8)
+ Squeal.PostgreSQL.Expression.Window: cumeDist :: WinFun0 ('NotNull 'PGfloat8)
- Squeal.PostgreSQL.Expression.Window: denseRank :: WinFun0 ( 'NotNull 'PGint8)
+ Squeal.PostgreSQL.Expression.Window: denseRank :: WinFun0 ('NotNull 'PGint8)
- Squeal.PostgreSQL.Expression.Window: lag :: '[ty, 'NotNull 'PGint4, ty] --#-> ty
+ Squeal.PostgreSQL.Expression.Window: lag :: '[ty, 'NotNull 'PGint4, ty] --#-> ty
- Squeal.PostgreSQL.Expression.Window: lead :: '[ty, 'NotNull 'PGint4, ty] --#-> ty
+ Squeal.PostgreSQL.Expression.Window: lead :: '[ty, 'NotNull 'PGint4, ty] --#-> ty
- Squeal.PostgreSQL.Expression.Window: nthValue :: '[null ty, 'NotNull 'PGint4] --#-> 'Null ty
+ Squeal.PostgreSQL.Expression.Window: nthValue :: '[null ty, 'NotNull 'PGint4] --#-> 'Null ty
- Squeal.PostgreSQL.Expression.Window: ntile :: 'NotNull 'PGint4 -#-> 'NotNull 'PGint4
+ Squeal.PostgreSQL.Expression.Window: ntile :: 'NotNull 'PGint4 -#-> 'NotNull 'PGint4
- Squeal.PostgreSQL.Expression.Window: percentRank :: WinFun0 ( 'NotNull 'PGfloat8)
+ Squeal.PostgreSQL.Expression.Window: percentRank :: WinFun0 ('NotNull 'PGfloat8)
- Squeal.PostgreSQL.Expression.Window: rank :: WinFun0 ( 'NotNull 'PGint8)
+ Squeal.PostgreSQL.Expression.Window: rank :: WinFun0 ('NotNull 'PGint8)
- Squeal.PostgreSQL.Expression.Window: rowNumber :: WinFun0 ( 'NotNull 'PGint8)
+ Squeal.PostgreSQL.Expression.Window: rowNumber :: WinFun0 ('NotNull 'PGint8)
- Squeal.PostgreSQL.Manipulation: Returning :: Selection 'Ungrouped '[] with db params from row -> ReturningClause with db params from row
+ Squeal.PostgreSQL.Manipulation: Returning :: Selection 'Ungrouped '[] with db params from row -> ReturningClause with db params from row
- Squeal.PostgreSQL.Manipulation: UnsafeManipulation :: ByteString -> Manipulation
+ Squeal.PostgreSQL.Manipulation: UnsafeManipulation :: ByteString -> Manipulation (with :: FromType) (db :: SchemasType) (params :: [NullType]) (columns :: RowType)
- Squeal.PostgreSQL.Manipulation: [renderManipulation] :: Manipulation -> ByteString
+ Squeal.PostgreSQL.Manipulation: [renderManipulation] :: Manipulation (with :: FromType) (db :: SchemasType) (params :: [NullType]) (columns :: RowType) -> ByteString
- Squeal.PostgreSQL.Manipulation: pattern Returning_ :: SListI row => NP (Aliased (Expression 'Ungrouped '[] with db params from)) row -> ReturningClause with db params from row
+ Squeal.PostgreSQL.Manipulation: pattern Returning_ :: SListI row => NP (Aliased (Expression 'Ungrouped '[] with db params from)) row -> ReturningClause with db params from row
- Squeal.PostgreSQL.Manipulation.Call: call :: (Has sch db schema, Has pro schema ( 'Procedure '[x])) => QualifiedAlias sch pro -> Expression 'Ungrouped '[] with db params '[] x -> Manipulation with db params '[]
+ Squeal.PostgreSQL.Manipulation.Call: call :: (Has sch db schema, Has pro schema ('Procedure '[x])) => QualifiedAlias sch pro -> Expression 'Ungrouped '[] with db params '[] x -> Manipulation with db params '[]
- Squeal.PostgreSQL.Manipulation.Call: callN :: (Has sch db schema, Has pro schema ( 'Procedure xs), SListI xs) => QualifiedAlias sch pro -> NP (Expression 'Ungrouped '[] with db params '[]) xs -> Manipulation with db params '[]
+ Squeal.PostgreSQL.Manipulation.Call: callN :: (Has sch db schema, Has pro schema ('Procedure xs), SListI xs) => QualifiedAlias sch pro -> NP (Expression 'Ungrouped '[] with db params '[]) xs -> Manipulation with db params '[]
- Squeal.PostgreSQL.Manipulation.Call: unsafeCall :: ByteString -> Expression 'Ungrouped '[] with db params '[] x -> Manipulation with db params '[]
+ Squeal.PostgreSQL.Manipulation.Call: unsafeCall :: ByteString -> Expression 'Ungrouped '[] with db params '[] x -> Manipulation with db params '[]
- Squeal.PostgreSQL.Manipulation.Call: unsafeCallN :: SListI xs => ByteString -> NP (Expression 'Ungrouped '[] with db params '[]) xs -> Manipulation with db params '[]
+ Squeal.PostgreSQL.Manipulation.Call: unsafeCallN :: SListI xs => ByteString -> NP (Expression 'Ungrouped '[] with db params '[]) xs -> Manipulation with db params '[]
- Squeal.PostgreSQL.Manipulation.Delete: deleteFrom :: (SListI row, Has sch db schema, Has tab0 schema ( 'Table table)) => Aliased (QualifiedAlias sch) (tab ::: tab0) -> UsingClause with db params from -> Condition 'Ungrouped '[] with db params ((tab ::: TableToRow table) : from) -> ReturningClause with db params ((tab ::: TableToRow table) : from) row -> Manipulation with db params row
+ Squeal.PostgreSQL.Manipulation.Delete: deleteFrom :: (SListI row, Has sch db schema, Has tab0 schema ('Table table)) => Aliased (QualifiedAlias sch) (tab ::: tab0) -> UsingClause with db params from -> Condition 'Ungrouped '[] with db params ((tab ::: TableToRow table) : from) -> ReturningClause with db params ((tab ::: TableToRow table) : from) row -> Manipulation with db params row
- Squeal.PostgreSQL.Manipulation.Delete: deleteFrom_ :: (Has sch db schema, Has tab0 schema ( 'Table table)) => Aliased (QualifiedAlias sch) (tab ::: tab0) -> Condition 'Ungrouped '[] with db params '[tab ::: TableToRow table] -> Manipulation with db params '[]
+ Squeal.PostgreSQL.Manipulation.Delete: deleteFrom_ :: (Has sch db schema, Has tab0 schema ('Table table)) => Aliased (QualifiedAlias sch) (tab ::: tab0) -> Condition 'Ungrouped '[] with db params '[tab ::: TableToRow table] -> Manipulation with db params '[]
- Squeal.PostgreSQL.Manipulation.Insert: [DoUpdate] :: (row ~ TableToRow table, from ~ '[tab ::: row, "excluded" ::: row], Updatable table updates) => NP (Aliased (Optional (Expression 'Ungrouped '[] with db params from))) updates -> [Condition 'Ungrouped '[] with db params from] -> ConflictAction tab with db params table
+ Squeal.PostgreSQL.Manipulation.Insert: [DoUpdate] :: (row ~ TableToRow table, from ~ '[tab ::: row, "excluded" ::: row], Updatable table updates) => NP (Aliased (Optional (Expression 'Ungrouped '[] with db params from))) updates -> [Condition 'Ungrouped '[] with db params from] -> ConflictAction tab with db params table
- Squeal.PostgreSQL.Manipulation.Insert: [Values] :: SListI columns => NP (Aliased (Optional (Expression 'Ungrouped '[] with db params from))) columns -> [NP (Aliased (Optional (Expression 'Ungrouped '[] with db params from))) columns] -> QueryClause with db params columns
+ Squeal.PostgreSQL.Manipulation.Insert: [Values] :: SListI columns => NP (Aliased (Optional (Expression 'Ungrouped '[] with db params from))) columns -> [NP (Aliased (Optional (Expression 'Ungrouped '[] with db params from))) columns] -> QueryClause with db params columns
- Squeal.PostgreSQL.Manipulation.Insert: insertInto :: (Has sch db schema, Has tab0 schema ( 'Table table), SListI (TableToColumns table), SListI row) => Aliased (QualifiedAlias sch) (tab ::: tab0) -> QueryClause with db params (TableToColumns table) -> ConflictClause tab with db params table -> ReturningClause with db params '[tab ::: TableToRow table] row -> Manipulation with db params row
+ Squeal.PostgreSQL.Manipulation.Insert: insertInto :: (Has sch db schema, Has tab0 schema ('Table table), SListI (TableToColumns table), SListI row) => Aliased (QualifiedAlias sch) (tab ::: tab0) -> QueryClause with db params (TableToColumns table) -> ConflictClause tab with db params table -> ReturningClause with db params '[tab ::: TableToRow table] row -> Manipulation with db params row
- Squeal.PostgreSQL.Manipulation.Insert: insertInto_ :: (Has sch db schema, Has tab0 schema ( 'Table table), SListI (TableToColumns table)) => Aliased (QualifiedAlias sch) (tab ::: tab0) -> QueryClause with db params (TableToColumns table) -> Manipulation with db params '[]
+ Squeal.PostgreSQL.Manipulation.Insert: insertInto_ :: (Has sch db schema, Has tab0 schema ('Table table), SListI (TableToColumns table)) => Aliased (QualifiedAlias sch) (tab ::: tab0) -> QueryClause with db params (TableToColumns table) -> Manipulation with db params '[]
- Squeal.PostgreSQL.Manipulation.Insert: pattern Values_ :: SListI columns => NP (Aliased (Optional (Expression 'Ungrouped '[] with db params from))) columns -> QueryClause with db params columns
+ Squeal.PostgreSQL.Manipulation.Insert: pattern Values_ :: SListI columns => NP (Aliased (Optional (Expression 'Ungrouped '[] with db params from))) columns -> QueryClause with db params columns
- Squeal.PostgreSQL.Manipulation.Update: update :: (Has sch db schema, Has tab0 schema ( 'Table table), Updatable table updates, SListI row) => Aliased (QualifiedAlias sch) (tab ::: tab0) -> NP (Aliased (Optional (Expression 'Ungrouped '[] with db params ((tab ::: TableToRow table) : from)))) updates -> UsingClause with db params from -> Condition 'Ungrouped '[] with db params ((tab ::: TableToRow table) : from) -> ReturningClause with db params ((tab ::: TableToRow table) : from) row -> Manipulation with db params row
+ Squeal.PostgreSQL.Manipulation.Update: update :: (Has sch db schema, Has tab0 schema ('Table table), Updatable table updates, SListI row) => Aliased (QualifiedAlias sch) (tab ::: tab0) -> NP (Aliased (Optional (Expression 'Ungrouped '[] with db params ((tab ::: TableToRow table) : from)))) updates -> UsingClause with db params from -> Condition 'Ungrouped '[] with db params ((tab ::: TableToRow table) : from) -> ReturningClause with db params ((tab ::: TableToRow table) : from) row -> Manipulation with db params row
- Squeal.PostgreSQL.Manipulation.Update: update_ :: (Has sch db schema, Has tab0 schema ( 'Table table), KnownSymbol tab, Updatable table updates) => Aliased (QualifiedAlias sch) (tab ::: tab0) -> NP (Aliased (Optional (Expression 'Ungrouped '[] with db params '[tab ::: TableToRow table]))) updates -> Condition 'Ungrouped '[] with db params '[tab ::: TableToRow table] -> Manipulation with db params '[]
+ Squeal.PostgreSQL.Manipulation.Update: update_ :: (Has sch db schema, Has tab0 schema ('Table table), KnownSymbol tab, Updatable table updates) => Aliased (QualifiedAlias sch) (tab ::: tab0) -> NP (Aliased (Optional (Expression 'Ungrouped '[] with db params '[tab ::: TableToRow table]))) updates -> Condition 'Ungrouped '[] with db params '[tab ::: TableToRow table] -> Manipulation with db params '[]
- Squeal.PostgreSQL.Query: UnsafeQuery :: ByteString -> Query
+ Squeal.PostgreSQL.Query: UnsafeQuery :: ByteString -> Query (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (row :: RowType)
- Squeal.PostgreSQL.Query: [renderQuery] :: Query -> ByteString
+ Squeal.PostgreSQL.Query: [renderQuery] :: Query (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (row :: RowType) -> ByteString
- Squeal.PostgreSQL.Query.From: UnsafeFromClause :: ByteString -> FromClause
+ Squeal.PostgreSQL.Query.From: UnsafeFromClause :: ByteString -> FromClause (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (from :: FromType)
- Squeal.PostgreSQL.Query.From: [renderFromClause] :: FromClause -> ByteString
+ Squeal.PostgreSQL.Query.From: [renderFromClause] :: FromClause (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (from :: FromType) -> ByteString
- Squeal.PostgreSQL.Query.From: table :: (Has sch db schema, Has tab schema ( 'Table table)) => Aliased (QualifiedAlias sch) (alias ::: tab) -> FromClause lat with db params '[alias ::: TableToRow table]
+ Squeal.PostgreSQL.Query.From: table :: (Has sch db schema, Has tab schema ('Table table)) => Aliased (QualifiedAlias sch) (alias ::: tab) -> FromClause lat with db params '[alias ::: TableToRow table]
- Squeal.PostgreSQL.Query.From: view :: (Has sch db schema, Has vw schema ( 'View view)) => Aliased (QualifiedAlias sch) (alias ::: vw) -> FromClause lat with db params '[alias ::: view]
+ Squeal.PostgreSQL.Query.From: view :: (Has sch db schema, Has vw schema ('View view)) => Aliased (QualifiedAlias sch) (alias ::: vw) -> FromClause lat with db params '[alias ::: view]
- Squeal.PostgreSQL.Query.From.Join: [JoinFunctionN] :: SListI args => SetFunN db args set -> NP (Expression 'Ungrouped lat with db params left) args -> JoinItem lat with db params left '[set]
+ Squeal.PostgreSQL.Query.From.Join: [JoinFunctionN] :: SListI args => SetFunN db args set -> NP (Expression 'Ungrouped lat with db params left) args -> JoinItem lat with db params left '[set]
- Squeal.PostgreSQL.Query.From.Join: [JoinFunction] :: SetFun db arg set -> Expression 'Ungrouped lat with db params left arg -> JoinItem lat with db params left '[set]
+ Squeal.PostgreSQL.Query.From.Join: [JoinFunction] :: SetFun db arg set -> Expression 'Ungrouped lat with db params left arg -> JoinItem lat with db params left '[set]
- Squeal.PostgreSQL.Query.From.Join: fullOuter :: JoinItem lat with db params left right -> Condition 'Ungrouped lat with db params (Join left right) -> FromClause lat with db params left -> FromClause lat with db params (NullifyFrom (Join left right))
+ Squeal.PostgreSQL.Query.From.Join: fullOuter :: JoinItem lat with db params left right -> Condition 'Ungrouped lat with db params (Join left right) -> FromClause lat with db params left -> FromClause lat with db params (NullifyFrom (Join left right))
- Squeal.PostgreSQL.Query.From.Join: fullOuterJoin :: FromClause lat with db params right -> Condition 'Ungrouped lat with db params (Join left right) -> FromClause lat with db params left -> FromClause lat with db params (NullifyFrom (Join left right))
+ Squeal.PostgreSQL.Query.From.Join: fullOuterJoin :: FromClause lat with db params right -> Condition 'Ungrouped lat with db params (Join left right) -> FromClause lat with db params left -> FromClause lat with db params (NullifyFrom (Join left right))
- Squeal.PostgreSQL.Query.From.Join: fullOuterJoinLateral :: Aliased (Query (Join lat left) with db params) query -> Condition 'Ungrouped lat with db params (Join left '[query]) -> FromClause lat with db params left -> FromClause lat with db params (NullifyFrom (Join left '[query]))
+ Squeal.PostgreSQL.Query.From.Join: fullOuterJoinLateral :: Aliased (Query (Join lat left) with db params) query -> Condition 'Ungrouped lat with db params (Join left '[query]) -> FromClause lat with db params left -> FromClause lat with db params (NullifyFrom (Join left '[query]))
- Squeal.PostgreSQL.Query.From.Join: inner :: JoinItem lat with db params left right -> Condition 'Ungrouped lat with db params (Join left right) -> FromClause lat with db params left -> FromClause lat with db params (Join left right)
+ Squeal.PostgreSQL.Query.From.Join: inner :: JoinItem lat with db params left right -> Condition 'Ungrouped lat with db params (Join left right) -> FromClause lat with db params left -> FromClause lat with db params (Join left right)
- Squeal.PostgreSQL.Query.From.Join: innerJoin :: FromClause lat with db params right -> Condition 'Ungrouped lat with db params (Join left right) -> FromClause lat with db params left -> FromClause lat with db params (Join left right)
+ Squeal.PostgreSQL.Query.From.Join: innerJoin :: FromClause lat with db params right -> Condition 'Ungrouped lat with db params (Join left right) -> FromClause lat with db params left -> FromClause lat with db params (Join left right)
- Squeal.PostgreSQL.Query.From.Join: innerJoinLateral :: Aliased (Query (Join lat left) with db params) query -> Condition 'Ungrouped lat with db params (Join left '[query]) -> FromClause lat with db params left -> FromClause lat with db params (Join left '[query])
+ Squeal.PostgreSQL.Query.From.Join: innerJoinLateral :: Aliased (Query (Join lat left) with db params) query -> Condition 'Ungrouped lat with db params (Join left '[query]) -> FromClause lat with db params left -> FromClause lat with db params (Join left '[query])
- Squeal.PostgreSQL.Query.From.Join: leftOuter :: JoinItem lat with db params left right -> Condition 'Ungrouped lat with db params (Join left right) -> FromClause lat with db params left -> FromClause lat with db params (Join left (NullifyFrom right))
+ Squeal.PostgreSQL.Query.From.Join: leftOuter :: JoinItem lat with db params left right -> Condition 'Ungrouped lat with db params (Join left right) -> FromClause lat with db params left -> FromClause lat with db params (Join left (NullifyFrom right))
- Squeal.PostgreSQL.Query.From.Join: leftOuterJoin :: FromClause lat with db params right -> Condition 'Ungrouped lat with db params (Join left right) -> FromClause lat with db params left -> FromClause lat with db params (Join left (NullifyFrom right))
+ Squeal.PostgreSQL.Query.From.Join: leftOuterJoin :: FromClause lat with db params right -> Condition 'Ungrouped lat with db params (Join left right) -> FromClause lat with db params left -> FromClause lat with db params (Join left (NullifyFrom right))
- Squeal.PostgreSQL.Query.From.Join: leftOuterJoinLateral :: Aliased (Query (Join lat left) with db params) query -> Condition 'Ungrouped lat with db params (Join left '[query]) -> FromClause lat with db params left -> FromClause lat with db params (Join left (NullifyFrom '[query]))
+ Squeal.PostgreSQL.Query.From.Join: leftOuterJoinLateral :: Aliased (Query (Join lat left) with db params) query -> Condition 'Ungrouped lat with db params (Join left '[query]) -> FromClause lat with db params left -> FromClause lat with db params (Join left (NullifyFrom '[query]))
- Squeal.PostgreSQL.Query.From.Join: rightOuter :: JoinItem lat with db params left right -> Condition 'Ungrouped lat with db params (Join left right) -> FromClause lat with db params left -> FromClause lat with db params (Join (NullifyFrom left) right)
+ Squeal.PostgreSQL.Query.From.Join: rightOuter :: JoinItem lat with db params left right -> Condition 'Ungrouped lat with db params (Join left right) -> FromClause lat with db params left -> FromClause lat with db params (Join (NullifyFrom left) right)
- Squeal.PostgreSQL.Query.From.Join: rightOuterJoin :: FromClause lat with db params right -> Condition 'Ungrouped lat with db params (Join left right) -> FromClause lat with db params left -> FromClause lat with db params (Join (NullifyFrom left) right)
+ Squeal.PostgreSQL.Query.From.Join: rightOuterJoin :: FromClause lat with db params right -> Condition 'Ungrouped lat with db params (Join left right) -> FromClause lat with db params left -> FromClause lat with db params (Join (NullifyFrom left) right)
- Squeal.PostgreSQL.Query.From.Join: rightOuterJoinLateral :: Aliased (Query (Join lat left) with db params) query -> Condition 'Ungrouped lat with db params (Join left '[query]) -> FromClause lat with db params left -> FromClause lat with db params (Join (NullifyFrom left) '[query])
+ Squeal.PostgreSQL.Query.From.Join: rightOuterJoinLateral :: Aliased (Query (Join lat left) with db params) query -> Condition 'Ungrouped lat with db params (Join left '[query]) -> FromClause lat with db params left -> FromClause lat with db params (Join (NullifyFrom left) '[query])
- Squeal.PostgreSQL.Query.From.Set: generateSeries :: ty `In` '[ 'PGint4, 'PGint8, 'PGnumeric] => '[null ty, null ty] --|-> ("generate_series" ::: '["generate_series" ::: null ty])
+ Squeal.PostgreSQL.Query.From.Set: generateSeries :: ty `In` '[ 'PGint4, 'PGint8, 'PGnumeric] => '[null ty, null ty] --|-> ("generate_series" ::: '["generate_series" ::: null ty])
- Squeal.PostgreSQL.Query.From.Set: generateSeriesStep :: ty `In` '[ 'PGint4, 'PGint8, 'PGnumeric] => '[null ty, null ty, null ty] --|-> ("generate_series" ::: '["generate_series" ::: null ty])
+ Squeal.PostgreSQL.Query.From.Set: generateSeriesStep :: ty `In` '[ 'PGint4, 'PGint8, 'PGnumeric] => '[null ty, null ty, null ty] --|-> ("generate_series" ::: '["generate_series" ::: null ty])
- Squeal.PostgreSQL.Query.From.Set: generateSeriesTimestamp :: ty `In` '[ 'PGtimestamp, 'PGtimestamptz] => '[null ty, null ty, null 'PGinterval] --|-> ("generate_series" ::: '["generate_series" ::: null ty])
+ Squeal.PostgreSQL.Query.From.Set: generateSeriesTimestamp :: ty `In` '[ 'PGtimestamp, 'PGtimestamptz] => '[null ty, null ty, null 'PGinterval] --|-> ("generate_series" ::: '["generate_series" ::: null ty])
- Squeal.PostgreSQL.Query.From.Set: setFunction :: (Has sch db schema, Has fun schema ( 'Function ('[ty] :=> 'ReturnsTable row))) => QualifiedAlias sch fun -> SetFun db ty (fun ::: row)
+ Squeal.PostgreSQL.Query.From.Set: setFunction :: (Has sch db schema, Has fun schema ('Function ('[ty] :=> 'ReturnsTable row))) => QualifiedAlias sch fun -> SetFun db ty (fun ::: row)
- Squeal.PostgreSQL.Query.From.Set: setFunctionN :: (Has sch db schema, Has fun schema ( 'Function (tys :=> 'ReturnsTable row)), SListI tys) => QualifiedAlias sch fun -> SetFunN db tys (fun ::: row)
+ Squeal.PostgreSQL.Query.From.Set: setFunctionN :: (Has sch db schema, Has fun schema ('Function (tys :=> 'ReturnsTable row)), SListI tys) => QualifiedAlias sch fun -> SetFunN db tys (fun ::: row)
- Squeal.PostgreSQL.Query.From.Set: type SetFun db arg row = forall lat with params. Expression 'Ungrouped lat with db params '[] arg " input" -> FromClause lat with db params '[row] " output"
+ Squeal.PostgreSQL.Query.From.Set: type SetFun db arg row = forall lat with params. Expression 'Ungrouped lat with db params '[] arg " input" -> FromClause lat with db params '[row] " output"
- Squeal.PostgreSQL.Query.From.Set: type SetFunN db args set = forall lat with params. NP (Expression 'Ungrouped lat with db params '[]) args " input" -> FromClause lat with db params '[set] " output"
+ Squeal.PostgreSQL.Query.From.Set: type SetFunN db args set = forall lat with params. NP (Expression 'Ungrouped lat with db params '[]) args " input" -> FromClause lat with db params '[set] " output"
- Squeal.PostgreSQL.Query.Select: [DotStar] :: Has tab from row => Alias tab -> Selection 'Ungrouped lat with db params from row
+ Squeal.PostgreSQL.Query.Select: [DotStar] :: Has tab from row => Alias tab -> Selection 'Ungrouped lat with db params from row
- Squeal.PostgreSQL.Query.Select: [Star] :: HasUnique tab from row => Selection 'Ungrouped lat with db params from row
+ Squeal.PostgreSQL.Query.Select: [Star] :: HasUnique tab from row => Selection 'Ungrouped lat with db params from row
- Squeal.PostgreSQL.Query.Table: TableExpression :: FromClause lat with db params from -> [Condition 'Ungrouped lat with db params from] -> GroupByClause grp from -> HavingClause grp lat with db params from -> [SortExpression grp lat with db params from] -> [Word64] -> [Word64] -> [LockingClause from] -> TableExpression
+ Squeal.PostgreSQL.Query.Table: TableExpression :: FromClause lat with db params from -> [Condition 'Ungrouped lat with db params from] -> GroupByClause grp from -> HavingClause grp lat with db params from -> [SortExpression grp lat with db params from] -> [Word64] -> [Word64] -> [LockingClause from] -> TableExpression (grp :: Grouping) (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (from :: FromType)
- Squeal.PostgreSQL.Query.Table: [Having] :: [Condition ( 'Grouped bys) lat with db params from] -> HavingClause ( 'Grouped bys) lat with db params from
+ Squeal.PostgreSQL.Query.Table: [Having] :: [Condition ('Grouped bys) lat with db params from] -> HavingClause ('Grouped bys) lat with db params from
- Squeal.PostgreSQL.Query.Table: [NoHaving] :: HavingClause 'Ungrouped lat with db params from
+ Squeal.PostgreSQL.Query.Table: [NoHaving] :: HavingClause 'Ungrouped lat with db params from
- Squeal.PostgreSQL.Query.Table: [fromClause] :: TableExpression -> FromClause lat with db params from
+ Squeal.PostgreSQL.Query.Table: [fromClause] :: TableExpression (grp :: Grouping) (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (from :: FromType) -> FromClause lat with db params from
- Squeal.PostgreSQL.Query.Table: [groupByClause] :: TableExpression -> GroupByClause grp from
+ Squeal.PostgreSQL.Query.Table: [groupByClause] :: TableExpression (grp :: Grouping) (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (from :: FromType) -> GroupByClause grp from
- Squeal.PostgreSQL.Query.Table: [havingClause] :: TableExpression -> HavingClause grp lat with db params from
+ Squeal.PostgreSQL.Query.Table: [havingClause] :: TableExpression (grp :: Grouping) (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (from :: FromType) -> HavingClause grp lat with db params from
- Squeal.PostgreSQL.Query.Table: [limitClause] :: TableExpression -> [Word64]
+ Squeal.PostgreSQL.Query.Table: [limitClause] :: TableExpression (grp :: Grouping) (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (from :: FromType) -> [Word64]
- Squeal.PostgreSQL.Query.Table: [lockingClauses] :: TableExpression -> [LockingClause from]
+ Squeal.PostgreSQL.Query.Table: [lockingClauses] :: TableExpression (grp :: Grouping) (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (from :: FromType) -> [LockingClause from]
- Squeal.PostgreSQL.Query.Table: [offsetClause] :: TableExpression -> [Word64]
+ Squeal.PostgreSQL.Query.Table: [offsetClause] :: TableExpression (grp :: Grouping) (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (from :: FromType) -> [Word64]
- Squeal.PostgreSQL.Query.Table: [orderByClause] :: TableExpression -> [SortExpression grp lat with db params from]
+ Squeal.PostgreSQL.Query.Table: [orderByClause] :: TableExpression (grp :: Grouping) (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (from :: FromType) -> [SortExpression grp lat with db params from]
- Squeal.PostgreSQL.Query.Table: [whereClause] :: TableExpression -> [Condition 'Ungrouped lat with db params from]
+ Squeal.PostgreSQL.Query.Table: [whereClause] :: TableExpression (grp :: Grouping) (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (from :: FromType) -> [Condition 'Ungrouped lat with db params from]
- Squeal.PostgreSQL.Query.Table: from :: FromClause lat with db params from -> TableExpression 'Ungrouped lat with db params from
+ Squeal.PostgreSQL.Query.Table: from :: FromClause lat with db params from -> TableExpression 'Ungrouped lat with db params from
- Squeal.PostgreSQL.Query.Table: groupBy :: SListI bys => NP (By from) bys -> TableExpression 'Ungrouped lat with db params from -> TableExpression ( 'Grouped bys) lat with db params from
+ Squeal.PostgreSQL.Query.Table: groupBy :: SListI bys => NP (By from) bys -> TableExpression 'Ungrouped lat with db params from -> TableExpression ('Grouped bys) lat with db params from
- Squeal.PostgreSQL.Query.Table: having :: Condition ( 'Grouped bys) lat with db params from -> TableExpression ( 'Grouped bys) lat with db params from -> TableExpression ( 'Grouped bys) lat with db params from
+ Squeal.PostgreSQL.Query.Table: having :: Condition ('Grouped bys) lat with db params from -> TableExpression ('Grouped bys) lat with db params from -> TableExpression ('Grouped bys) lat with db params from
- Squeal.PostgreSQL.Query.Table: lockRows :: LockingClause from -> TableExpression grp lat with db params from -> TableExpression grp lat with db params from
+ Squeal.PostgreSQL.Query.Table: lockRows :: LockingClause from -> TableExpression 'Ungrouped lat with db params from -> TableExpression 'Ungrouped lat with db params from
- Squeal.PostgreSQL.Query.Table: where_ :: Condition 'Ungrouped lat with db params from -> TableExpression grp lat with db params from -> TableExpression grp lat with db params from
+ Squeal.PostgreSQL.Query.Table: where_ :: Condition 'Ungrouped lat with db params from -> TableExpression grp lat with db params from -> TableExpression grp lat with db params from
- Squeal.PostgreSQL.Query.Values: values :: SListI cols => NP (Aliased (Expression 'Ungrouped lat with db params '[])) cols -> [NP (Aliased (Expression 'Ungrouped lat with db params '[])) cols] -> Query lat with db params cols
+ Squeal.PostgreSQL.Query.Values: values :: SListI cols => NP (Aliased (Expression 'Ungrouped lat with db params '[])) cols -> [NP (Aliased (Expression 'Ungrouped lat with db params '[])) cols] -> Query lat with db params cols
- Squeal.PostgreSQL.Query.Values: values_ :: SListI cols => NP (Aliased (Expression 'Ungrouped lat with db params '[])) cols -> Query lat with db params cols
+ Squeal.PostgreSQL.Query.Values: values_ :: SListI cols => NP (Aliased (Expression 'Ungrouped lat with db params '[])) cols -> Query lat with db params cols
- Squeal.PostgreSQL.Query.With: [CommonTableExpression] :: Aliased (statement with db params) (cte ::: common) -> CommonTableExpression statement db params with ((cte ::: common) : with)
+ Squeal.PostgreSQL.Query.With: [CommonTableExpression] :: Aliased (statement with db params) (cte ::: common) -> Materialization -> CommonTableExpression statement db params with ((cte ::: common) : with)
- Squeal.PostgreSQL.Session: PQ :: (K Connection db0 -> m (K x db1)) -> PQ
+ Squeal.PostgreSQL.Session: PQ :: (K Connection db0 -> m (K x db1)) -> PQ (db0 :: SchemasType) (db1 :: SchemasType) (m :: Type -> Type) (x :: Type)
- Squeal.PostgreSQL.Session: [unPQ] :: PQ -> K Connection db0 -> m (K x db1)
+ Squeal.PostgreSQL.Session: [unPQ] :: PQ (db0 :: SchemasType) (db1 :: SchemasType) (m :: Type -> Type) (x :: Type) -> K Connection db0 -> m (K x db1)
- Squeal.PostgreSQL.Session: withConnection :: forall db0 db1 io x. MonadUnliftIO io => ByteString -> PQ db0 db1 io x -> io x
+ Squeal.PostgreSQL.Session: withConnection :: forall db0 db1 io x. (MonadIO io, MonadMask io) => ByteString -> PQ db0 db1 io x -> io x
- Squeal.PostgreSQL.Session.Connection: K :: a -> K a
+ Squeal.PostgreSQL.Session.Connection: K :: a -> K a (b :: k)
- Squeal.PostgreSQL.Session.Connection: unK :: () => K a b -> a
+ Squeal.PostgreSQL.Session.Connection: unK :: forall k a (b :: k). K a b -> a
- Squeal.PostgreSQL.Session.Decode: DecodeRow :: ReaderT (NP (K (Maybe ByteString)) row) (Except Text) y -> DecodeRow
+ Squeal.PostgreSQL.Session.Decode: DecodeRow :: ReaderT (NP (K (Maybe ByteString)) row) (Except Text) y -> DecodeRow (row :: RowType) (y :: Type)
- Squeal.PostgreSQL.Session.Decode: ExceptT :: m (Either e a) -> ExceptT e a
+ Squeal.PostgreSQL.Session.Decode: ExceptT :: m (Either e a) -> ExceptT e (m :: Type -> Type) a
- Squeal.PostgreSQL.Session.Decode: StateT :: (s -> m (a, s)) -> StateT s a
+ Squeal.PostgreSQL.Session.Decode: StateT :: (s -> m (a, s)) -> StateT s (m :: Type -> Type) a
- Squeal.PostgreSQL.Session.Decode: [runStateT] :: StateT s a -> s -> m (a, s)
+ Squeal.PostgreSQL.Session.Decode: [runStateT] :: StateT s (m :: Type -> Type) a -> s -> m (a, s)
- Squeal.PostgreSQL.Session.Decode: [unDecodeRow] :: DecodeRow -> ReaderT (NP (K (Maybe ByteString)) row) (Except Text) y
+ Squeal.PostgreSQL.Session.Decode: [unDecodeRow] :: DecodeRow (row :: RowType) (y :: Type) -> ReaderT (NP (K (Maybe ByteString)) row) (Except Text) y
- Squeal.PostgreSQL.Session.Decode: enumValue :: (All KnownSymbol labels, PG y ~ 'PGenum labels) => NP (K y) labels -> StateT ByteString (Except Text) y
+ Squeal.PostgreSQL.Session.Decode: enumValue :: (All KnownSymbol labels, PG y ~ 'PGenum labels) => NP (K y) labels -> StateT ByteString (Except Text) y
- Squeal.PostgreSQL.Session.Decode: genericRow :: forall row y ys. (IsRecord y ys, AllZip FromField row ys) => DecodeRow row y
+ Squeal.PostgreSQL.Session.Decode: genericRow :: GenericRow row y ys => DecodeRow row y
- Squeal.PostgreSQL.Session.Decode: rowValue :: (PG y ~ 'PGcomposite row, SListI row) => DecodeRow row y -> StateT ByteString (Except Text) y
+ Squeal.PostgreSQL.Session.Decode: rowValue :: (PG y ~ 'PGcomposite row, SListI row) => DecodeRow row y -> StateT ByteString (Except Text) y
- Squeal.PostgreSQL.Session.Encode: (*.) :: forall db x x0 ty0 x1 ty1. (ToParam db ty0 x0, ToParam db ty1 x1) => (x -> x0) -> (x -> x1) -> EncodeParams db '[ty0, ty1] x
+ Squeal.PostgreSQL.Session.Encode: (*.) :: forall db x x0 ty0 x1 ty1. (ToParam db ty0 x0, ty0 ~ NullPG x0, ToParam db ty1 x1, ty1 ~ NullPG x1) => (x -> x0) -> (x -> x1) -> EncodeParams db '[ty0, ty1] x
- Squeal.PostgreSQL.Session.Encode: (.*) :: forall db x0 ty x tys. ToParam db ty x0 => (x -> x0) -> EncodeParams db tys x -> EncodeParams db (ty : tys) x
+ Squeal.PostgreSQL.Session.Encode: (.*) :: forall db x0 ty x tys. (ToParam db ty x0, ty ~ NullPG x0) => (x -> x0) -> EncodeParams db tys x -> EncodeParams db (ty : tys) x
- Squeal.PostgreSQL.Session.Encode: EncodeParams :: (x -> ReaderT (K Connection db) IO (NP (K (Maybe Encoding)) tys)) -> EncodeParams
+ Squeal.PostgreSQL.Session.Encode: EncodeParams :: (x -> ReaderT (K Connection db) IO (NP (K (Maybe Encoding)) tys)) -> EncodeParams (db :: SchemasType) (tys :: [NullType]) (x :: Type)
- Squeal.PostgreSQL.Session.Encode: [runEncodeParams] :: EncodeParams -> x -> ReaderT (K Connection db) IO (NP (K (Maybe Encoding)) tys)
+ Squeal.PostgreSQL.Session.Encode: [runEncodeParams] :: EncodeParams (db :: SchemasType) (tys :: [NullType]) (x :: Type) -> x -> ReaderT (K Connection db) IO (NP (K (Maybe Encoding)) tys)
- Squeal.PostgreSQL.Session.Encode: aParam :: forall db x. ToParam db (NullPG x) x => EncodeParams db '[NullPG x] x
+ Squeal.PostgreSQL.Session.Encode: aParam :: forall db x ty. (ToParam db ty x, ty ~ NullPG x) => EncodeParams db '[ty] x
- Squeal.PostgreSQL.Session.Encode: genericParams :: forall db params x xs. (IsProductType x xs, AllZip (ToParam db) params xs) => EncodeParams db params x
+ Squeal.PostgreSQL.Session.Encode: genericParams :: GenericParams db params x xs => EncodeParams db params x
- Squeal.PostgreSQL.Session.Exception: catchSqueal :: MonadUnliftIO io => io a -> (SquealException -> io a) -> io a
+ Squeal.PostgreSQL.Session.Exception: catchSqueal :: MonadCatch m => m a -> (SquealException -> m a) -> m a
- Squeal.PostgreSQL.Session.Exception: handleSqueal :: MonadUnliftIO io => (SquealException -> io a) -> io a -> io a
+ Squeal.PostgreSQL.Session.Exception: handleSqueal :: MonadCatch m => (SquealException -> m a) -> m a -> m a
- Squeal.PostgreSQL.Session.Exception: throwSqueal :: MonadUnliftIO io => SquealException -> io a
+ Squeal.PostgreSQL.Session.Exception: throwSqueal :: MonadThrow m => SquealException -> m a
- Squeal.PostgreSQL.Session.Exception: trySqueal :: MonadUnliftIO io => io a -> io (Either SquealException a)
+ Squeal.PostgreSQL.Session.Exception: trySqueal :: MonadCatch m => m a -> m (Either SquealException a)
- Squeal.PostgreSQL.Session.Migration: IsoQ :: c x y -> c y x -> IsoQ
+ Squeal.PostgreSQL.Session.Migration: IsoQ :: c x y -> c y x -> IsoQ (c :: k -> k -> Type) (x :: k) (y :: k)
- Squeal.PostgreSQL.Session.Migration: [down] :: IsoQ -> c y x
+ Squeal.PostgreSQL.Session.Migration: [down] :: IsoQ (c :: k -> k -> Type) (x :: k) (y :: k) -> c y x
- Squeal.PostgreSQL.Session.Migration: [up] :: IsoQ -> c x y
+ Squeal.PostgreSQL.Session.Migration: [up] :: IsoQ (c :: k -> k -> Type) (x :: k) (y :: k) -> c x y
- Squeal.PostgreSQL.Session.Migration: type MigrationsTable = '["migrations_unique_name" ::: 'Unique '["name"]] :=> '["name" ::: 'NoDef :=> 'NotNull 'PGtext, "executed_at" ::: 'Def :=> 'NotNull 'PGtimestamptz]
+ Squeal.PostgreSQL.Session.Migration: type MigrationsTable = '["migrations_unique_name" ::: 'Unique '["name"]] :=> '["name" ::: 'NoDef :=> 'NotNull 'PGtext, "executed_at" ::: 'Def :=> 'NotNull 'PGtimestamptz]
- Squeal.PostgreSQL.Session.Monad: forPrepared :: (MonadPQ db pq, GenericParams db params x xs, Traversable list, IsRecord y ys, AllZip FromField row ys) => list x -> Manipulation '[] db params row -> pq (list (Result y))
+ Squeal.PostgreSQL.Session.Monad: forPrepared :: (MonadPQ db pq, GenericParams db params x xs, GenericRow row y ys, Traversable list) => list x -> Manipulation '[] db params row -> pq (list (Result y))
- Squeal.PostgreSQL.Session.Monad: runQuery :: (MonadPQ db pq, IsRecord y ys, AllZip FromField row ys) => Query '[] '[] db '[] row -> pq (Result y)
+ Squeal.PostgreSQL.Session.Monad: runQuery :: (MonadPQ db pq, GenericRow row y ys) => Query '[] '[] db '[] row -> pq (Result y)
- Squeal.PostgreSQL.Session.Monad: runQueryParams :: (MonadPQ db pq, GenericParams db params x xs, IsRecord y ys, AllZip FromField row ys) => Query '[] '[] db params row -> x -> pq (Result y)
+ Squeal.PostgreSQL.Session.Monad: runQueryParams :: (MonadPQ db pq, GenericParams db params x xs, GenericRow row y ys) => Query '[] '[] db params row -> x -> pq (Result y)
- Squeal.PostgreSQL.Session.Monad: traversePrepared :: (MonadPQ db pq, GenericParams db params x xs, Traversable list, IsRecord y ys, AllZip FromField row ys) => Manipulation '[] db params row -> list x -> pq (list (Result y))
+ Squeal.PostgreSQL.Session.Monad: traversePrepared :: (MonadPQ db pq, GenericParams db params x xs, GenericRow row y ys, Traversable list) => Manipulation '[] db params row -> list x -> pq (list (Result y))
- Squeal.PostgreSQL.Session.Pool: createConnectionPool :: forall (db :: SchemasType) io. MonadUnliftIO io => ByteString -> Int -> NominalDiffTime -> Int -> io (Pool (K Connection db))
+ Squeal.PostgreSQL.Session.Pool: createConnectionPool :: forall (db :: SchemasType) io. MonadIO io => ByteString -> Int -> NominalDiffTime -> Int -> io (Pool (K Connection db))
- Squeal.PostgreSQL.Session.Pool: destroyConnectionPool :: MonadUnliftIO io => Pool (K Connection db) -> io ()
+ Squeal.PostgreSQL.Session.Pool: destroyConnectionPool :: MonadIO io => Pool (K Connection db) -> io ()
- Squeal.PostgreSQL.Session.Pool: usingConnectionPool :: MonadUnliftIO io => Pool (K Connection db) -> PQ db db io x -> io x
+ Squeal.PostgreSQL.Session.Pool: usingConnectionPool :: (MonadIO io, MonadMask io) => Pool (K Connection db) -> PQ db db io x -> io x
- Squeal.PostgreSQL.Session.Result: cmdStatus :: MonadIO io => Result y -> io Text
+ Squeal.PostgreSQL.Session.Result: cmdStatus :: MonadResult m => Result y -> m Text
- Squeal.PostgreSQL.Session.Result: cmdTuples :: MonadIO io => Result y -> io (Maybe Row)
+ Squeal.PostgreSQL.Session.Result: cmdTuples :: MonadResult m => Result y -> m (Maybe Row)
- Squeal.PostgreSQL.Session.Result: firstRow :: MonadIO io => Result y -> io (Maybe y)
+ Squeal.PostgreSQL.Session.Result: firstRow :: MonadResult m => Result y -> m (Maybe y)
- Squeal.PostgreSQL.Session.Result: getRow :: MonadIO io => Row -> Result y -> io y
+ Squeal.PostgreSQL.Session.Result: getRow :: MonadResult m => Row -> Result y -> m y
- Squeal.PostgreSQL.Session.Result: getRows :: MonadIO io => Result y -> io [y]
+ Squeal.PostgreSQL.Session.Result: getRows :: MonadResult m => Result y -> m [y]
- Squeal.PostgreSQL.Session.Result: nfields :: MonadIO io => Result y -> io Column
+ Squeal.PostgreSQL.Session.Result: nfields :: MonadResult m => Result y -> m Column
- Squeal.PostgreSQL.Session.Result: ntuples :: MonadIO io => Result y -> io Row
+ Squeal.PostgreSQL.Session.Result: ntuples :: MonadResult m => Result y -> m Row
- Squeal.PostgreSQL.Session.Result: okResult :: MonadIO io => Result y -> io ()
+ Squeal.PostgreSQL.Session.Result: okResult :: MonadResult m => Result y -> m ()
- Squeal.PostgreSQL.Session.Result: resultErrorCode :: MonadIO io => Result y -> io (Maybe ByteString)
+ Squeal.PostgreSQL.Session.Result: resultErrorCode :: MonadResult m => Result y -> m (Maybe ByteString)
- Squeal.PostgreSQL.Session.Result: resultErrorMessage :: MonadIO io => Result y -> io (Maybe ByteString)
+ Squeal.PostgreSQL.Session.Result: resultErrorMessage :: MonadResult m => Result y -> m (Maybe ByteString)
- Squeal.PostgreSQL.Session.Result: resultStatus :: MonadIO io => Result y -> io ExecStatus
+ Squeal.PostgreSQL.Session.Result: resultStatus :: MonadResult m => Result y -> m ExecStatus
- Squeal.PostgreSQL.Session.Transaction: ephemerally :: (MonadUnliftIO tx, MonadPQ db tx) => TransactionMode -> tx x -> tx x
+ Squeal.PostgreSQL.Session.Transaction: ephemerally :: (MonadMask tx, MonadResult tx, MonadPQ db tx) => TransactionMode -> Transaction db x -> tx x
- Squeal.PostgreSQL.Session.Transaction: ephemerally_ :: (MonadUnliftIO tx, MonadPQ db tx) => tx x -> tx x
+ Squeal.PostgreSQL.Session.Transaction: ephemerally_ :: (MonadMask tx, MonadResult tx, MonadPQ db tx) => Transaction db x -> tx x
- Squeal.PostgreSQL.Session.Transaction: transactionally :: (MonadUnliftIO tx, MonadPQ db tx) => TransactionMode -> tx x -> tx x
+ Squeal.PostgreSQL.Session.Transaction: transactionally :: (MonadMask tx, MonadResult tx, MonadPQ db tx) => TransactionMode -> Transaction db x -> tx x
- Squeal.PostgreSQL.Session.Transaction: transactionallyRetry :: (MonadUnliftIO tx, MonadPQ db tx) => TransactionMode -> tx x -> tx x
+ Squeal.PostgreSQL.Session.Transaction: transactionallyRetry :: (MonadMask tx, MonadResult tx, MonadPQ db tx) => TransactionMode -> Transaction db x -> tx x
- Squeal.PostgreSQL.Session.Transaction: transactionally_ :: (MonadUnliftIO tx, MonadPQ db tx) => tx x -> tx x
+ Squeal.PostgreSQL.Session.Transaction: transactionally_ :: (MonadMask tx, MonadResult tx, MonadPQ db tx) => Transaction db x -> tx x
- Squeal.PostgreSQL.Type.Alias: Alias :: Alias
+ Squeal.PostgreSQL.Type.Alias: Alias :: Alias (alias :: Symbol)
- Squeal.PostgreSQL.Type.Alias: QualifiedAlias :: QualifiedAlias
+ Squeal.PostgreSQL.Type.Alias: QualifiedAlias :: QualifiedAlias (qualifier :: Symbol) (alias :: Symbol)
- Squeal.PostgreSQL.Type.List: [:*] :: forall k (a :: k -> Type) (b :: [k]) (x :: k) (xs :: [k]). () => a x -> NP a xs -> NP a (x : xs)
+ Squeal.PostgreSQL.Type.List: [:*] :: forall k (a :: k -> Type) (x :: k) (xs :: [k]). a x -> NP a xs -> NP a (x : xs)
- Squeal.PostgreSQL.Type.List: [:>>] :: forall k (p :: k -> k -> Type) (x :: k) (y :: k) (y1 :: k). () => p x y1 -> Path p y1 y -> Path p x y
+ Squeal.PostgreSQL.Type.List: [:>>] :: forall k (p :: k -> k -> Type) (x :: k) (y1 :: k) (y :: k). p x y1 -> Path p y1 y -> Path p x y
- Squeal.PostgreSQL.Type.List: [Done] :: forall k (p :: k -> k -> Type) (x :: k) (y :: k). () => Path p x x
+ Squeal.PostgreSQL.Type.List: [Done] :: forall k (p :: k -> k -> Type) (x :: k). Path p x x
- Squeal.PostgreSQL.Type.List: [Nil] :: forall k (a :: k -> Type) (b :: [k]). () => NP a ([] :: [k])
+ Squeal.PostgreSQL.Type.List: [Nil] :: forall k (a :: k -> Type). NP a ('[] :: [k])
- Squeal.PostgreSQL.Type.List: type family Length (xs :: [k]) :: Nat
+ Squeal.PostgreSQL.Type.List: type family SubsetList (xs :: [k]) (ys :: [k]) :: Bool
- Squeal.PostgreSQL.Type.Schema: PGlabel :: PGlabel
+ Squeal.PostgreSQL.Type.Schema: PGlabel :: PGlabel (label :: Symbol)
- Squeal.PostgreSQL.Type.Schema: type PGFloating = '[ 'PGfloat4, 'PGfloat8, 'PGnumeric]
+ Squeal.PostgreSQL.Type.Schema: type PGFloating = '[ 'PGfloat4, 'PGfloat8, 'PGnumeric]
- Squeal.PostgreSQL.Type.Schema: type PGIntegral = '[ 'PGint2, 'PGint4, 'PGint8]
+ Squeal.PostgreSQL.Type.Schema: type PGIntegral = '[ 'PGint2, 'PGint4, 'PGint8]
- Squeal.PostgreSQL.Type.Schema: type PGJsonKey = '[ 'PGint2, 'PGint4, 'PGtext]
+ Squeal.PostgreSQL.Type.Schema: type PGJsonKey = '[ 'PGint2, 'PGint4, 'PGtext]
- Squeal.PostgreSQL.Type.Schema: type PGJsonType = '[ 'PGjson, 'PGjsonb]
+ Squeal.PostgreSQL.Type.Schema: type PGJsonType = '[ 'PGjson, 'PGjsonb]
- Squeal.PostgreSQL.Type.Schema: type PGNum = '[ 'PGint2, 'PGint4, 'PGint8, 'PGnumeric, 'PGfloat4, 'PGfloat8]
+ Squeal.PostgreSQL.Type.Schema: type PGNum = '[ 'PGint2, 'PGint4, 'PGint8, 'PGnumeric, 'PGfloat4, 'PGfloat8]
Files
- bench/Gauge/DBHelpers.hs +2/−1
- squeal-postgresql.cabal +4/−4
- src/Squeal/PostgreSQL.hs +5/−0
- src/Squeal/PostgreSQL/Definition/Index.hs +2/−2
- src/Squeal/PostgreSQL/Expression.hs +2/−0
- src/Squeal/PostgreSQL/Expression/Aggregate.hs +9/−0
- src/Squeal/PostgreSQL/Expression/Comparison.hs +2/−2
- src/Squeal/PostgreSQL/Expression/Composite.hs +1/−1
- src/Squeal/PostgreSQL/Expression/Inline.hs +6/−0
- src/Squeal/PostgreSQL/Expression/Json.hs +22/−0
- src/Squeal/PostgreSQL/Expression/Null.hs +11/−0
- src/Squeal/PostgreSQL/Expression/Subquery.hs +4/−2
- src/Squeal/PostgreSQL/Expression/Text.hs +23/−0
- src/Squeal/PostgreSQL/Expression/Time.hs +52/−1
- src/Squeal/PostgreSQL/Expression/Window.hs +16/−0
- src/Squeal/PostgreSQL/Query.hs +6/−6
- src/Squeal/PostgreSQL/Query/Table.hs +3/−2
- src/Squeal/PostgreSQL/Query/With.hs +83/−3
- src/Squeal/PostgreSQL/Session.hs +84/−67
- src/Squeal/PostgreSQL/Session/Decode.hs +71/−36
- src/Squeal/PostgreSQL/Session/Encode.hs +62/−37
- src/Squeal/PostgreSQL/Session/Exception.hs +16/−12
- src/Squeal/PostgreSQL/Session/Migration.hs +2/−2
- src/Squeal/PostgreSQL/Session/Monad.hs +7/−12
- src/Squeal/PostgreSQL/Session/Oid.hs +21/−11
- src/Squeal/PostgreSQL/Session/Pool.hs +15/−9
- src/Squeal/PostgreSQL/Session/Result.hs +122/−124
- src/Squeal/PostgreSQL/Session/Statement.hs +1/−23
- src/Squeal/PostgreSQL/Session/Transaction.hs +94/−191
- src/Squeal/PostgreSQL/Session/Transaction/Unsafe.hs +299/−0
- src/Squeal/PostgreSQL/Type.hs +3/−2
- src/Squeal/PostgreSQL/Type/List.hs +47/−0
- src/Squeal/PostgreSQL/Type/PG.hs +8/−0
- src/Squeal/PostgreSQL/Type/Schema.hs +39/−0
- test/Property.hs +2/−2
- test/Spec.hs +6/−5
bench/Gauge/DBHelpers.hs view
@@ -22,6 +22,7 @@ import GHC.Generics ( Generic ) import Test.QuickCheck import Squeal.PostgreSQL+import qualified Squeal.PostgreSQL.Session.Transaction.Unsafe as Unsafe import Control.DeepSeq -- Project imports import Gauge.Schema ( Schemas )@@ -36,7 +37,7 @@ runDbErr :: SquealPool -> PQ Schemas Schemas IO b -> IO (Either SquealException b) runDbErr pool session = do- liftIO . runUsingConnPool pool $ trySqueal (transactionally_ session)+ liftIO . runUsingConnPool pool $ trySqueal (Unsafe.transactionally_ session) runDbWithPool :: SquealPool -> PQ Schemas Schemas IO b -> IO b runDbWithPool pool session = do
squeal-postgresql.cabal view
@@ -1,5 +1,5 @@ name: squeal-postgresql-version: 0.7.0.1+version: 0.8.0.0 synopsis: Squeal PostgreSQL Library description: Squeal is a type-safe embedding of PostgreSQL in Haskell homepage: https://github.com/morphismtech/squeal@@ -8,7 +8,7 @@ license-file: LICENSE author: Eitan Chatav maintainer: eitan.chatav@gmail.com-copyright: Copyright (c) 2017 Morphism, LLC+copyright: Copyright (c) 2021 Morphism, LLC category: Database build-type: Simple cabal-version: >=1.18@@ -79,6 +79,7 @@ Squeal.PostgreSQL.Session.Result Squeal.PostgreSQL.Session.Statement Squeal.PostgreSQL.Session.Transaction+ Squeal.PostgreSQL.Session.Transaction.Unsafe Squeal.PostgreSQL.Type Squeal.PostgreSQL.Type.Alias Squeal.PostgreSQL.Type.List@@ -112,7 +113,6 @@ , transformers >= 0.5.6.2 , transformers-base >= 0.4.5.2 , unliftio >= 0.2.12.1- , unliftio-pool >= 0.2.1.1 , uuid-types >= 1.0.3 , vector >= 0.12.1.2 @@ -131,7 +131,7 @@ default-language: Haskell2010 type: exitcode-stdio-1.0 hs-source-dirs: test- ghc-options: -Wall+ ghc-options: -Wall main-is: Property.hs build-depends: base >= 4.12.0.0 && < 5.0
src/Squeal/PostgreSQL.hs view
@@ -190,6 +190,11 @@ & pqThen (define teardown) :} [User {userName = "Alice", userEmail = Just "alice@gmail.com"},User {userName = "Bob", userEmail = Nothing},User {userName = "Carole", userEmail = Just "carole@hotmail.com"}]++This should get you up and running with Squeal. Once you're writing more complicated+queries and need a deeper understanding of Squeal's types and how everything+fits together, check out the <https://github.com/morphismtech/squeal/blob/dev/squeal-core-concepts-handbook.md Core Concepts Handbook>+in the toplevel of Squeal's Git repo. -} module Squeal.PostgreSQL ( module X
src/Squeal/PostgreSQL/Definition/Index.hs view
@@ -173,14 +173,14 @@ -- DROP INDEX "ix"; dropIndex :: (Has sch db schema, KnownSymbol ix)- => QualifiedAlias sch ix -- index alias+ => QualifiedAlias sch ix -- ^ index alias -> Definition db (Alter sch (DropSchemum ix 'Index schema) db) dropIndex ix = UnsafeDefinition $ "DROP INDEX" <+> renderSQL ix <> ";" -- | Drop an index if it exists. dropIndexIfExists :: (Has sch db schema, KnownSymbol ix)- => QualifiedAlias sch ix -- index alias+ => QualifiedAlias sch ix -- ^ index alias -> Definition db (Alter sch (DropSchemumIfExists ix 'Index schema) db) dropIndexIfExists ix = UnsafeDefinition $ "DROP INDEX IF EXISTS" <+> renderSQL ix <> ";"
src/Squeal/PostgreSQL/Expression.hs view
@@ -585,6 +585,8 @@ (@>) = unsafeBinaryOp "@>" (<@) :: Operator (null0 ty) (null1 ty) ('Null 'PGbool) (<@) = unsafeBinaryOp "<@"+infix 4 @>+infix 4 <@ instance PGSubset 'PGjsonb instance PGSubset 'PGtsquery instance PGSubset ('PGvararray ty)
src/Squeal/PostgreSQL/Expression/Aggregate.hs view
@@ -19,7 +19,9 @@ , OverloadedStrings , PatternSynonyms , PolyKinds+ , ScopedTypeVariables , StandaloneDeriving+ , TypeApplications , TypeFamilies , TypeOperators , UndecidableInstances@@ -428,6 +430,13 @@ , aggregateFilter :: [Condition 'Ungrouped lat with db params from] -- ^ `filterWhere` }++instance (HasUnique tab (Join from lat) row, Has col row ty)+ => IsLabel col (AggregateArg '[ty] lat with db params from) where+ fromLabel = All (fromLabel @col)+instance (Has tab (Join from lat) row, Has col row ty)+ => IsQualified tab col (AggregateArg '[ty] lat with db params from) where+ tab ! col = All (tab ! col) instance SOP.SListI xs => RenderSQL (AggregateArg xs lat with db params from) where renderSQL = \case
src/Squeal/PostgreSQL/Expression/Comparison.hs view
@@ -150,7 +150,7 @@ >>> printSQL $ true `isDistinctFrom` null_ (TRUE IS DISTINCT FROM NULL) -}-isDistinctFrom :: Operator (null0 ty) (null1 ty) ('Null 'PGbool)+isDistinctFrom :: Operator (null0 ty) (null1 ty) (null 'PGbool) isDistinctFrom = unsafeBinaryOp "IS DISTINCT FROM" {- | equal, treating null like an ordinary value@@ -158,7 +158,7 @@ >>> printSQL $ true `isNotDistinctFrom` null_ (TRUE IS NOT DISTINCT FROM NULL) -}-isNotDistinctFrom :: Operator (null0 ty) (null1 ty) ('NotNull 'PGbool)+isNotDistinctFrom :: Operator (null0 ty) (null1 ty) (null 'PGbool) isNotDistinctFrom = unsafeBinaryOp "IS NOT DISTINCT FROM" {- | is true
src/Squeal/PostgreSQL/Expression/Composite.hs view
@@ -65,7 +65,7 @@ -- | A row constructor on all columns in a table expression. rowStar :: Has tab from row- => Alias tab+ => Alias tab -- ^ intermediate table -> Expression grp lat with db params from (null ('PGcomposite row)) rowStar tab = UnsafeExpression $ "ROW" <> parenthesized (renderSQL tab <> ".*")
src/Squeal/PostgreSQL/Expression/Inline.hs view
@@ -39,6 +39,9 @@ import Data.ByteString.Lazy (toStrict) import Data.ByteString.Builder (doubleDec, floatDec, int16Dec, int32Dec, int64Dec) import Data.ByteString.Builder.Scientific (scientificBuilder)+import Data.Coerce (coerce)+import Data.Functor.Const (Const(Const))+import Data.Functor.Constant (Constant(Constant)) import Data.Int (Int16, Int32, Int64) import Data.Kind (Type) import Data.Scientific (Scientific)@@ -168,6 +171,9 @@ . UnsafeExpression . escapeQuotedText . getFixChar+instance Inline x => Inline (Const x tag) where inline = inline @x . coerce+instance Inline x => Inline (SOP.K x tag) where inline = inline @x . coerce+instance Inline x => Inline (Constant x tag) where inline = inline @x . coerce instance Inline DiffTime where inline dt = let
src/Squeal/PostgreSQL/Expression/Json.hs view
@@ -61,7 +61,9 @@ , jsonEach , jsonbEach , jsonEachText+ , jsonArrayElementsText , jsonbEachText+ , jsonbArrayElementsText , jsonObjectKeys , jsonbObjectKeys , JsonPopulateFunction@@ -361,6 +363,16 @@ ("json_each_text" ::: '["key" ::: 'NotNull 'PGtext, "value" ::: 'NotNull 'PGtext]) jsonEachText = unsafeSetFunction "json_each_text" +{- | Returns a set of text values from a JSON array++>>> printSQL (select Star (from (jsonArrayElementsText (inline (Json (toJSON ["monkey", "pony", "bear"] ))))))+SELECT * FROM json_array_elements_text(('["monkey","pony","bear"]' :: json))+-}+jsonArrayElementsText+ :: null 'PGjson -|->+ ("json_array_elements_text" ::: '["value" ::: 'NotNull 'PGtext])+jsonArrayElementsText = unsafeSetFunction "json_array_elements_text"+ {- | Expands the outermost binary JSON object into a set of key/value pairs. >>> printSQL (select Star (from (jsonbEachText (inline (Jsonb (object ["a" .= "foo", "b" .= "bar"]))))))@@ -390,6 +402,16 @@ :: null 'PGjsonb -|-> ("jsonb_object_keys" ::: '["jsonb_object_keys" ::: 'NotNull 'PGtext]) jsonbObjectKeys = unsafeSetFunction "jsonb_object_keys"++{- | Returns a set of text values from a binary JSON array++>>> printSQL (select Star (from (jsonbArrayElementsText (inline (Jsonb (toJSON ["red", "green", "cyan"] ))))))+SELECT * FROM jsonb_array_elements_text(('["red","green","cyan"]' :: jsonb))+-}+jsonbArrayElementsText+ :: null 'PGjsonb -|->+ ("jsonb_array_elements_text" ::: '["value" ::: 'NotNull 'PGtext])+jsonbArrayElementsText = unsafeSetFunction "jsonb_array_elements_text" -- | Build rows from Json types. type JsonPopulateFunction fun json
src/Squeal/PostgreSQL/Expression/Null.hs view
@@ -10,8 +10,10 @@ {-# LANGUAGE DataKinds+ , KindSignatures , OverloadedStrings , RankNTypes+ , TypeFamilies , TypeOperators #-} @@ -27,6 +29,7 @@ , isNotNull , matchNull , nullIf+ , CombineNullity ) where import Squeal.PostgreSQL.Expression@@ -121,3 +124,11 @@ -} nullIf :: '[ 'NotNull ty, 'NotNull ty] ---> 'Null ty nullIf = unsafeFunctionN "NULLIF"++{-| Make the return type of the type family `NotNull` if both arguments are,+ or `Null` otherwise.+-}+type family CombineNullity+ (lhs :: PGType -> NullType) (rhs :: PGType -> NullType) :: PGType -> NullType where+ CombineNullity 'NotNull 'NotNull = 'NotNull+ CombineNullity _ _ = 'Null
src/Squeal/PostgreSQL/Expression/Subquery.hs view
@@ -103,7 +103,8 @@ in_ :: Expression grp lat with db params from ty -- ^ expression -> [Expression grp lat with db params from ty]- -> Expression grp lat with db params from (null 'PGbool)+ -> Expression grp lat with db params from ('Null 'PGbool)+_ `in_` [] = false expr `in_` exprs = UnsafeExpression $ renderSQL expr <+> "IN" <+> parenthesized (commaSeparated (renderSQL <$> exprs)) @@ -117,6 +118,7 @@ notIn :: Expression grp lat with db params from ty -- ^ expression -> [Expression grp lat with db params from ty]- -> Expression grp lat with db params from (null 'PGbool)+ -> Expression grp lat with db params from ('Null 'PGbool)+_ `notIn` [] = true expr `notIn` exprs = UnsafeExpression $ renderSQL expr <+> "NOT IN" <+> parenthesized (commaSeparated (renderSQL <$> exprs))
src/Squeal/PostgreSQL/Expression/Text.hs view
@@ -11,6 +11,8 @@ {-# LANGUAGE DataKinds , OverloadedStrings+ , RankNTypes+ , ScopedTypeVariables , TypeOperators #-} @@ -21,6 +23,8 @@ , charLength , like , ilike+ , replace+ , strpos ) where import Squeal.PostgreSQL.Expression@@ -63,3 +67,22 @@ -- ((E'abc' :: text) ILIKE (E'a%' :: text)) ilike :: Operator (null 'PGtext) (null 'PGtext) ('Null 'PGbool) ilike = unsafeBinaryOp "ILIKE"++-- | Determines the location of the substring match using the `strpos`+-- function. Returns the 1-based index of the first match, if no+-- match exists the function returns (0).+--+-- >>> printSQL $ strpos ("string" *: "substring")+-- strpos((E'string' :: text), (E'substring' :: text))+strpos+ :: '[null 'PGtext, null 'PGtext] ---> null 'PGint4+strpos = unsafeFunctionN "strpos"++-- | Over the string in the first argument, replace all occurrences of+-- the second argument with the third and return the modified string.+--+-- >>> printSQL $ replace ("string" :* "from" *: "to")+-- replace((E'string' :: text), (E'from' :: text), (E'to' :: text))+replace+ :: '[ null 'PGtext, null 'PGtext, null 'PGtext ] ---> null 'PGtext+replace = unsafeFunctionN "replace"
src/Squeal/PostgreSQL/Expression/Time.hs view
@@ -17,7 +17,9 @@ , OverloadedStrings , PolyKinds , RankNTypes+ , TypeFamilies , TypeOperators+ , UndecidableInstances #-} module Squeal.PostgreSQL.Expression.Time@@ -27,6 +29,7 @@ , currentDate , currentTime , currentTimestamp+ , dateTrunc , localTime , localTimestamp , now@@ -34,6 +37,8 @@ , makeTime , makeTimestamp , makeTimestamptz+ , atTimeZone+ , PGAtTimeZone -- * Interval , interval_ , TimeUnit (..)@@ -41,12 +46,14 @@ import Data.Fixed import Data.String+import GHC.TypeLits import qualified GHC.Generics as GHC import qualified Generics.SOP as SOP import Squeal.PostgreSQL.Expression import Squeal.PostgreSQL.Render+import Squeal.PostgreSQL.Type.List import Squeal.PostgreSQL.Type.Schema -- $setup@@ -127,6 +134,49 @@ makeTimestamptz = unsafeFunctionN "make_timestamptz" {-|+Truncate a timestamp with the specified precision++>>> printSQL $ dateTrunc Quarter (makeTimestamp (2010 :* 5 :* 6 :* 14 :* 45 *: 11.4))+date_trunc('quarter', make_timestamp((2010 :: int4), (5 :: int4), (6 :: int4), (14 :: int4), (45 :: int4), (11.4 :: float8)))+-}+dateTrunc+ :: time `In` '[ 'PGtimestamp, 'PGtimestamptz ]+ => TimeUnit -> null time --> null time+dateTrunc tUnit args = unsafeFunctionN "date_trunc" (timeUnitExpr *: args)+ where+ timeUnitExpr :: forall grp lat with db params from null0.+ Expression grp lat with db params from (null0 'PGtext)+ timeUnitExpr = UnsafeExpression . singleQuotedUtf8 . renderSQL $ tUnit++-- | Calculate the return time type of the `atTimeZone` `Operator`.+type family PGAtTimeZone ty where+ PGAtTimeZone 'PGtimestamptz = 'PGtimestamp+ PGAtTimeZone 'PGtimestamp = 'PGtimestamptz+ PGAtTimeZone 'PGtimetz = 'PGtimetz+ PGAtTimeZone pg = TypeError+ ( 'Text "Squeal type error: AT TIME ZONE cannot be applied to "+ ':<>: 'ShowType pg )++{-|+Convert a timestamp, timestamp with time zone, or time of day with timezone to a different timezone using an interval offset or specific timezone denoted by text. When using the interval offset, the interval duration must be less than one day or 24 hours.++>>> printSQL $ (makeTimestamp (2009 :* 7 :* 22 :* 19 :* 45 *: 11.4)) `atTimeZone` (interval_ 8 Hours)+(make_timestamp((2009 :: int4), (7 :: int4), (22 :: int4), (19 :: int4), (45 :: int4), (11.4 :: float8)) AT TIME ZONE (INTERVAL '8.000 hours'))++>>> :{+ let+ timezone :: Expr (null 'PGtext)+ timezone = "EST"+ in printSQL $ (makeTimestamptz (2015 :* 9 :* 15 :* 4 :* 45 *: 11.4)) `atTimeZone` timezone+:}+(make_timestamptz((2015 :: int4), (9 :: int4), (15 :: int4), (4 :: int4), (45 :: int4), (11.4 :: float8)) AT TIME ZONE (E'EST' :: text))+-}+atTimeZone+ :: zone `In` '[ 'PGtext, 'PGinterval]+ => Operator (null time) (null zone) (null (PGAtTimeZone time))+atTimeZone = unsafeBinaryOp "AT TIME ZONE"++{-| Affine space operations on time types. -} class TimeOp time diff | time -> diff where@@ -167,7 +217,7 @@ -- | A `TimeUnit` to use in `interval_` construction. data TimeUnit- = Years | Months | Weeks | Days+ = Years | Quarter | Months | Weeks | Days | Hours | Minutes | Seconds | Microseconds | Milliseconds | Decades | Centuries | Millennia@@ -177,6 +227,7 @@ instance RenderSQL TimeUnit where renderSQL = \case Years -> "years"+ Quarter -> "quarter" Months -> "months" Weeks -> "weeks" Days -> "days"
src/Squeal/PostgreSQL/Expression/Window.hs view
@@ -22,7 +22,10 @@ , OverloadedStrings , PatternSynonyms , RankNTypes+ , ScopedTypeVariables+ , TypeApplications , TypeOperators+ , UndecidableInstances #-} module Squeal.PostgreSQL.Expression.Window@@ -177,6 +180,19 @@ , windowFilter :: [Condition grp lat with db params from] -- ^ `filterWhere` } deriving stock (GHC.Generic)++instance (HasUnique tab (Join from lat) row, Has col row ty)+ => IsLabel col (WindowArg 'Ungrouped '[ty] lat with db params from) where+ fromLabel = Window (fromLabel @col)+instance (Has tab (Join from lat) row, Has col row ty)+ => IsQualified tab col (WindowArg 'Ungrouped '[ty] lat with db params from) where+ tab ! col = Window (tab ! col)+instance (HasUnique tab (Join from lat) row, Has col row ty, GroupedBy tab col bys)+ => IsLabel col (WindowArg ('Grouped bys) '[ty] lat with db params from) where+ fromLabel = Window (fromLabel @col)+instance (Has tab (Join from lat) row, Has col row ty, GroupedBy tab col bys)+ => IsQualified tab col (WindowArg ('Grouped bys) '[ty] lat with db params from) where+ tab ! col = Window (tab ! col) instance SOP.SListI args => RenderSQL (WindowArg grp args lat with db params from) where
src/Squeal/PostgreSQL/Query.hs view
@@ -353,7 +353,7 @@ -- | The results of two queries can be combined using the set operation -- `union`. Duplicate rows are eliminated. union- :: Query lat with db params columns+ :: Query lat with db params columns -- ^ -> Query lat with db params columns -> Query lat with db params columns q1 `union` q2 = UnsafeQuery $@@ -364,7 +364,7 @@ -- | The results of two queries can be combined using the set operation -- `unionAll`, the disjoint union. Duplicate rows are retained. unionAll- :: Query lat with db params columns+ :: Query lat with db params columns -- ^ -> Query lat with db params columns -> Query lat with db params columns q1 `unionAll` q2 = UnsafeQuery $@@ -375,7 +375,7 @@ -- | The results of two queries can be combined using the set operation -- `intersect`, the intersection. Duplicate rows are eliminated. intersect- :: Query lat with db params columns+ :: Query lat with db params columns -- ^ -> Query lat with db params columns -> Query lat with db params columns q1 `intersect` q2 = UnsafeQuery $@@ -386,7 +386,7 @@ -- | The results of two queries can be combined using the set operation -- `intersectAll`, the intersection. Duplicate rows are retained. intersectAll- :: Query lat with db params columns+ :: Query lat with db params columns -- ^ -> Query lat with db params columns -> Query lat with db params columns q1 `intersectAll` q2 = UnsafeQuery $@@ -397,7 +397,7 @@ -- | The results of two queries can be combined using the set operation -- `except`, the set difference. Duplicate rows are eliminated. except- :: Query lat with db params columns+ :: Query lat with db params columns -- ^ -> Query lat with db params columns -> Query lat with db params columns q1 `except` q2 = UnsafeQuery $@@ -408,7 +408,7 @@ -- | The results of two queries can be combined using the set operation -- `exceptAll`, the set difference. Duplicate rows are retained. exceptAll- :: Query lat with db params columns+ :: Query lat with db params columns -- ^ -> Query lat with db params columns -> Query lat with db params columns q1 `exceptAll` q2 = UnsafeQuery $
src/Squeal/PostgreSQL/Query/Table.hs view
@@ -230,11 +230,12 @@ Similarly, a table is processed as `NoWait` if that is specified in any of the clauses affecting it. Otherwise, it is processed as `SkipLocked` if that is specified in any of the clauses affecting it.+Further, a `LockingClause` cannot be added to a grouped table expression. -} lockRows :: LockingClause from -- ^ row-level lock- -> TableExpression grp lat with db params from- -> TableExpression grp lat with db params from+ -> TableExpression 'Ungrouped lat with db params from+ -> TableExpression 'Ungrouped lat with db params from lockRows lck tab = tab {lockingClauses = lck : lockingClauses tab} {-----------------------------------------
src/Squeal/PostgreSQL/Query/With.hs view
@@ -36,11 +36,17 @@ With (..) , CommonTableExpression (..) , withRecursive+ , Materialization (..)+ , materialized+ , notMaterialized ) where import Data.Quiver.Functor import GHC.TypeLits +import qualified GHC.Generics as GHC+import qualified Generics.SOP as SOP+ import Squeal.PostgreSQL.Type.Alias import Squeal.PostgreSQL.Query import Squeal.PostgreSQL.Type.List@@ -134,6 +140,23 @@ <+> "AS" <+> parenthesized (renderSQL recursive) <+> renderSQL query +-- | Whether the contents of the WITH clause are materialized.+-- If a WITH query is non-recursive and side-effect-free (that is, it is a SELECT containing no volatile functions) then it can be folded into the parent query, allowing joint optimization of the two query levels.+--+-- Note: Use of `Materialized` or `NotMaterialized` requires PostgreSQL version 12 or higher. For earlier versions, use `DefaultMaterialization` which in those earlier versions of PostgreSQL behaves as `Materialized`. PostgreSQL 12 both changes the default behavior as well as adds options for customizing the materialization behavior.+data Materialization =+ DefaultMaterialization -- ^ By default, folding happens if the parent query references the WITH query just once, but not if it references the WITH query more than once. Note: this is the behavior in PostgreSQL 12+. In PostgreSQL 11 and earlier, all CTEs are materialized.+ | Materialized -- ^ You can override that decision by specifying MATERIALIZED to force separate calculation of the WITH query. Requires PostgreSQL 12+.+ | NotMaterialized -- ^ or by specifying NOT MATERIALIZED to force it to be merged into the parent query. Requires PostgreSQL 12+.+ deriving (Eq, Ord, Show, Read, Enum, GHC.Generic)+instance SOP.Generic Materialization+instance SOP.HasDatatypeInfo Materialization+instance RenderSQL Materialization where+ renderSQL = \case+ DefaultMaterialization -> ""+ Materialized -> "MATERIALIZED"+ NotMaterialized -> "NOT MATERIALIZED"+ -- | A `CommonTableExpression` is an auxiliary statement in a `with` clause. data CommonTableExpression statement (db :: SchemasType)@@ -143,6 +166,8 @@ CommonTableExpression :: Aliased (statement with db params) (cte ::: common) -- ^ aliased statement+ -> Materialization+ -- ^ materialization of the CTE output -> CommonTableExpression statement db params with (cte ::: common ': with) instance ( KnownSymbol cte@@ -150,7 +175,7 @@ ) => Aliasable cte (statement with db params common) (CommonTableExpression statement db params with with1) where- statement `as` cte = CommonTableExpression (statement `as` cte)+ statement `as` cte = CommonTableExpression (statement `as` cte) DefaultMaterialization instance ( KnownSymbol cte , with1 ~ (cte ::: common ': with)@@ -161,5 +186,60 @@ instance (forall c s p r. RenderSQL (statement c s p r)) => RenderSQL (CommonTableExpression statement db params with0 with1) where- renderSQL (CommonTableExpression (statement `As` cte)) =- renderSQL cte <+> "AS" <+> parenthesized (renderSQL statement)+ renderSQL (CommonTableExpression (statement `As` cte) materialization) =+ renderSQL cte+ <+> "AS"+ <+> renderSQL materialization+ <> case materialization of+ DefaultMaterialization -> ""+ _ -> " "+ <> parenthesized (renderSQL statement)++{- | Force separate calculation of the WITH query.++>>> type Columns = '["col1" ::: 'NoDef :=> 'NotNull 'PGint4, "col2" ::: 'NoDef :=> 'NotNull 'PGint4]+>>> type Schema = '["tab" ::: 'Table ('[] :=> Columns)]+>>> :{+let+ qry :: Query lat with (Public Schema) params '["col1" ::: 'NotNull 'PGint4, "col2" ::: 'NotNull 'PGint4]+ qry = with (+ materialized (select Star (from (table #tab)) `as` #cte1) :>>+ select Star (from (common #cte1)) `as` #cte2+ ) (select Star (from (common #cte2)))+in printSQL qry+:}+WITH "cte1" AS MATERIALIZED (SELECT * FROM "tab" AS "tab"), "cte2" AS (SELECT * FROM "cte1" AS "cte1") SELECT * FROM "cte2" AS "cte2"++Note: if the last CTE has `materialized` or `notMaterialized` you must add `:>> Done`.++Requires PostgreSQL 12 or higher.+-}+materialized+ :: Aliased (statement with db params) (cte ::: common) -- ^ CTE+ -> CommonTableExpression statement db params with (cte ::: common ': with)+materialized stmt = CommonTableExpression stmt Materialized++{- | Force the WITH query to be merged into the parent query.++>>> type Columns = '["col1" ::: 'NoDef :=> 'NotNull 'PGint4, "col2" ::: 'NoDef :=> 'NotNull 'PGint4]+>>> type Schema = '["tab" ::: 'Table ('[] :=> Columns)]+>>> :{+let+ qry :: Query lat with (Public Schema) params '["col1" ::: 'NotNull 'PGint4, "col2" ::: 'NotNull 'PGint4]+ qry = with (+ select Star (from (table #tab)) `as` #cte1 :>>+ notMaterialized (select Star (from (common #cte1)) `as` #cte2) :>>+ Done+ ) (select Star (from (common #cte2)))+in printSQL qry+:}+WITH "cte1" AS (SELECT * FROM "tab" AS "tab"), "cte2" AS NOT MATERIALIZED (SELECT * FROM "cte1" AS "cte1") SELECT * FROM "cte2" AS "cte2"++Note: if the last CTE has `materialized` or `notMaterialized` you must add `:>> Done` to finish the `Path`.++Requires PostgreSQL 12 or higher.+-}+notMaterialized+ :: Aliased (statement with db params) (cte ::: common) -- ^ CTE+ -> CommonTableExpression statement db params with (cte ::: common ': with)+notMaterialized stmt = CommonTableExpression stmt NotMaterialized
src/Squeal/PostgreSQL/Session.hs view
@@ -39,12 +39,12 @@ import Control.Category import Control.Monad.Base (MonadBase(..))-import Control.Monad.Catch (MonadCatch(..), MonadThrow(..), MonadMask(..))+import Control.Monad.Catch import Control.Monad.Except import Control.Monad.Morph import Control.Monad.Reader import Control.Monad.Trans.Control (MonadBaseControl(..), MonadTransControl(..))-import UnliftIO (MonadUnliftIO (..), bracket, throwIO)+import UnliftIO (MonadUnliftIO(..)) import Data.ByteString (ByteString) import Data.Foldable import Data.Functor ((<&>))@@ -123,32 +123,32 @@ instance IndexedMonadTransPQ PQ where - define (UnsafeDefinition q) = PQ $ \ (K conn) -> do- resultMaybe <- liftIO $ LibPQ.exec conn q+ define (UnsafeDefinition q) = PQ $ \ (K conn) -> liftIO $ do+ resultMaybe <- LibPQ.exec conn q case resultMaybe of- Nothing -> throwIO $ ConnectionException "LibPQ.exec"+ Nothing -> throwM $ ConnectionException "LibPQ.exec" Just result -> K <$> okResult_ result instance (MonadIO io, db0 ~ db, db1 ~ db) => MonadPQ db (PQ db0 db1 io) where executeParams (Manipulation encode decode (UnsafeManipulation q)) x =- PQ $ \ kconn@(K conn) -> do+ PQ $ \ kconn@(K conn) -> liftIO $ do let formatParam :: forall param. OidOfNull db param => K (Maybe Encoding.Encoding) param- -> io (K (Maybe (LibPQ.Oid, ByteString, LibPQ.Format)) param)+ -> IO (K (Maybe (LibPQ.Oid, ByteString, LibPQ.Format)) param) formatParam (K maybeEncoding) = do- oid <- liftIO $ runReaderT (oidOfNull @db @param) kconn+ oid <- runReaderT (oidOfNull @db @param) kconn return . K $ maybeEncoding <&> \encoding -> (oid, encodingBytes encoding, LibPQ.Binary)- encodedParams <- liftIO $ runReaderT (runEncodeParams encode x) kconn+ encodedParams <- runReaderT (runEncodeParams encode x) kconn formattedParams <- hcollapse <$> hctraverse' (Proxy @(OidOfNull db)) formatParam encodedParams- resultMaybe <- liftIO $+ resultMaybe <- LibPQ.execParams conn (q <> ";") formattedParams LibPQ.Binary case resultMaybe of- Nothing -> throwIO $ ConnectionException "LibPQ.execParams"+ Nothing -> throwM $ ConnectionException "LibPQ.execParams" Just result -> do okResult_ result return $ K (Result decode result)@@ -158,70 +158,88 @@ executePrepared (Manipulation encode decode (UnsafeManipulation q :: Manipulation '[] db params row)) list = PQ $ \ kconn@(K conn) -> liftIO $ do let+ temp = "temporary_statement"+ oidOfParam :: forall p. OidOfNull db p => (IO :.: K LibPQ.Oid) p oidOfParam = Comp $ K <$> runReaderT (oidOfNull @db @p) kconn oidsOfParams :: NP (IO :.: K LibPQ.Oid) params oidsOfParams = hcpure (Proxy @(OidOfNull db)) oidOfParam- oids <- hcollapse <$> hsequence' oidsOfParams- prepResultMaybe <- LibPQ.prepare conn temp (q <> ";") (Just oids)- case prepResultMaybe of- Nothing -> throwIO $ ConnectionException "LibPQ.prepare"- Just prepResult -> okResult_ prepResult- results <- for list $ \ params -> do- encodedParams <- runReaderT (runEncodeParams encode params) kconn- let- formatParam encoding = (encodingBytes encoding, LibPQ.Binary)- formattedParams =- [ formatParam <$> maybeParam- | maybeParam <- hcollapse encodedParams- ]- resultMaybe <-- LibPQ.execPrepared conn temp formattedParams LibPQ.Binary- case resultMaybe of- Nothing -> throwIO $ ConnectionException "LibPQ.execPrepared"- Just result -> do- okResult_ result- return $ Result decode result- deallocResultMaybe <- LibPQ.exec conn ("DEALLOCATE " <> temp <> ";")- case deallocResultMaybe of- Nothing -> throwIO $ ConnectionException "LibPQ.exec"- Just deallocResult -> okResult_ deallocResult- return (K results)++ prepare = do+ oids <- hcollapse <$> hsequence' oidsOfParams+ prepResultMaybe <- LibPQ.prepare conn temp (q <> ";") (Just oids)+ case prepResultMaybe of+ Nothing -> throwM $ ConnectionException "LibPQ.prepare"+ Just prepResult -> okResult_ prepResult++ deallocate = do+ deallocResultMaybe <- LibPQ.exec conn ("DEALLOCATE " <> temp <> ";")+ case deallocResultMaybe of+ Nothing -> throwM $ ConnectionException "LibPQ.exec"+ Just deallocResult -> okResult_ deallocResult++ execPrepared = for list $ \ params -> do+ encodedParams <- runReaderT (runEncodeParams encode params) kconn+ let+ formatParam encoding = (encodingBytes encoding, LibPQ.Binary)+ formattedParams =+ [ formatParam <$> maybeParam+ | maybeParam <- hcollapse encodedParams+ ]+ resultMaybe <-+ LibPQ.execPrepared conn temp formattedParams LibPQ.Binary+ case resultMaybe of+ Nothing -> throwM $ ConnectionException "LibPQ.execPrepared"+ Just result -> do+ okResult_ result+ return $ Result decode result++ liftIO (K <$> bracket_ prepare deallocate execPrepared)+ executePrepared (Query encode decode q) list = executePrepared (Manipulation encode decode (queryStatement q)) list executePrepared_ (Manipulation encode _ (UnsafeManipulation q :: Manipulation '[] db params row)) list =- PQ $ \ kconn@(K conn) -> liftIO $ do+ PQ $ \ kconn@(K conn) -> do let+ temp = "temporary_statement"+ oidOfParam :: forall p. OidOfNull db p => (IO :.: K LibPQ.Oid) p oidOfParam = Comp $ K <$> runReaderT (oidOfNull @db @p) kconn oidsOfParams :: NP (IO :.: K LibPQ.Oid) params oidsOfParams = hcpure (Proxy @(OidOfNull db)) oidOfParam- oids <- hcollapse <$> hsequence' oidsOfParams- prepResultMaybe <- LibPQ.prepare conn temp (q <> ";") (Just oids)- case prepResultMaybe of- Nothing -> throwIO $ ConnectionException "LibPQ.prepare"- Just prepResult -> okResult_ prepResult- for_ list $ \ params -> do- encodedParams <- runReaderT (runEncodeParams encode params) kconn- let- formatParam encoding = (encodingBytes encoding, LibPQ.Binary)- formattedParams =- [ formatParam <$> maybeParam- | maybeParam <- hcollapse encodedParams- ]- resultMaybe <-- LibPQ.execPrepared conn temp formattedParams LibPQ.Binary- case resultMaybe of- Nothing -> throwIO $ ConnectionException "LibPQ.execPrepared"- Just result -> okResult_ result- deallocResultMaybe <- LibPQ.exec conn ("DEALLOCATE " <> temp <> ";")- case deallocResultMaybe of- Nothing -> throwIO $ ConnectionException "LibPQ.exec"- Just deallocResult -> okResult_ deallocResult- return (K ())++ prepare = do+ oids <- hcollapse <$> hsequence' oidsOfParams+ prepResultMaybe <- LibPQ.prepare conn temp (q <> ";") (Just oids)+ case prepResultMaybe of+ Nothing -> throwM $ ConnectionException "LibPQ.prepare"+ Just prepResult -> okResult_ prepResult++ deallocate = do+ deallocResultMaybe <- LibPQ.exec conn ("DEALLOCATE " <> temp <> ";")+ case deallocResultMaybe of+ Nothing -> throwM $ ConnectionException "LibPQ.exec"+ Just deallocResult -> okResult_ deallocResult++ execPrepared_ = for_ list $ \ params -> do+ encodedParams <- runReaderT (runEncodeParams encode params) kconn+ let+ formatParam encoding = (encodingBytes encoding, LibPQ.Binary)+ formattedParams =+ [ formatParam <$> maybeParam+ | maybeParam <- hcollapse encodedParams+ ]+ resultMaybe <-+ LibPQ.execPrepared conn temp formattedParams LibPQ.Binary+ case resultMaybe of+ Nothing -> throwM $ ConnectionException "LibPQ.execPrepared"+ Just result -> okResult_ result++ liftIO (K <$> bracket_ prepare deallocate execPrepared_)+ executePrepared_ (Query encode decode q) list = executePrepared_ (Manipulation encode decode (queryStatement q)) list @@ -320,13 +338,12 @@ -- | Do `connectdb` and `finish` before and after a computation. withConnection :: forall db0 db1 io x- . MonadUnliftIO io+ . (MonadIO io, MonadMask io) => ByteString -> PQ db0 db1 io x -> io x-withConnection connString action = do- K x <- bracket (connectdb connString) finish (unPQ action)- return x+withConnection connString action =+ unK <$> bracket (connectdb connString) finish (unPQ action) okResult_ :: MonadIO io => LibPQ.Result -> io () okResult_ result = liftIO $ do@@ -337,9 +354,9 @@ _ -> do stateCodeMaybe <- LibPQ.resultErrorField result LibPQ.DiagSqlstate case stateCodeMaybe of- Nothing -> throwIO $ ConnectionException "LibPQ.resultErrorField"+ Nothing -> throwM $ ConnectionException "LibPQ.resultErrorField" Just stateCode -> do msgMaybe <- LibPQ.resultErrorMessage result case msgMaybe of- Nothing -> throwIO $ ConnectionException "LibPQ.resultErrorMessage"- Just msg -> throwIO . SQLException $ SQLState status stateCode msg+ Nothing -> throwM $ ConnectionException "LibPQ.resultErrorMessage"+ Just msg -> throwM . SQLException $ SQLState status stateCode msg
src/Squeal/PostgreSQL/Session/Decode.hs view
@@ -10,6 +10,7 @@ {-# LANGUAGE AllowAmbiguousTypes+ , CPP , DataKinds , DerivingStrategies , FlexibleContexts@@ -25,6 +26,7 @@ , TypeFamilies , TypeOperators , UndecidableInstances+ , UndecidableSuperClasses #-} module Squeal.PostgreSQL.Session.Decode@@ -37,7 +39,7 @@ , DecodeRow (..) , decodeRow , runDecodeRow- , genericRow+ , GenericRow (..) , appendRows , consRow -- * Decoding Classes@@ -52,12 +54,17 @@ import Control.Applicative import Control.Arrow import Control.Monad+#if MIN_VERSION_base(4,13,0)+#else import Control.Monad.Fail+#endif import Control.Monad.Except import Control.Monad.Reader-import Control.Monad.State+import Control.Monad.State.Strict import Control.Monad.Trans.Maybe import Data.Bits+import Data.Coerce (coerce)+import Data.Functor.Constant (Constant(Constant)) import Data.Int (Int16, Int32, Int64) import Data.Kind import Data.Scientific (Scientific)@@ -118,7 +125,7 @@ -} rowValue :: (PG y ~ 'PGcomposite row, SOP.SListI row)- => DecodeRow row y+ => DecodeRow row y -- ^ fields -> StateT Strict.ByteString (Except Strict.Text) y rowValue decoder = devalue $ let@@ -229,6 +236,12 @@ , "." ] Just x -> pure x+instance FromPG x => FromPG (Const x tag) where+ fromPG = coerce $ fromPG @x+instance FromPG x => FromPG (SOP.K x tag) where+ fromPG = coerce $ fromPG @x+instance FromPG x => FromPG (Constant x tag) where+ fromPG = coerce $ fromPG @x instance FromPG Day where fromPG = devalue date instance FromPG TimeOfDay where@@ -491,52 +504,74 @@ :: (SOP.NP (SOP.K (Maybe Strict.ByteString)) row -> Either Strict.Text y) -> DecodeRow row y decodeRow dec = DecodeRow . ReaderT $ liftEither . dec-instance {-# OVERLAPPING #-} FromValue ty y+instance {-# OVERLAPPING #-} (KnownSymbol fld, FromValue ty y) => IsLabel fld (DecodeRow (fld ::: ty ': row) y) where- fromLabel = decodeRow $ \(SOP.K b SOP.:* _) ->- fromValue @ty b+ fromLabel = decodeRow $ \(SOP.K b SOP.:* _) -> do+ let+ flderr = mconcat+ [ "field name: "+ , "\"", fromString (symbolVal (SOP.Proxy @fld)), "\"; "+ ]+ left (flderr <>) $ fromValue @ty b instance {-# OVERLAPPABLE #-} IsLabel fld (DecodeRow row y) => IsLabel fld (DecodeRow (field ': row) y) where fromLabel = decodeRow $ \(_ SOP.:* bs) -> runDecodeRow (fromLabel @fld) bs-instance {-# OVERLAPPING #-} FromValue ty (Maybe y)+instance {-# OVERLAPPING #-} (KnownSymbol fld, FromValue ty (Maybe y)) => IsLabel fld (MaybeT (DecodeRow (fld ::: ty ': row)) y) where- fromLabel = MaybeT . decodeRow $ \(SOP.K b SOP.:* _) ->- fromValue @ty b+ fromLabel = MaybeT . decodeRow $ \(SOP.K b SOP.:* _) -> do+ let+ flderr = mconcat+ [ "field name: "+ , "\"", fromString (symbolVal (SOP.Proxy @fld)), "\"; "+ ]+ left (flderr <>) $ fromValue @ty b instance {-# OVERLAPPABLE #-} IsLabel fld (MaybeT (DecodeRow row) y) => IsLabel fld (MaybeT (DecodeRow (field ': row)) y) where fromLabel = MaybeT . decodeRow $ \(_ SOP.:* bs) -> runDecodeRow (runMaybeT (fromLabel @fld)) bs -{- | Row decoder for `SOP.Generic` records.-->>> import qualified GHC.Generics as GHC->>> import qualified Generics.SOP as SOP->>> data Two = Two {frst :: Int16, scnd :: String} deriving (Show, GHC.Generic, SOP.Generic, SOP.HasDatatypeInfo)->>> :{-let- decode :: DecodeRow '[ "frst" ::: 'NotNull 'PGint2, "scnd" ::: 'NotNull 'PGtext] Two- decode = genericRow-in runDecodeRow decode (SOP.K (Just "\NUL\STX") :* SOP.K (Just "two") :* Nil)-:}-Right (Two {frst = 2, scnd = "two"})--}-genericRow :: forall row y ys.+-- | A `GenericRow` constraint to ensure that a Haskell type+-- is a record type,+-- has a `RowPG`,+-- and all its fields and can be decoded from corresponding Postgres fields.+class ( SOP.IsRecord y ys+ , row ~ RowPG y , SOP.AllZip FromField row ys- ) => DecodeRow row y-genericRow- = DecodeRow- . ReaderT- $ fmap SOP.fromRecord- . SOP.hsequence'- . SOP.htrans (SOP.Proxy @FromField) (SOP.Comp . runField)-runField- :: forall ty y. FromField ty y- => SOP.K (Maybe Strict.ByteString) ty- -> Except Strict.Text (SOP.P y)-runField = liftEither . fromField @ty . SOP.unK+ ) => GenericRow row y ys where+ {- | Row decoder for `SOP.Generic` records. + >>> import qualified GHC.Generics as GHC+ >>> import qualified Generics.SOP as SOP+ >>> data Two = Two {frst :: Int16, scnd :: String} deriving (Show, GHC.Generic, SOP.Generic, SOP.HasDatatypeInfo)+ >>> :{+ let+ decode :: DecodeRow '[ "frst" ::: 'NotNull 'PGint2, "scnd" ::: 'NotNull 'PGtext] Two+ decode = genericRow+ in runDecodeRow decode (SOP.K (Just "\NUL\STX") :* SOP.K (Just "two") :* Nil)+ :}+ Right (Two {frst = 2, scnd = "two"})+ -}+ genericRow :: DecodeRow row y+instance+ ( row ~ RowPG y+ , SOP.IsRecord y ys+ , SOP.AllZip FromField row ys+ ) => GenericRow row y ys where+ genericRow+ = DecodeRow+ . ReaderT+ $ fmap SOP.fromRecord+ . SOP.hsequence'+ . SOP.htrans (SOP.Proxy @FromField) (SOP.Comp . runField)+ where+ runField+ :: forall ty z. FromField ty z+ => SOP.K (Maybe Strict.ByteString) ty+ -> Except Strict.Text (SOP.P z)+ runField = liftEither . fromField @ty . SOP.unK+ {- | >>> :{ data Dir = North | East | South | West@@ -552,7 +587,7 @@ -} enumValue :: (SOP.All KnownSymbol labels, PG y ~ 'PGenum labels)- => NP (SOP.K y) labels+ => NP (SOP.K y) labels -- ^ labels -> StateT Strict.ByteString (Except Strict.Text) y enumValue = devalue . enum . labels where
src/Squeal/PostgreSQL/Session/Encode.hs view
@@ -24,12 +24,13 @@ , TypeFamilies , TypeOperators , UndecidableInstances+ , UndecidableSuperClasses #-} module Squeal.PostgreSQL.Session.Encode ( -- * Encode Parameters EncodeParams (..)- , genericParams+ , GenericParams (..) , nilParams , (.*) , (*.)@@ -48,6 +49,9 @@ import Data.Bits import Data.ByteString as Strict (ByteString) import Data.ByteString.Lazy as Lazy (ByteString)+import Data.Coerce (coerce)+import Data.Functor.Const (Const(Const))+import Data.Functor.Constant (Constant(Constant)) import Data.Functor.Contravariant import Data.Int (Int16, Int32, Int64) import Data.Kind@@ -122,6 +126,9 @@ instance ToPG db Lazy.ByteString where toPG = pure . bytea_lazy instance ToPG db (VarChar n) where toPG = pure . text_strict . getVarChar instance ToPG db (FixChar n) where toPG = pure . text_strict . getFixChar+instance ToPG db x => ToPG db (Const x tag) where toPG = toPG @db @x . coerce+instance ToPG db x => ToPG db (SOP.K x tag) where toPG = toPG @db @x . coerce+instance ToPG db x => ToPG db (Constant x tag) where toPG = toPG @db @x . coerce instance ToPG db Day where toPG = pure . date instance ToPG db TimeOfDay where toPG = pure . time_int instance ToPG db (TimeOfDay, TimeZone) where toPG = pure . timetz_int@@ -333,42 +340,56 @@ instance Contravariant (EncodeParams db tys) where contramap f (EncodeParams g) = EncodeParams (g . f) -{- | Parameter encoding for `SOP.Generic` tuples and records.+-- | A `GenericParams` constraint to ensure that a Haskell type+-- is a product type,+-- has a `TuplePG`,+-- and all its terms have known Oids,+-- and can be encoded to corresponding Postgres types.+class+ ( SOP.IsProductType x xs+ , params ~ TuplePG x+ , SOP.All (OidOfNull db) params+ , SOP.AllZip (ToParam db) params xs+ ) => GenericParams db params x xs where+ {- | Parameter encoding for `SOP.Generic` tuples and records. ->>> import qualified GHC.Generics as GHC->>> import qualified Generics.SOP as SOP->>> data Two = Two Int16 String deriving (GHC.Generic, SOP.Generic)->>> conn <- connectdb @'[] "host=localhost port=5432 dbname=exampledb user=postgres password=postgres"->>> :{-let- encode :: EncodeParams '[] '[ 'NotNull 'PGint2, 'NotNull 'PGtext] Two- encode = genericParams-in runReaderT (runEncodeParams encode (Two 2 "two")) conn-:}-K (Just "\NUL\STX") :* K (Just "two") :* Nil+ >>> import qualified GHC.Generics as GHC+ >>> import qualified Generics.SOP as SOP+ >>> data Two = Two Int16 String deriving (GHC.Generic, SOP.Generic)+ >>> conn <- connectdb @'[] "host=localhost port=5432 dbname=exampledb user=postgres password=postgres"+ >>> :{+ let+ encode :: EncodeParams '[] '[ 'NotNull 'PGint2, 'NotNull 'PGtext] Two+ encode = genericParams+ in runReaderT (runEncodeParams encode (Two 2 "two")) conn+ :}+ K (Just "\NUL\STX") :* K (Just "two") :* Nil ->>> :{-let- encode :: EncodeParams '[] '[ 'NotNull 'PGint2, 'NotNull 'PGtext] (Int16, String)- encode = genericParams-in runReaderT (runEncodeParams encode (2, "two")) conn-:}-K (Just "\NUL\STX") :* K (Just "two") :* Nil+ >>> :{+ let+ encode :: EncodeParams '[] '[ 'NotNull 'PGint2, 'NotNull 'PGtext] (Int16, String)+ encode = genericParams+ in runReaderT (runEncodeParams encode (2, "two")) conn+ :}+ K (Just "\NUL\STX") :* K (Just "two") :* Nil ->>> finish conn--}-genericParams :: forall db params x xs.- ( SOP.IsProductType x xs+ >>> finish conn+ -}+ genericParams :: EncodeParams db params x+instance+ ( params ~ TuplePG x+ , SOP.All (OidOfNull db) params+ , SOP.IsProductType x xs , SOP.AllZip (ToParam db) params xs- ) => EncodeParams db params x-genericParams = EncodeParams- $ hctransverse (SOP.Proxy @(ToParam db)) encodeNullParam- . SOP.unZ . SOP.unSOP . SOP.from- where- encodeNullParam- :: forall ty y. ToParam db ty y- => SOP.I y -> ReaderT (SOP.K LibPQ.Connection db) IO (SOP.K (Maybe Encoding) ty)- encodeNullParam = fmap SOP.K . toParam @db @ty . SOP.unI+ ) => GenericParams db params x xs where+ genericParams = EncodeParams+ $ hctransverse (SOP.Proxy @(ToParam db)) encodeNullParam+ . SOP.unZ . SOP.unSOP . SOP.from+ where+ encodeNullParam+ :: forall ty y. ToParam db ty y+ => SOP.I y -> ReaderT (SOP.K LibPQ.Connection db) IO (SOP.K (Maybe Encoding) ty)+ encodeNullParam = fmap SOP.K . toParam @db @ty . SOP.unI -- | Encode 0 parameters. nilParams :: EncodeParams db '[] x@@ -390,7 +411,7 @@ >>> finish conn -} (.*)- :: forall db x0 ty x tys. (ToParam db ty x0)+ :: forall db x0 ty x tys. (ToParam db ty x0, ty ~ NullPG x0) => (x -> x0) -- ^ head -> EncodeParams db tys x -- ^ tail -> EncodeParams db (ty ': tys) x@@ -415,7 +436,11 @@ -} (*.) :: forall db x x0 ty0 x1 ty1- . (ToParam db ty0 x0, ToParam db ty1 x1)+ . ( ToParam db ty0 x0+ , ty0 ~ NullPG x0+ , ToParam db ty1 x1+ , ty1 ~ NullPG x1+ ) => (x -> x0) -- ^ second to last -> (x -> x1) -- ^ last -> EncodeParams db '[ty0, ty1] x@@ -436,8 +461,8 @@ >>> finish conn -} aParam- :: forall db x. ToParam db (NullPG x) x- => EncodeParams db '[NullPG x] x+ :: forall db x ty. (ToParam db ty x, ty ~ NullPG x)+ => EncodeParams db '[ty] x aParam = EncodeParams $ fmap (\param -> SOP.K param :* Nil) . toParam @db @(NullPG x)
src/Squeal/PostgreSQL/Session/Exception.hs view
@@ -18,6 +18,7 @@ , pattern UniqueViolation , pattern CheckViolation , pattern SerializationFailure+ , pattern DeadlockDetected , SQLState (..) , LibPQ.ExecStatus (..) , catchSqueal@@ -26,10 +27,9 @@ , throwSqueal ) where -import Control.Exception (Exception)+import Control.Monad.Catch import Data.ByteString (ByteString) import Data.Text (Text)-import UnliftIO (MonadUnliftIO (..), catch, handle, try, throwIO) import qualified Database.PostgreSQL.LibPQ as LibPQ @@ -71,26 +71,30 @@ pattern SerializationFailure :: ByteString -> SquealException pattern SerializationFailure msg = SQLException (SQLState LibPQ.FatalError "40001" msg)+-- | A pattern for deadlock detection exceptions.+pattern DeadlockDetected :: ByteString -> SquealException+pattern DeadlockDetected msg =+ SQLException (SQLState LibPQ.FatalError "40P01" msg) -- | Catch `SquealException`s. catchSqueal- :: MonadUnliftIO io- => io a- -> (SquealException -> io a) -- ^ handler- -> io a+ :: MonadCatch m+ => m a+ -> (SquealException -> m a) -- ^ handler+ -> m a catchSqueal = catch -- | Handle `SquealException`s. handleSqueal- :: MonadUnliftIO io- => (SquealException -> io a) -- ^ handler- -> io a -> io a+ :: MonadCatch m+ => (SquealException -> m a) -- ^ handler+ -> m a -> m a handleSqueal = handle -- | `Either` return a `SquealException` or a result.-trySqueal :: MonadUnliftIO io => io a -> io (Either SquealException a)+trySqueal :: MonadCatch m => m a -> m (Either SquealException a) trySqueal = try -- | Throw `SquealException`s.-throwSqueal :: MonadUnliftIO io => SquealException -> io a-throwSqueal = throwIO+throwSqueal :: MonadThrow m => SquealException -> m a+throwSqueal = throwM
src/Squeal/PostgreSQL/Session/Migration.hs view
@@ -167,6 +167,7 @@ import Control.Category import Control.Category.Free import Control.Monad+import Control.Monad.IO.Class import Data.ByteString (ByteString) import Data.Foldable (traverse_) import Data.Function ((&))@@ -177,7 +178,6 @@ import Data.Time (UTCTime) import Prelude hiding ((.), id) import System.Environment-import UnliftIO (MonadIO (..)) import qualified Data.Text.IO as Text (putStrLn) import qualified Generics.SOP as SOP@@ -201,7 +201,7 @@ import Squeal.PostgreSQL.Session.Monad import Squeal.PostgreSQL.Session.Result import Squeal.PostgreSQL.Session.Statement-import Squeal.PostgreSQL.Session.Transaction+import Squeal.PostgreSQL.Session.Transaction.Unsafe import Squeal.PostgreSQL.Query.From import Squeal.PostgreSQL.Query.Select import Squeal.PostgreSQL.Query.Table
src/Squeal/PostgreSQL/Session/Monad.hs view
@@ -31,11 +31,9 @@ import Control.Monad.Morph import Prelude hiding (id, (.)) -import qualified Generics.SOP as SOP-import qualified Generics.SOP.Record as SOP- import Squeal.PostgreSQL.Manipulation import Squeal.PostgreSQL.Session.Decode+import Squeal.PostgreSQL.Session.Encode import Squeal.PostgreSQL.Session.Result import Squeal.PostgreSQL.Session.Statement import Squeal.PostgreSQL.Query@@ -426,8 +424,7 @@ runQueryParams :: ( MonadPQ db pq , GenericParams db params x xs- , SOP.IsRecord y ys- , SOP.AllZip FromField row ys+ , GenericRow row y ys ) => Query '[] '[] db params row -- ^ `Squeal.PostgreSQL.Query.Select.select` and friends -> x -> pq (Result y)@@ -453,7 +450,7 @@ 4 -} runQuery- :: (MonadPQ db pq, SOP.IsRecord y ys, SOP.AllZip FromField row ys)+ :: (MonadPQ db pq, GenericRow row y ys) => Query '[] '[] db '[] row -- ^ `Squeal.PostgreSQL.Query.Select.select` and friends -> pq (Result y)@@ -502,9 +499,8 @@ traversePrepared :: ( MonadPQ db pq , GenericParams db params x xs- , Traversable list- , SOP.IsRecord y ys- , SOP.AllZip FromField row ys )+ , GenericRow row y ys+ , Traversable list ) => Manipulation '[] db params row -- ^ `Squeal.PostgreSQL.Manipulation.Insert.insertInto`, -- `Squeal.PostgreSQL.Manipulation.Update.update`,@@ -553,9 +549,8 @@ forPrepared :: ( MonadPQ db pq , GenericParams db params x xs- , Traversable list- , SOP.IsRecord y ys- , SOP.AllZip FromField row ys )+ , GenericRow row y ys+ , Traversable list ) => list x -> Manipulation '[] db params row -- ^ `Squeal.PostgreSQL.Manipulation.Insert.insertInto`,
src/Squeal/PostgreSQL/Session/Oid.hs view
@@ -34,10 +34,10 @@ , OidOfField (..) ) where +import Control.Monad.Catch import Control.Monad.Reader import Data.String import GHC.TypeLits-import UnliftIO (throwIO) import PostgreSQL.Binary.Decoding (valueParser, int) import qualified Data.ByteString as ByteString@@ -173,24 +173,29 @@ oidOfTypedef (_ :: QualifiedAlias sch ty) = ReaderT $ \(SOP.K conn) -> do resultMaybe <- LibPQ.execParams conn q [] LibPQ.Binary case resultMaybe of- Nothing -> throwIO $ ConnectionException "LibPQ.execParams"+ Nothing -> throwM $ ConnectionException oidErr Just result -> do+ numRows <- LibPQ.ntuples result+ when (numRows /= 1) $ throwM $ RowsException oidErr 1 numRows valueMaybe <- LibPQ.getvalue result 0 0 case valueMaybe of- Nothing -> throwIO $ ConnectionException "LibPQ.getvalue"+ Nothing -> throwM $ ConnectionException oidErr Just value -> case valueParser int value of- Left err -> throwIO $ DecodingException "oidOfTypedef" err+ Left err -> throwM $ DecodingException oidErr err Right oid -> return $ LibPQ.Oid oid where+ tyVal = symbolVal (SOP.Proxy @ty)+ schVal = symbolVal (SOP.Proxy @sch)+ oidErr = "oidOfTypedef " <> fromString (schVal <> "." <> tyVal) q = ByteString.intercalate " " [ "SELECT pg_type.oid" , "FROM pg_type" , "INNER JOIN pg_namespace" , "ON pg_type.typnamespace = pg_namespace.oid" , "WHERE pg_type.typname = "- , "\'" <> fromString (symbolVal (SOP.Proxy @ty)) <> "\'"+ , "\'" <> fromString tyVal <> "\'" , "AND pg_namespace.nspname = "- , "\'" <> fromString (symbolVal (SOP.Proxy @sch)) <> "\'"+ , "\'" <> fromString schVal <> "\'" , ";" ] oidOfArrayTypedef@@ -200,22 +205,27 @@ oidOfArrayTypedef (_ :: QualifiedAlias sch ty) = ReaderT $ \(SOP.K conn) -> do resultMaybe <- LibPQ.execParams conn q [] LibPQ.Binary case resultMaybe of- Nothing -> throwIO $ ConnectionException "LibPQ.execParams"+ Nothing -> throwM $ ConnectionException oidErr Just result -> do+ numRows <- LibPQ.ntuples result+ when (numRows /= 1) $ throwM $ RowsException oidErr 1 numRows valueMaybe <- LibPQ.getvalue result 0 0 case valueMaybe of- Nothing -> throwIO $ ConnectionException "LibPQ.getvalue"+ Nothing -> throwM $ ConnectionException oidErr Just value -> case valueParser int value of- Left err -> throwIO $ DecodingException "oidOfArray" err+ Left err -> throwM $ DecodingException oidErr err Right oid -> return $ LibPQ.Oid oid where+ tyVal = symbolVal (SOP.Proxy @ty)+ schVal = symbolVal (SOP.Proxy @sch)+ oidErr = "oidOfArrayTypedef " <> fromString (schVal <> "." <> tyVal) q = ByteString.intercalate " " [ "SELECT pg_type.typelem" , "FROM pg_type" , "INNER JOIN pg_namespace" , "ON pg_type.typnamespace = pg_namespace.oid" , "WHERE pg_type.typname = "- , "\'" <> fromString (symbolVal (SOP.Proxy @ty)) <> "\'"+ , "\'" <> fromString tyVal <> "\'" , "AND pg_namespace.nspname = "- , "\'" <> fromString (symbolVal (SOP.Proxy @sch)) <> "\'"+ , "\'" <> fromString schVal <> "\'" , ";" ]
src/Squeal/PostgreSQL/Session/Pool.hs view
@@ -52,19 +52,20 @@ , destroyConnectionPool ) where +import Control.Monad.Catch+import Control.Monad.IO.Class import Data.ByteString import Data.Time-import UnliftIO (MonadUnliftIO (..))-import UnliftIO.Pool (Pool, createPool, destroyAllResources, withResource)+import Data.Pool import Squeal.PostgreSQL.Type.Schema import Squeal.PostgreSQL.Session (PQ (..)) import Squeal.PostgreSQL.Session.Connection -- | Create a striped pool of connections.--- Although the garbage collector will destroy all idle connections when the pool is garbage collected it's recommended to manually `destroyAllResources` when you're done with the pool so that the connections are freed up as soon as possible.+-- Although the garbage collector will destroy all idle connections when the pool is garbage collected it's recommended to manually `destroyConnectionPool` when you're done with the pool so that the connections are freed up as soon as possible. createConnectionPool- :: forall (db :: SchemasType) io. MonadUnliftIO io+ :: forall (db :: SchemasType) io. MonadIO io => ByteString -- ^ The passed string can be empty to use all default parameters, or it can -- contain one or more parameter settings separated by whitespace.@@ -82,7 +83,7 @@ -- Requests for connections will block if this limit is reached on a single stripe, even if other stripes have idle connections available. -> io (Pool (K Connection db)) createConnectionPool conninfo stripes idle maxResrc =- createPool (connectdb conninfo) finish stripes idle maxResrc+ liftIO $ createPool (connectdb conninfo) finish stripes idle maxResrc {-| Temporarily take a connection from a `Pool`, perform an action with it,@@ -95,11 +96,16 @@ until a connection becomes available. -} usingConnectionPool- :: MonadUnliftIO io+ :: (MonadIO io, MonadMask io) => Pool (K Connection db) -- ^ pool -> PQ db db io x -- ^ session -> io x-usingConnectionPool pool (PQ session) = unK <$> withResource pool session+usingConnectionPool pool (PQ session) = mask $ \restore -> do+ (conn, local) <- liftIO $ takeResource pool+ ret <- restore (session conn) `onException`+ liftIO (destroyResource pool local conn)+ liftIO $ putResource local conn+ return $ unK ret {- | Destroy all connections in all stripes in the pool.@@ -118,7 +124,7 @@ thus freeing up those connections sooner. -} destroyConnectionPool- :: MonadUnliftIO io+ :: MonadIO io => Pool (K Connection db) -- ^ pool -> io ()-destroyConnectionPool = destroyAllResources+destroyConnectionPool = liftIO . destroyAllResources
src/Squeal/PostgreSQL/Session/Result.hs view
@@ -10,38 +10,30 @@ {-# LANGUAGE FlexibleContexts+ , FlexibleInstances , GADTs , LambdaCase , OverloadedStrings , ScopedTypeVariables , TypeApplications+ , UndecidableInstances #-} module Squeal.PostgreSQL.Session.Result ( Result (..)- , getRow- , firstRow- , getRows- , nextRow- , cmdStatus- , cmdTuples- , ntuples- , nfields- , resultStatus- , okResult- , resultErrorMessage- , resultErrorCode+ , MonadResult (..) , liftResult+ , nextRow ) where import Control.Exception (throw) import Control.Monad (when, (<=<))+import Control.Monad.Catch import Control.Monad.IO.Class import Data.ByteString (ByteString) import Data.Text (Text) import Data.Traversable (for) import Text.Read (readMaybe)-import UnliftIO (throwIO) import qualified Data.ByteString as ByteString import qualified Data.ByteString.Char8 as Char8@@ -68,20 +60,119 @@ instance Functor Result where fmap f (Result decode result) = Result (fmap f decode) result --- | Get a row corresponding to a given row number from a `LibPQ.Result`,--- throwing an exception if the row number is out of bounds.-getRow :: MonadIO io => LibPQ.Row -> Result y -> io y-getRow r (Result decode result) = liftIO $ do- numRows <- LibPQ.ntuples result- numCols <- LibPQ.nfields result- when (numRows < r) $ throw $ RowsException "getRow" r numRows- row' <- traverse (LibPQ.getvalue result r) [0 .. numCols - 1]- case SOP.fromList row' of- Nothing -> throw $ ColumnsException "getRow" numCols- Just row -> case execDecodeRow decode row of- Left parseError -> throw $ DecodingException "getRow" parseError- Right y -> return y+{- | A `MonadResult` operation extracts values+from the `Result` of a `Squeal.PostgreSQL.Session.Monad.MonadPQ` operation.+There is no need to define instances of `MonadResult`.+An instance of `MonadIO` implies an instance of `MonadResult`.+However, the constraint `MonadResult`+does not imply the constraint `MonadIO`.+-}+class Monad m => MonadResult m where+ -- | Get a row corresponding to a given row number from a `LibPQ.Result`,+ -- throwing an exception if the row number is out of bounds.+ getRow :: LibPQ.Row -> Result y -> m y+ -- | Get all rows from a `LibPQ.Result`.+ getRows :: Result y -> m [y]+ -- | Get the first row if possible from a `LibPQ.Result`.+ firstRow :: Result y -> m (Maybe y)+ -- | Returns the number of rows (tuples) in the query result.+ ntuples :: Result y -> m LibPQ.Row+ -- | Returns the number of columns (fields) in the query result.+ nfields :: Result y -> m LibPQ.Column+ {- |+ Returns the command status tag from the SQL command+ that generated the `Result`.+ Commonly this is just the name of the command,+ but it might include additional data such as the number of rows processed.+ -}+ cmdStatus :: Result y -> m Text+ {- |+ Returns the number of rows affected by the SQL command.+ This function returns `Just` the number of+ rows affected by the SQL statement that generated the `Result`.+ This function can only be used following the execution of a+ SELECT, CREATE TABLE AS, INSERT, UPDATE, DELETE, MOVE, FETCH,+ or COPY statement,or an EXECUTE of a prepared query that+ contains an INSERT, UPDATE, or DELETE statement.+ If the command that generated the PGresult was anything else,+ `cmdTuples` returns `Nothing`.+ -}+ cmdTuples :: Result y -> m (Maybe LibPQ.Row)+ -- | Returns the result status of the command.+ resultStatus :: Result y -> m LibPQ.ExecStatus+ -- | Check if a `Result`'s status is either `LibPQ.CommandOk`+ -- or `LibPQ.TuplesOk` otherwise `throw` a `SQLException`.+ okResult :: Result y -> m ()+ -- | Returns the error message most recently generated by an operation+ -- on the connection.+ resultErrorMessage :: Result y -> m (Maybe ByteString)+ -- | Returns the error code most recently generated by an operation+ -- on the connection.+ --+ -- https://www.postgresql.org/docs/current/static/errcodes-appendix.html+ resultErrorCode :: Result y -> m (Maybe ByteString) +instance (Monad io, MonadIO io) => MonadResult io where+ getRow r (Result decode result) = liftIO $ do+ numRows <- LibPQ.ntuples result+ numCols <- LibPQ.nfields result+ when (numRows < r) $ throw $ RowsException "getRow" r numRows+ row' <- traverse (LibPQ.getvalue result r) [0 .. numCols - 1]+ case SOP.fromList row' of+ Nothing -> throw $ ColumnsException "getRow" numCols+ Just row -> case execDecodeRow decode row of+ Left parseError -> throw $ DecodingException "getRow" parseError+ Right y -> return y++ getRows (Result decode result) = liftIO $ do+ numCols <- LibPQ.nfields result+ numRows <- LibPQ.ntuples result+ for [0 .. numRows - 1] $ \ r -> do+ row' <- traverse (LibPQ.getvalue result r) [0 .. numCols - 1]+ case SOP.fromList row' of+ Nothing -> throw $ ColumnsException "getRows" numCols+ Just row -> case execDecodeRow decode row of+ Left parseError -> throw $ DecodingException "getRows" parseError+ Right y -> return y++ firstRow (Result decode result) = liftIO $ do+ numRows <- LibPQ.ntuples result+ numCols <- LibPQ.nfields result+ if numRows <= 0 then return Nothing else do+ row' <- traverse (LibPQ.getvalue result 0) [0 .. numCols - 1]+ case SOP.fromList row' of+ Nothing -> throw $ ColumnsException "firstRow" numCols+ Just row -> case execDecodeRow decode row of+ Left parseError -> throw $ DecodingException "firstRow" parseError+ Right y -> return $ Just y++ ntuples = liftResult LibPQ.ntuples++ nfields = liftResult LibPQ.nfields++ resultStatus = liftResult LibPQ.resultStatus++ cmdStatus = liftResult (getCmdStatus <=< LibPQ.cmdStatus)+ where+ getCmdStatus = \case+ Nothing -> throwM $ ConnectionException "LibPQ.cmdStatus"+ Just bytes -> return $ Text.decodeUtf8 bytes++ cmdTuples = liftResult (getCmdTuples <=< LibPQ.cmdTuples)+ where+ getCmdTuples = \case+ Nothing -> throwM $ ConnectionException "LibPQ.cmdTuples"+ Just bytes -> return $+ if ByteString.null bytes+ then Nothing+ else fromInteger <$> readMaybe (Char8.unpack bytes)++ okResult = liftResult okResult_ ++ resultErrorMessage = liftResult LibPQ.resultErrorMessage++ resultErrorCode = liftResult (flip LibPQ.resultErrorField LibPQ.DiagSqlstate)+ -- | Intended to be used for unfolding in streaming libraries, `nextRow` -- takes a total number of rows (which can be found with `ntuples`) -- and a `LibPQ.Result` and given a row number if it's too large returns `Nothing`,@@ -102,85 +193,6 @@ Left parseError -> throw $ DecodingException "nextRow" parseError Right y -> return $ Just (r+1, y) --- | Get all rows from a `LibPQ.Result`.-getRows :: MonadIO io => Result y -> io [y]-getRows (Result decode result) = liftIO $ do- numCols <- LibPQ.nfields result- numRows <- LibPQ.ntuples result- for [0 .. numRows - 1] $ \ r -> do- row' <- traverse (LibPQ.getvalue result r) [0 .. numCols - 1]- case SOP.fromList row' of- Nothing -> throw $ ColumnsException "getRows" numCols- Just row -> case execDecodeRow decode row of- Left parseError -> throw $ DecodingException "getRows" parseError- Right y -> return y---- | Get the first row if possible from a `LibPQ.Result`.-firstRow :: MonadIO io => Result y -> io (Maybe y)-firstRow (Result decode result) = liftIO $ do- numRows <- LibPQ.ntuples result- numCols <- LibPQ.nfields result- if numRows <= 0 then return Nothing else do- row' <- traverse (LibPQ.getvalue result 0) [0 .. numCols - 1]- case SOP.fromList row' of- Nothing -> throw $ ColumnsException "firstRow" numCols- Just row -> case execDecodeRow decode row of- Left parseError -> throw $ DecodingException "firstRow" parseError- Right y -> return $ Just y---- | Lifts actions on results from @LibPQ@.-liftResult- :: MonadIO io- => (LibPQ.Result -> IO x)- -> Result y -> io x-liftResult f (Result _ result) = liftIO $ f result---- | Returns the number of rows (tuples) in the query result.-ntuples :: MonadIO io => Result y -> io LibPQ.Row-ntuples = liftResult LibPQ.ntuples---- | Returns the number of columns (fields) in the query result.-nfields :: MonadIO io => Result y -> io LibPQ.Column-nfields = liftResult LibPQ.nfields---- | Returns the result status of the command.-resultStatus :: MonadIO io => Result y -> io LibPQ.ExecStatus-resultStatus = liftResult LibPQ.resultStatus--{- |-Returns the command status tag from the SQL command-that generated the `Result`.-Commonly this is just the name of the command,-but it might include additional data such as the number of rows processed.--}-cmdStatus :: MonadIO io => Result y -> io Text-cmdStatus = liftResult (getCmdStatus <=< LibPQ.cmdStatus)- where- getCmdStatus = \case- Nothing -> throwIO $ ConnectionException "LibPQ.cmdStatus"- Just bytes -> return $ Text.decodeUtf8 bytes--{- |-Returns the number of rows affected by the SQL command.-This function returns `Just` the number of-rows affected by the SQL statement that generated the `Result`.-This function can only be used following the execution of a-SELECT, CREATE TABLE AS, INSERT, UPDATE, DELETE, MOVE, FETCH,-or COPY statement,or an EXECUTE of a prepared query that-contains an INSERT, UPDATE, or DELETE statement.-If the command that generated the PGresult was anything else,-`cmdTuples` returns `Nothing`.--}-cmdTuples :: MonadIO io => Result y -> io (Maybe LibPQ.Row)-cmdTuples = liftResult (getCmdTuples <=< LibPQ.cmdTuples)- where- getCmdTuples = \case- Nothing -> throwIO $ ConnectionException "LibPQ.cmdTuples"- Just bytes -> return $- if ByteString.null bytes- then Nothing- else fromInteger <$> readMaybe (Char8.unpack bytes)- okResult_ :: MonadIO io => LibPQ.Result -> io () okResult_ result = liftIO $ do status <- LibPQ.resultStatus result@@ -197,26 +209,12 @@ Nothing -> throw $ ConnectionException "LibPQ.resultErrorMessage" Just msg -> throw . SQLException $ SQLState status stateCode msg --- | Check if a `Result`'s status is either `LibPQ.CommandOk`--- or `LibPQ.TuplesOk` otherwise `throw` a `SQLException`.-okResult :: MonadIO io => Result y -> io ()-okResult = liftResult okResult_ ---- | Returns the error message most recently generated by an operation--- on the connection.-resultErrorMessage- :: MonadIO io => Result y -> io (Maybe ByteString)-resultErrorMessage = liftResult LibPQ.resultErrorMessage---- | Returns the error code most recently generated by an operation--- on the connection.------ https://www.postgresql.org/docs/current/static/errcodes-appendix.html-resultErrorCode+-- | Lifts actions on results from @LibPQ@.+liftResult :: MonadIO io- => Result y- -> io (Maybe ByteString)-resultErrorCode = liftResult (flip LibPQ.resultErrorField LibPQ.DiagSqlstate)+ => (LibPQ.Result -> IO x)+ -> Result y -> io x+liftResult f (Result _ result) = liftIO $ f result execDecodeRow :: DecodeRow row y
src/Squeal/PostgreSQL/Session/Statement.hs view
@@ -11,8 +11,7 @@ -} {-# LANGUAGE- ConstraintKinds- , DataKinds+ DataKinds , DeriveFunctor , DeriveFoldable , DeriveGeneric@@ -26,15 +25,12 @@ ( Statement (..) , query , manipulation- , GenericParams- , GenericRow ) where import Data.Functor.Contravariant import Data.Profunctor (Profunctor (..)) import qualified Generics.SOP as SOP-import qualified Generics.SOP.Record as SOP import Squeal.PostgreSQL.Manipulation import Squeal.PostgreSQL.Session.Decode@@ -86,24 +82,6 @@ instance RenderSQL (Statement db x y) where renderSQL (Manipulation _ _ q) = renderSQL q renderSQL (Query _ _ q) = renderSQL q---- | A `GenericParams` constraint to ensure that--- a Haskell type is a product type,--- all its terms have known Oids,--- and can be encoded to corresponding--- Postgres types.-type GenericParams db params x xs =- ( SOP.All (OidOfNull db) params- , SOP.IsProductType x xs- , SOP.AllZip (ToParam db) params xs )---- | A `GenericRow` constraint to ensure that--- a Haskell type is a record type,--- and all its fields and can be decoded from corresponding--- Postgres fields.-type GenericRow row y ys =- ( SOP.IsRecord y ys- , SOP.AllZip FromField row ys ) -- | Smart constructor for a structured query language statement query ::
src/Squeal/PostgreSQL/Session/Transaction.hs view
@@ -9,245 +9,148 @@ -} {-# LANGUAGE- DataKinds- , FlexibleContexts- , LambdaCase- , OverloadedStrings- , TypeInType+ MonoLocalBinds+ , RankNTypes #-} module Squeal.PostgreSQL.Session.Transaction ( -- * Transaction- transactionally+ Transaction+ , transactionally , transactionally_ , transactionallyRetry+ , transactionallyRetry_ , ephemerally , ephemerally_- , begin- , commit- , rollback+ , withSavepoint -- * Transaction Mode , TransactionMode (..) , defaultMode , longRunningMode+ , retryMode , IsolationLevel (..) , AccessMode (..) , DeferrableMode (..) ) where -import UnliftIO+import Control.Monad.Catch+import Data.ByteString -import Squeal.PostgreSQL.Manipulation-import Squeal.PostgreSQL.Render-import Squeal.PostgreSQL.Session.Exception import Squeal.PostgreSQL.Session.Monad+import Squeal.PostgreSQL.Session.Result+import Squeal.PostgreSQL.Session.Transaction.Unsafe+ ( TransactionMode (..)+ , defaultMode+ , longRunningMode+ , retryMode+ , IsolationLevel (..)+ , AccessMode (..)+ , DeferrableMode (..)+ )+import qualified Squeal.PostgreSQL.Session.Transaction.Unsafe as Unsafe +{- | A type of "safe" `Transaction`s,+do-blocks that permit only+database operations, pure functions, and synchronous exception handling+forbidding arbitrary `IO` operations.++To permit arbitrary `IO`,++>>> import qualified Squeal.PostgreSQL.Session.Transaction.Unsafe as Unsafe++Then use the @Unsafe@ qualified form of the functions below.++A safe `Transaction` can be run in two ways,++1) it can be run directly in `IO` because as a+ universally quantified type,+ @Transaction db x@ permits interpretation in "subtypes" like+ @(MonadPQ db m, MonadIO m, MonadCatch m) => m x@+ or+ @PQ db db IO x@++2) it can be run in a transaction block, using+ `transactionally`, `ephemerally`,+ or `transactionallyRetry`+-} +type Transaction db x = forall m.+ ( MonadPQ db m+ , MonadResult m+ , MonadCatch m+ ) => m x+ {- | Run a computation `transactionally`;-first `begin`,+first `Unsafe.begin`, then run the computation,-`onException` `rollback` and rethrow the exception,-otherwise `commit` and `return` the result.+`onException` `Unsafe.rollback` and rethrow the exception,+otherwise `Unsafe.commit` and `return` the result. -} transactionally- :: (MonadUnliftIO tx, MonadPQ db tx)+ :: (MonadMask tx, MonadResult tx, MonadPQ db tx) => TransactionMode- -> tx x -- ^ run inside a transaction+ -> Transaction db x -- ^ run inside a transaction -> tx x-transactionally mode tx = mask $ \restore -> do- manipulate_ $ begin mode- result <- restore tx `onException` (manipulate_ rollback)- manipulate_ commit- return result+transactionally = Unsafe.transactionally -- | Run a computation `transactionally_`, in `defaultMode`. transactionally_- :: (MonadUnliftIO tx, MonadPQ db tx)- => tx x -- ^ run inside a transaction+ :: (MonadMask tx, MonadResult tx, MonadPQ db tx)+ => Transaction db x -- ^ run inside a transaction -> tx x-transactionally_ = transactionally defaultMode+transactionally_ = Unsafe.transactionally_ {- | `transactionallyRetry` a computation; -* first `begin`,+* first `Unsafe.begin`, * then `try` the computation,- - if it raises a serialization failure then `rollback` and restart the transaction,- - if it raises any other exception then `rollback` and rethrow the exception,- - otherwise `commit` and `return` the result.+ - if it raises a serialization failure or deadloack detection,+ then `Unsafe.rollback` and restart the transaction,+ - if it raises any other exception then `Unsafe.rollback` and rethrow the exception,+ - otherwise `Unsafe.commit` and `return` the result. -} transactionallyRetry- :: (MonadUnliftIO tx, MonadPQ db tx)+ :: (MonadMask tx, MonadResult tx, MonadPQ db tx) => TransactionMode- -> tx x -- ^ run inside a transaction+ -> Transaction db x -- ^ run inside a transaction -> tx x-transactionallyRetry mode tx = mask $ \restore ->- loop . try $ do- x <- restore tx- manipulate_ commit- return x- where- loop attempt = do- manipulate_ $ begin mode- attempt >>= \case- Left (SerializationFailure _) -> do- manipulate_ rollback- loop attempt- Left err -> do- manipulate_ rollback- throwIO err- Right x -> return x+transactionallyRetry = Unsafe.transactionallyRetry +{- | `transactionallyRetry` in `retryMode`. -}+transactionallyRetry_+ :: (MonadMask tx, MonadResult tx, MonadPQ db tx)+ => Transaction db x -- ^ run inside a transaction+ -> tx x+transactionallyRetry_ = Unsafe.transactionallyRetry_+ {- | Run a computation `ephemerally`;-Like `transactionally` but always `rollback`, useful in testing.+Like `transactionally` but always `Unsafe.rollback`, useful in testing. -} ephemerally- :: (MonadUnliftIO tx, MonadPQ db tx)+ :: (MonadMask tx, MonadResult tx, MonadPQ db tx) => TransactionMode- -> tx x -- ^ run inside an ephemeral transaction+ -> Transaction db x -- ^ run inside an ephemeral transaction -> tx x-ephemerally mode tx = mask $ \restore -> do- manipulate_ $ begin mode- result <- restore tx `onException` (manipulate_ rollback)- manipulate_ rollback- return result+ephemerally = Unsafe.ephemerally {- | Run a computation `ephemerally` in `defaultMode`. -} ephemerally_- :: (MonadUnliftIO tx, MonadPQ db tx)- => tx x -- ^ run inside an ephemeral transaction+ :: (MonadMask tx, MonadResult tx, MonadPQ db tx)+ => Transaction db x -- ^ run inside an ephemeral transaction -> tx x-ephemerally_ = ephemerally defaultMode---- | @BEGIN@ a transaction.-begin :: TransactionMode -> Manipulation_ db () ()-begin mode = UnsafeManipulation $ "BEGIN" <+> renderSQL mode---- | @COMMIT@ a transaction.-commit :: Manipulation_ db () ()-commit = UnsafeManipulation "COMMIT"---- | @ROLLBACK@ a transaction.-rollback :: Manipulation_ db () ()-rollback = UnsafeManipulation "ROLLBACK"---- | The available transaction characteristics are the transaction `IsolationLevel`,--- the transaction `AccessMode` (`ReadWrite` or `ReadOnly`), and the `DeferrableMode`.-data TransactionMode = TransactionMode- { isolationLevel :: IsolationLevel- , accessMode :: AccessMode- , deferrableMode :: DeferrableMode- } deriving (Show, Eq)---- | `TransactionMode` with a `ReadCommitted` `IsolationLevel`,--- `ReadWrite` `AccessMode` and `NotDeferrable` `DeferrableMode`.-defaultMode :: TransactionMode-defaultMode = TransactionMode ReadCommitted ReadWrite NotDeferrable---- | `TransactionMode` with a `Serializable` `IsolationLevel`,--- `ReadOnly` `AccessMode` and `Deferrable` `DeferrableMode`.--- This mode is well suited for long-running reports or backups.-longRunningMode :: TransactionMode-longRunningMode = TransactionMode Serializable ReadOnly Deferrable---- | Render a `TransactionMode`.-instance RenderSQL TransactionMode where- renderSQL mode =- "ISOLATION LEVEL"- <+> renderSQL (isolationLevel mode)- <+> renderSQL (accessMode mode)- <+> renderSQL (deferrableMode mode)---- | The SQL standard defines four levels of transaction isolation.--- The most strict is `Serializable`, which is defined by the standard in a paragraph--- which says that any concurrent execution of a set of `Serializable` transactions is--- guaranteed to produce the same effect as running them one at a time in some order.--- The other three levels are defined in terms of phenomena, resulting from interaction--- between concurrent transactions, which must not occur at each level.--- The phenomena which are prohibited at various levels are:------ __Dirty read__: A transaction reads data written by a concurrent uncommitted transaction.------ __Nonrepeatable read__: A transaction re-reads data it has previously read and finds that data--- has been modified by another transaction (that committed since the initial read).------ __Phantom read__: A transaction re-executes a query returning a set of rows that satisfy--- a search condition and finds that the set of rows satisfying the condition--- has changed due to another recently-committed transaction.------ __Serialization anomaly__: The result of successfully committing a group of transactions is inconsistent--- with all possible orderings of running those transactions one at a time.------ In PostgreSQL, you can request any of the four standard transaction--- isolation levels, but internally only three distinct isolation levels are implemented,--- i.e. PostgreSQL's `ReadUncommitted` mode behaves like `ReadCommitted`.--- This is because it is the only sensible way to map the standard isolation levels to--- PostgreSQL's multiversion concurrency control architecture.-data IsolationLevel- = Serializable- -- ^ Dirty read is not possible.- -- Nonrepeatable read is not possible.- -- Phantom read is not possible.- -- Serialization anomaly is not possible.- | RepeatableRead- -- ^ Dirty read is not possible.- -- Nonrepeatable read is not possible.- -- Phantom read is not possible.- -- Serialization anomaly is possible.- | ReadCommitted- -- ^ Dirty read is not possible.- -- Nonrepeatable read is possible.- -- Phantom read is possible.- -- Serialization anomaly is possible.- | ReadUncommitted- -- ^ Dirty read is not possible.- -- Nonrepeatable read is possible.- -- Phantom read is possible.- -- Serialization anomaly is possible.- deriving (Show, Eq)---- | Render an `IsolationLevel`.-instance RenderSQL IsolationLevel where- renderSQL = \case- Serializable -> "SERIALIZABLE"- ReadCommitted -> "READ COMMITTED"- ReadUncommitted -> "READ UNCOMMITTED"- RepeatableRead -> "REPEATABLE READ"---- | The transaction access mode determines whether the transaction is `ReadWrite` or `ReadOnly`.--- `ReadWrite` is the default. When a transaction is `ReadOnly`,--- the following SQL commands are disallowed:--- @INSERT@, @UPDATE@, @DELETE@, and @COPY FROM@--- if the table they would write to is not a temporary table;--- all @CREATE@, @ALTER@, and @DROP@ commands;--- @COMMENT@, @GRANT@, @REVOKE@, @TRUNCATE@;--- and @EXPLAIN ANALYZE@ and @EXECUTE@ if the command they would execute is among those listed.--- This is a high-level notion of `ReadOnly` that does not prevent all writes to disk.-data AccessMode- = ReadWrite- | ReadOnly- deriving (Show, Eq)---- | Render an `AccessMode`.-instance RenderSQL AccessMode where- renderSQL = \case- ReadWrite -> "READ WRITE"- ReadOnly -> "READ ONLY"+ephemerally_ = Unsafe.ephemerally_ --- | The `Deferrable` transaction property has no effect--- unless the transaction is also `Serializable` and `ReadOnly`.--- When all three of these properties are selected for a transaction,--- the transaction may block when first acquiring its snapshot,--- after which it is able to run without the normal overhead of a--- `Serializable` transaction and without any risk of contributing--- to or being canceled by a serialization failure.--- This `longRunningMode` is well suited for long-running reports or backups.-data DeferrableMode- = Deferrable- | NotDeferrable- deriving (Show, Eq)+{- | `withSavepoint`, used in a transaction block,+allows a form of nested transactions,+creating a savepoint, then running a transaction,+rolling back to the savepoint if it returned `Left`,+then releasing the savepoint and returning transaction's result. --- | Render a `DeferrableMode`.-instance RenderSQL DeferrableMode where- renderSQL = \case- Deferrable -> "DEFERRABLE"- NotDeferrable -> "NOT DEFERRABLE"+Make sure to run `withSavepoint` in a transaction block,+not directly or you will provoke a SQL exception.+-}+withSavepoint+ :: ByteString -- ^ savepoint name+ -> Transaction db (Either e x)+ -> Transaction db (Either e x)+withSavepoint = Unsafe.withSavepoint
+ src/Squeal/PostgreSQL/Session/Transaction/Unsafe.hs view
@@ -0,0 +1,299 @@+{-|+Module: Squeal.PostgreSQL.Session.Transaction.Unsafe+Description: unsafe transaction control language+Copyright: (c) Eitan Chatav, 2019+Maintainer: eitan@morphism.tech+Stability: experimental++transaction control language permitting arbitrary `IO`+-}++{-# LANGUAGE+ DataKinds+ , FlexibleContexts+ , LambdaCase+ , OverloadedStrings+ , TypeInType+#-}++module Squeal.PostgreSQL.Session.Transaction.Unsafe+ ( -- * Transaction+ transactionally+ , transactionally_+ , transactionallyRetry+ , transactionallyRetry_+ , ephemerally+ , ephemerally_+ , begin+ , commit+ , rollback+ , withSavepoint+ -- * Transaction Mode+ , TransactionMode (..)+ , defaultMode+ , retryMode+ , longRunningMode+ , IsolationLevel (..)+ , AccessMode (..)+ , DeferrableMode (..)+ ) where++import Control.Monad+import Control.Monad.Catch+import Data.ByteString+import Data.Either++import Squeal.PostgreSQL.Manipulation+import Squeal.PostgreSQL.Render+import Squeal.PostgreSQL.Session.Exception+import Squeal.PostgreSQL.Session.Monad++{- | Run a computation `transactionally`;+first `begin`,+then run the computation,+`onException` `rollback` and rethrow the exception,+otherwise `commit` and `return` the result.+-}+transactionally+ :: (MonadMask tx, MonadPQ db tx)+ => TransactionMode+ -> tx x -- ^ run inside a transaction+ -> tx x+transactionally mode tx = mask $ \restore -> do+ manipulate_ $ begin mode+ result <- restore tx `onException` manipulate_ rollback+ manipulate_ commit+ return result++-- | Run a computation `transactionally_`, in `defaultMode`.+transactionally_+ :: (MonadMask tx, MonadPQ db tx)+ => tx x -- ^ run inside a transaction+ -> tx x+transactionally_ = transactionally defaultMode++{- |+`transactionallyRetry` a computation;++* first `begin`,+* then `try` the computation,+ - if it raises a serialization failure or deadlock detection,+ then `rollback` and restart the transaction,+ - if it raises any other exception then `rollback` and rethrow the exception,+ - otherwise `commit` and `return` the result.+-}+transactionallyRetry+ :: (MonadMask tx, MonadPQ db tx)+ => TransactionMode+ -> tx x -- ^ run inside a transaction+ -> tx x+transactionallyRetry mode tx = mask $ \restore ->+ loop . try $ do+ x <- restore tx+ manipulate_ commit+ return x+ where+ loop attempt = do+ manipulate_ $ begin mode+ attempt >>= \case+ Left (SerializationFailure _) -> do+ manipulate_ rollback+ loop attempt+ Left (DeadlockDetected _) -> do+ manipulate_ rollback+ loop attempt+ Left err -> do+ manipulate_ rollback+ throwM err+ Right x -> return x++{- | `transactionallyRetry` in `retryMode`. -}+transactionallyRetry_+ :: (MonadMask tx, MonadPQ db tx)+ => tx x -- ^ run inside a transaction+ -> tx x+transactionallyRetry_ = transactionallyRetry retryMode++{- | Run a computation `ephemerally`;+Like `transactionally` but always `rollback`, useful in testing.+-}+ephemerally+ :: (MonadMask tx, MonadPQ db tx)+ => TransactionMode+ -> tx x -- ^ run inside an ephemeral transaction+ -> tx x+ephemerally mode tx = mask $ \restore -> do+ manipulate_ $ begin mode+ result <- restore tx `onException` (manipulate_ rollback)+ manipulate_ rollback+ return result++{- | Run a computation `ephemerally` in `defaultMode`. -}+ephemerally_+ :: (MonadMask tx, MonadPQ db tx)+ => tx x -- ^ run inside an ephemeral transaction+ -> tx x+ephemerally_ = ephemerally defaultMode++-- | @BEGIN@ a transaction.+begin :: TransactionMode -> Manipulation_ db () ()+begin mode = UnsafeManipulation $ "BEGIN" <+> renderSQL mode++-- | @COMMIT@ a transaction.+commit :: Manipulation_ db () ()+commit = UnsafeManipulation "COMMIT"++-- | @ROLLBACK@ a transaction.+rollback :: Manipulation_ db () ()+rollback = UnsafeManipulation "ROLLBACK"++{- | `withSavepoint`, used in a transaction block,+allows a form of nested transactions,+creating a savepoint, then running a transaction,+rolling back to the savepoint if it returned `Left`,+then releasing the savepoint and returning transaction's result.++Make sure to run `withSavepoint` in a transaction block,+not directly or you will provoke a SQL exception.+-}+withSavepoint+ :: MonadPQ db tx+ => ByteString -- ^ savepoint name+ -> tx (Either e x)+ -> tx (Either e x)+withSavepoint savepoint tx = do+ let svpt = "SAVEPOINT" <+> savepoint+ manipulate_ $ UnsafeManipulation $ svpt+ e_x <- tx+ when (isLeft e_x) $+ manipulate_ $ UnsafeManipulation $ "ROLLBACK TO" <+> svpt+ manipulate_ $ UnsafeManipulation $ "RELEASE" <+> svpt+ return e_x++-- | The available transaction characteristics are the transaction `IsolationLevel`,+-- the transaction `AccessMode` (`ReadWrite` or `ReadOnly`), and the `DeferrableMode`.+data TransactionMode = TransactionMode+ { isolationLevel :: IsolationLevel+ , accessMode :: AccessMode+ , deferrableMode :: DeferrableMode+ } deriving (Show, Eq)++-- | `TransactionMode` with a `ReadCommitted` `IsolationLevel`,+-- `ReadWrite` `AccessMode` and `NotDeferrable` `DeferrableMode`.+defaultMode :: TransactionMode+defaultMode = TransactionMode ReadCommitted ReadWrite NotDeferrable++-- | `TransactionMode` with a `Serializable` `IsolationLevel`,+-- `ReadWrite` `AccessMode` and `NotDeferrable` `DeferrableMode`,+-- appropriate for short-lived queries or manipulations.+retryMode :: TransactionMode+retryMode = TransactionMode Serializable ReadWrite NotDeferrable++-- | `TransactionMode` with a `Serializable` `IsolationLevel`,+-- `ReadOnly` `AccessMode` and `Deferrable` `DeferrableMode`.+-- This mode is well suited for long-running reports or backups.+longRunningMode :: TransactionMode+longRunningMode = TransactionMode Serializable ReadOnly Deferrable++-- | Render a `TransactionMode`.+instance RenderSQL TransactionMode where+ renderSQL mode =+ "ISOLATION LEVEL"+ <+> renderSQL (isolationLevel mode)+ <+> renderSQL (accessMode mode)+ <+> renderSQL (deferrableMode mode)++-- | The SQL standard defines four levels of transaction isolation.+-- The most strict is `Serializable`, which is defined by the standard in a paragraph+-- which says that any concurrent execution of a set of `Serializable` transactions is+-- guaranteed to produce the same effect as running them one at a time in some order.+-- The other three levels are defined in terms of phenomena, resulting from interaction+-- between concurrent transactions, which must not occur at each level.+-- The phenomena which are prohibited at various levels are:+--+-- __Dirty read__: A transaction reads data written by a concurrent uncommitted transaction.+--+-- __Nonrepeatable read__: A transaction re-reads data it has previously read and finds that data+-- has been modified by another transaction (that committed since the initial read).+--+-- __Phantom read__: A transaction re-executes a query returning a set of rows that satisfy+-- a search condition and finds that the set of rows satisfying the condition+-- has changed due to another recently-committed transaction.+--+-- __Serialization anomaly__: The result of successfully committing a group of transactions is inconsistent+-- with all possible orderings of running those transactions one at a time.+--+-- In PostgreSQL, you can request any of the four standard transaction+-- isolation levels, but internally only three distinct isolation levels are implemented,+-- i.e. PostgreSQL's `ReadUncommitted` mode behaves like `ReadCommitted`.+-- This is because it is the only sensible way to map the standard isolation levels to+-- PostgreSQL's multiversion concurrency control architecture.+data IsolationLevel+ = Serializable+ -- ^ Dirty read is not possible.+ -- Nonrepeatable read is not possible.+ -- Phantom read is not possible.+ -- Serialization anomaly is not possible.+ | RepeatableRead+ -- ^ Dirty read is not possible.+ -- Nonrepeatable read is not possible.+ -- Phantom read is not possible.+ -- Serialization anomaly is possible.+ | ReadCommitted+ -- ^ Dirty read is not possible.+ -- Nonrepeatable read is possible.+ -- Phantom read is possible.+ -- Serialization anomaly is possible.+ | ReadUncommitted+ -- ^ Dirty read is not possible.+ -- Nonrepeatable read is possible.+ -- Phantom read is possible.+ -- Serialization anomaly is possible.+ deriving (Show, Eq)++-- | Render an `IsolationLevel`.+instance RenderSQL IsolationLevel where+ renderSQL = \case+ Serializable -> "SERIALIZABLE"+ ReadCommitted -> "READ COMMITTED"+ ReadUncommitted -> "READ UNCOMMITTED"+ RepeatableRead -> "REPEATABLE READ"++-- | The transaction access mode determines whether the transaction is `ReadWrite` or `ReadOnly`.+-- `ReadWrite` is the default. When a transaction is `ReadOnly`,+-- the following SQL commands are disallowed:+-- @INSERT@, @UPDATE@, @DELETE@, and @COPY FROM@+-- if the table they would write to is not a temporary table;+-- all @CREATE@, @ALTER@, and @DROP@ commands;+-- @COMMENT@, @GRANT@, @REVOKE@, @TRUNCATE@;+-- and @EXPLAIN ANALYZE@ and @EXECUTE@ if the command they would execute is among those listed.+-- This is a high-level notion of `ReadOnly` that does not prevent all writes to disk.+data AccessMode+ = ReadWrite+ | ReadOnly+ deriving (Show, Eq)++-- | Render an `AccessMode`.+instance RenderSQL AccessMode where+ renderSQL = \case+ ReadWrite -> "READ WRITE"+ ReadOnly -> "READ ONLY"++-- | The `Deferrable` transaction property has no effect+-- unless the transaction is also `Serializable` and `ReadOnly`.+-- When all three of these properties are selected for a transaction,+-- the transaction may block when first acquiring its snapshot,+-- after which it is able to run without the normal overhead of a+-- `Serializable` transaction and without any risk of contributing+-- to or being canceled by a serialization failure.+-- This `longRunningMode` is well suited for long-running reports or backups.+data DeferrableMode+ = Deferrable+ | NotDeferrable+ deriving (Show, Eq)++-- | Render a `DeferrableMode`.+instance RenderSQL DeferrableMode where+ renderSQL = \case+ Deferrable -> "DEFERRABLE"+ NotDeferrable -> "NOT DEFERRABLE"
src/Squeal/PostgreSQL/Type.hs view
@@ -5,7 +5,7 @@ Maintainer: eitan@morphism.tech Stability: experimental -types+storage newtypes -} {-# LANGUAGE AllowAmbiguousTypes@@ -33,7 +33,8 @@ #-} module Squeal.PostgreSQL.Type- ( Money (..)+ ( -- * Storage newtypes+ Money (..) , Json (..) , Jsonb (..) , Composite (..)
src/Squeal/PostgreSQL/Type/List.hs view
@@ -41,6 +41,8 @@ , Elem , In , Length+ , SubList+ , SubsetList ) where import Control.Category.Free@@ -107,3 +109,48 @@ type family Length (xs :: [k]) :: Nat where Length '[] = 0 Length (_ : xs) = 1 + Length xs++{- | `SubList` checks that one type level list is a sublist of another,+with the same ordering.++>>> :kind! SubList '[1,2,3] '[4,5,6]+SubList '[1,2,3] '[4,5,6] :: Bool+= 'False+>>> :kind! SubList '[1,2,3] '[1,2,3,4]+SubList '[1,2,3] '[1,2,3,4] :: Bool+= 'True+>>> :kind! SubList '[1,2,3] '[0,1,0,2,0,3]+SubList '[1,2,3] '[0,1,0,2,0,3] :: Bool+= 'True+>>> :kind! SubList '[1,2,3] '[3,2,1]+SubList '[1,2,3] '[3,2,1] :: Bool+= 'False+-}+type family SubList (xs :: [k]) (ys :: [k]) :: Bool where+ SubList '[] ys = 'True+ SubList (x ': xs) '[] = 'False+ SubList (x ': xs) (x ': ys) = SubList xs ys+ SubList (x ': xs) (y ': ys) = SubList (x ': xs) ys++{- | `SubsetList` checks that one type level list is a subset of another,+regardless of ordering and repeats.++>>> :kind! SubsetList '[1,2,3] '[4,5,6]+SubsetList '[1,2,3] '[4,5,6] :: Bool+= 'False+>>> :kind! SubsetList '[1,2,3] '[1,2,3,4]+SubsetList '[1,2,3] '[1,2,3,4] :: Bool+= 'True+>>> :kind! SubsetList '[1,2,3] '[0,1,0,2,0,3]+SubsetList '[1,2,3] '[0,1,0,2,0,3] :: Bool+= 'True+>>> :kind! SubsetList '[1,2,3] '[3,2,1]+SubsetList '[1,2,3] '[3,2,1] :: Bool+= 'True+>>> :kind! SubsetList '[1,1,1] '[3,2,1]+SubsetList '[1,1,1] '[3,2,1] :: Bool+= 'True+-}+type family SubsetList (xs :: [k]) (ys :: [k]) :: Bool where+ SubsetList '[] ys = 'True+ SubsetList (x ': xs) ys = Elem x ys && SubsetList xs ys
src/Squeal/PostgreSQL/Type/PG.hs view
@@ -52,6 +52,8 @@ ) where import Data.Aeson (Value)+import Data.Functor.Const (Const)+import Data.Functor.Constant (Constant) import Data.Kind (Type) import Data.Int (Int16, Int32, Int64) import Data.Scientific (Scientific)@@ -170,6 +172,12 @@ instance IsPG (VarChar n) where type PG (VarChar n) = 'PGvarchar n -- | `PGvarchar` instance IsPG (FixChar n) where type PG (FixChar n) = 'PGchar n+-- | `PG hask`+instance IsPG hask => IsPG (Const hask tag) where type PG (Const hask tag) = PG hask+-- | `PG hask`+instance IsPG hask => IsPG (SOP.K hask tag) where type PG (SOP.K hask tag) = PG hask+-- | `PG hask`+instance IsPG hask => IsPG (Constant hask tag) where type PG (Constant hask tag) = PG hask -- | `PGmoney` instance IsPG Money where type PG Money = 'PGmoney
src/Squeal/PostgreSQL/Type/Schema.hs view
@@ -50,6 +50,10 @@ , SchemaType , SchemasType , Public+ -- * Database Subsets+ , SubDB+ , SubsetDB+ , ElemDB -- * Constraint , (:=>) , Optionality (..)@@ -439,6 +443,41 @@ SetSchema sch0 sch1 schema0 schema1 obj srt ty db = Alter sch1 (Create obj (srt ty) schema1) (Alter sch0 (DropSchemum obj srt schema0) db)++{- | `SubDB` checks that one `SchemasType` is a sublist of another,+with the same ordering.++>>> :kind! SubDB '["a" ::: '["b" ::: 'View '[]]] '["a" ::: '["b" ::: 'View '[], "c" ::: 'Typedef 'PGint4]]+SubDB '["a" ::: '["b" ::: 'View '[]]] '["a" ::: '["b" ::: 'View '[], "c" ::: 'Typedef 'PGint4]] :: Bool+= 'True+-}+type family SubDB (db0 :: SchemasType) (db1 :: SchemasType) :: Bool where+ SubDB '[] db1 = 'True+ SubDB (sch ': db0) '[] = 'False+ SubDB (sch ::: schema0 ': db0) (sch ::: schema1 ': db1) =+ If (SubList schema0 schema1)+ (SubDB db0 db1)+ (SubDB (sch ::: schema0 ': db0) db1)+ SubDB db0 (sch1 ': db1) = SubDB db0 db1++{- | `SubsetDB` checks that one `SchemasType` is a subset of another,+regardless of ordering.++>>> :kind! SubsetDB '["a" ::: '["d" ::: 'Typedef 'PGint2, "b" ::: 'View '[]]] '["a" ::: '["b" ::: 'View '[], "c" ::: 'Typedef 'PGint4, "d" ::: 'Typedef 'PGint2]]+SubsetDB '["a" ::: '["d" ::: 'Typedef 'PGint2, "b" ::: 'View '[]]] '["a" ::: '["b" ::: 'View '[], "c" ::: 'Typedef 'PGint4, "d" ::: 'Typedef 'PGint2]] :: Bool+= 'True+-}+type family SubsetDB (db0 :: SchemasType) (db1 :: SchemasType) :: Bool where+ SubsetDB '[] db1 = 'True+ SubsetDB (sch ': db0) db1 = ElemDB sch db1 && SubsetDB db0 db1++{- | `ElemDB` checks that a schema may be found as a subset of another in a database,+regardless of ordering.+-}+type family ElemDB (sch :: (Symbol, SchemaType)) (db :: SchemasType) :: Bool where+ ElemDB sch '[] = 'False+ ElemDB (sch ::: schema0) (sch ::: schema1 ': _) = SubsetList schema0 schema1+ ElemDB sch (_ ': schs) = ElemDB sch schs -- | Check if a `TableConstraint` involves a column type family ConstraintInvolves column constraint where
test/Property.hs view
@@ -124,7 +124,7 @@ :: forall x . ( ToPG DB x, FromPG x, Inline x , OidOf DB (PG x), PGTyped DB (PG x)- , Show x, Eq x )+ , Show x, Eq x, NullPG x ~ 'NotNull (PG x) ) => TypeExpression DB ('NotNull (PG x)) -> Gen x -> (PropertyName, Property)@@ -134,7 +134,7 @@ :: forall x . ( ToPG DB x, FromPG x, Inline x , OidOf DB (PG x), PGTyped DB (PG x)- , Show x, Eq x )+ , Show x, Eq x, NullPG x ~ 'NotNull (PG x) ) => (x -> x) -> TypeExpression DB ('NotNull (PG x)) -> Gen x
test/Spec.hs view
@@ -10,6 +10,7 @@ , MultiParamTypeClasses , OverloadedLabels , OverloadedStrings+ , RankNTypes , StandaloneDeriving , TypeApplications , TypeFamilies@@ -107,7 +108,9 @@ let testUser = User "TestUser"+ newUser :: User -> Transaction DB () newUser = manipulateParams_ insertUser+ insertUserTwice :: Transaction DB () insertUserTwice = newUser testUser >> newUser testUser err23505 = UniqueViolation $ Char8.unlines [ "ERROR: duplicate key value violates unique constraint \"unique_names\""@@ -129,12 +132,10 @@ let qry :: Query_ (Public '[]) () (Only Char) qry = values_ (inline 'a' `as` #fromOnly)- session = usingConnectionPool pool . transactionally_ $ do- result <- runQuery qry- Just (Only chr) <- firstRow result- return chr+ session = usingConnectionPool pool $ transactionally_ $+ firstRow =<< runQuery qry chrs <- replicateConcurrently 10 session- chrs `shouldSatisfy` all (== 'a')+ chrs `shouldSatisfy` all (== Just (Only 'a')) describe "Ranges" $