{-# LANGUAGE UndecidableInstances #-}
module Hasura.Backends.Postgres.Types.Update
( UpdateOpExpression (..),
PgUpdateVariant (..),
updateVariantIsEmpty,
)
where
import Hasura.Prelude
import Hasura.RQL.IR.Update.Batch (UpdateBatch (..), updateBatchIsEmpty)
import Hasura.RQL.Types.Backend (Backend)
import Hasura.RQL.Types.BackendType (BackendType (Postgres))
data UpdateOpExpression v
= UpdateSet v
| UpdateInc v
| UpdateAppend v
| UpdatePrepend v
| UpdateDeleteKey v
| UpdateDeleteElem v
| UpdateDeleteAtPath [v]
deriving ((forall a b.
(a -> b) -> UpdateOpExpression a -> UpdateOpExpression b)
-> (forall a b. a -> UpdateOpExpression b -> UpdateOpExpression a)
-> Functor UpdateOpExpression
forall a b. a -> UpdateOpExpression b -> UpdateOpExpression a
forall a b.
(a -> b) -> UpdateOpExpression a -> UpdateOpExpression b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
$cfmap :: forall a b.
(a -> b) -> UpdateOpExpression a -> UpdateOpExpression b
fmap :: forall a b.
(a -> b) -> UpdateOpExpression a -> UpdateOpExpression b
$c<$ :: forall a b. a -> UpdateOpExpression b -> UpdateOpExpression a
<$ :: forall a b. a -> UpdateOpExpression b -> UpdateOpExpression a
Functor, (forall m. Monoid m => UpdateOpExpression m -> m)
-> (forall m a. Monoid m => (a -> m) -> UpdateOpExpression a -> m)
-> (forall m a. Monoid m => (a -> m) -> UpdateOpExpression a -> m)
-> (forall a b. (a -> b -> b) -> b -> UpdateOpExpression a -> b)
-> (forall a b. (a -> b -> b) -> b -> UpdateOpExpression a -> b)
-> (forall b a. (b -> a -> b) -> b -> UpdateOpExpression a -> b)
-> (forall b a. (b -> a -> b) -> b -> UpdateOpExpression a -> b)
-> (forall a. (a -> a -> a) -> UpdateOpExpression a -> a)
-> (forall a. (a -> a -> a) -> UpdateOpExpression a -> a)
-> (forall a. UpdateOpExpression a -> [a])
-> (forall a. UpdateOpExpression a -> Bool)
-> (forall a. UpdateOpExpression a -> Int)
-> (forall a. Eq a => a -> UpdateOpExpression a -> Bool)
-> (forall a. Ord a => UpdateOpExpression a -> a)
-> (forall a. Ord a => UpdateOpExpression a -> a)
-> (forall a. Num a => UpdateOpExpression a -> a)
-> (forall a. Num a => UpdateOpExpression a -> a)
-> Foldable UpdateOpExpression
forall a. Eq a => a -> UpdateOpExpression a -> Bool
forall a. Num a => UpdateOpExpression a -> a
forall a. Ord a => UpdateOpExpression a -> a
forall m. Monoid m => UpdateOpExpression m -> m
forall a. UpdateOpExpression a -> Bool
forall a. UpdateOpExpression a -> Int
forall a. UpdateOpExpression a -> [a]
forall a. (a -> a -> a) -> UpdateOpExpression a -> a
forall m a. Monoid m => (a -> m) -> UpdateOpExpression a -> m
forall b a. (b -> a -> b) -> b -> UpdateOpExpression a -> b
forall a b. (a -> b -> b) -> b -> UpdateOpExpression a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
$cfold :: forall m. Monoid m => UpdateOpExpression m -> m
fold :: forall m. Monoid m => UpdateOpExpression m -> m
$cfoldMap :: forall m a. Monoid m => (a -> m) -> UpdateOpExpression a -> m
foldMap :: forall m a. Monoid m => (a -> m) -> UpdateOpExpression a -> m
$cfoldMap' :: forall m a. Monoid m => (a -> m) -> UpdateOpExpression a -> m
foldMap' :: forall m a. Monoid m => (a -> m) -> UpdateOpExpression a -> m
$cfoldr :: forall a b. (a -> b -> b) -> b -> UpdateOpExpression a -> b
foldr :: forall a b. (a -> b -> b) -> b -> UpdateOpExpression a -> b
$cfoldr' :: forall a b. (a -> b -> b) -> b -> UpdateOpExpression a -> b
foldr' :: forall a b. (a -> b -> b) -> b -> UpdateOpExpression a -> b
$cfoldl :: forall b a. (b -> a -> b) -> b -> UpdateOpExpression a -> b
foldl :: forall b a. (b -> a -> b) -> b -> UpdateOpExpression a -> b
$cfoldl' :: forall b a. (b -> a -> b) -> b -> UpdateOpExpression a -> b
foldl' :: forall b a. (b -> a -> b) -> b -> UpdateOpExpression a -> b
$cfoldr1 :: forall a. (a -> a -> a) -> UpdateOpExpression a -> a
foldr1 :: forall a. (a -> a -> a) -> UpdateOpExpression a -> a
$cfoldl1 :: forall a. (a -> a -> a) -> UpdateOpExpression a -> a
foldl1 :: forall a. (a -> a -> a) -> UpdateOpExpression a -> a
$ctoList :: forall a. UpdateOpExpression a -> [a]
toList :: forall a. UpdateOpExpression a -> [a]
$cnull :: forall a. UpdateOpExpression a -> Bool
null :: forall a. UpdateOpExpression a -> Bool
$clength :: forall a. UpdateOpExpression a -> Int
length :: forall a. UpdateOpExpression a -> Int
$celem :: forall a. Eq a => a -> UpdateOpExpression a -> Bool
elem :: forall a. Eq a => a -> UpdateOpExpression a -> Bool
$cmaximum :: forall a. Ord a => UpdateOpExpression a -> a
maximum :: forall a. Ord a => UpdateOpExpression a -> a
$cminimum :: forall a. Ord a => UpdateOpExpression a -> a
minimum :: forall a. Ord a => UpdateOpExpression a -> a
$csum :: forall a. Num a => UpdateOpExpression a -> a
sum :: forall a. Num a => UpdateOpExpression a -> a
$cproduct :: forall a. Num a => UpdateOpExpression a -> a
product :: forall a. Num a => UpdateOpExpression a -> a
Foldable, Functor UpdateOpExpression
Foldable UpdateOpExpression
Functor UpdateOpExpression
-> Foldable UpdateOpExpression
-> (forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> UpdateOpExpression a -> f (UpdateOpExpression b))
-> (forall (f :: * -> *) a.
Applicative f =>
UpdateOpExpression (f a) -> f (UpdateOpExpression a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> UpdateOpExpression a -> m (UpdateOpExpression b))
-> (forall (m :: * -> *) a.
Monad m =>
UpdateOpExpression (m a) -> m (UpdateOpExpression a))
-> Traversable UpdateOpExpression
forall (t :: * -> *).
Functor t
-> Foldable t
-> (forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a.
Monad m =>
UpdateOpExpression (m a) -> m (UpdateOpExpression a)
forall (f :: * -> *) a.
Applicative f =>
UpdateOpExpression (f a) -> f (UpdateOpExpression a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> UpdateOpExpression a -> m (UpdateOpExpression b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> UpdateOpExpression a -> f (UpdateOpExpression b)
$ctraverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> UpdateOpExpression a -> f (UpdateOpExpression b)
traverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> UpdateOpExpression a -> f (UpdateOpExpression b)
$csequenceA :: forall (f :: * -> *) a.
Applicative f =>
UpdateOpExpression (f a) -> f (UpdateOpExpression a)
sequenceA :: forall (f :: * -> *) a.
Applicative f =>
UpdateOpExpression (f a) -> f (UpdateOpExpression a)
$cmapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> UpdateOpExpression a -> m (UpdateOpExpression b)
mapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> UpdateOpExpression a -> m (UpdateOpExpression b)
$csequence :: forall (m :: * -> *) a.
Monad m =>
UpdateOpExpression (m a) -> m (UpdateOpExpression a)
sequence :: forall (m :: * -> *) a.
Monad m =>
UpdateOpExpression (m a) -> m (UpdateOpExpression a)
Traversable, (forall x. UpdateOpExpression v -> Rep (UpdateOpExpression v) x)
-> (forall x. Rep (UpdateOpExpression v) x -> UpdateOpExpression v)
-> Generic (UpdateOpExpression v)
forall x. Rep (UpdateOpExpression v) x -> UpdateOpExpression v
forall x. UpdateOpExpression v -> Rep (UpdateOpExpression v) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall v x. Rep (UpdateOpExpression v) x -> UpdateOpExpression v
forall v x. UpdateOpExpression v -> Rep (UpdateOpExpression v) x
$cfrom :: forall v x. UpdateOpExpression v -> Rep (UpdateOpExpression v) x
from :: forall x. UpdateOpExpression v -> Rep (UpdateOpExpression v) x
$cto :: forall v x. Rep (UpdateOpExpression v) x -> UpdateOpExpression v
to :: forall x. Rep (UpdateOpExpression v) x -> UpdateOpExpression v
Generic, Typeable (UpdateOpExpression v)
Typeable (UpdateOpExpression v)
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> UpdateOpExpression v
-> c (UpdateOpExpression v))
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (UpdateOpExpression v))
-> (UpdateOpExpression v -> Constr)
-> (UpdateOpExpression v -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (UpdateOpExpression v)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (UpdateOpExpression v)))
-> ((forall b. Data b => b -> b)
-> UpdateOpExpression v -> UpdateOpExpression v)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> UpdateOpExpression v -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> UpdateOpExpression v -> r)
-> (forall u.
(forall d. Data d => d -> u) -> UpdateOpExpression v -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> UpdateOpExpression v -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> UpdateOpExpression v -> m (UpdateOpExpression v))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> UpdateOpExpression v -> m (UpdateOpExpression v))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> UpdateOpExpression v -> m (UpdateOpExpression v))
-> Data (UpdateOpExpression v)
UpdateOpExpression v -> Constr
UpdateOpExpression v -> DataType
(forall b. Data b => b -> b)
-> UpdateOpExpression v -> UpdateOpExpression v
forall {v}. Data v => Typeable (UpdateOpExpression v)
forall v. Data v => UpdateOpExpression v -> Constr
forall v. Data v => UpdateOpExpression v -> DataType
forall v.
Data v =>
(forall b. Data b => b -> b)
-> UpdateOpExpression v -> UpdateOpExpression v
forall v u.
Data v =>
Int -> (forall d. Data d => d -> u) -> UpdateOpExpression v -> u
forall v u.
Data v =>
(forall d. Data d => d -> u) -> UpdateOpExpression v -> [u]
forall v r r'.
Data v =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> UpdateOpExpression v -> r
forall v r r'.
Data v =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> UpdateOpExpression v -> r
forall v (m :: * -> *).
(Data v, Monad m) =>
(forall d. Data d => d -> m d)
-> UpdateOpExpression v -> m (UpdateOpExpression v)
forall v (m :: * -> *).
(Data v, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> UpdateOpExpression v -> m (UpdateOpExpression v)
forall v (c :: * -> *).
Data v =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (UpdateOpExpression v)
forall v (c :: * -> *).
Data v =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> UpdateOpExpression v
-> c (UpdateOpExpression v)
forall v (t :: * -> *) (c :: * -> *).
(Data v, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (UpdateOpExpression v))
forall v (t :: * -> * -> *) (c :: * -> *).
(Data v, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (UpdateOpExpression v))
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> UpdateOpExpression v -> u
forall u.
(forall d. Data d => d -> u) -> UpdateOpExpression v -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> UpdateOpExpression v -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> UpdateOpExpression v -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> UpdateOpExpression v -> m (UpdateOpExpression v)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> UpdateOpExpression v -> m (UpdateOpExpression v)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (UpdateOpExpression v)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> UpdateOpExpression v
-> c (UpdateOpExpression v)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (UpdateOpExpression v))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (UpdateOpExpression v))
$cgfoldl :: forall v (c :: * -> *).
Data v =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> UpdateOpExpression v
-> c (UpdateOpExpression v)
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> UpdateOpExpression v
-> c (UpdateOpExpression v)
$cgunfold :: forall v (c :: * -> *).
Data v =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (UpdateOpExpression v)
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (UpdateOpExpression v)
$ctoConstr :: forall v. Data v => UpdateOpExpression v -> Constr
toConstr :: UpdateOpExpression v -> Constr
$cdataTypeOf :: forall v. Data v => UpdateOpExpression v -> DataType
dataTypeOf :: UpdateOpExpression v -> DataType
$cdataCast1 :: forall v (t :: * -> *) (c :: * -> *).
(Data v, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (UpdateOpExpression v))
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (UpdateOpExpression v))
$cdataCast2 :: forall v (t :: * -> * -> *) (c :: * -> *).
(Data v, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (UpdateOpExpression v))
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (UpdateOpExpression v))
$cgmapT :: forall v.
Data v =>
(forall b. Data b => b -> b)
-> UpdateOpExpression v -> UpdateOpExpression v
gmapT :: (forall b. Data b => b -> b)
-> UpdateOpExpression v -> UpdateOpExpression v
$cgmapQl :: forall v r r'.
Data v =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> UpdateOpExpression v -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> UpdateOpExpression v -> r
$cgmapQr :: forall v r r'.
Data v =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> UpdateOpExpression v -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> UpdateOpExpression v -> r
$cgmapQ :: forall v u.
Data v =>
(forall d. Data d => d -> u) -> UpdateOpExpression v -> [u]
gmapQ :: forall u.
(forall d. Data d => d -> u) -> UpdateOpExpression v -> [u]
$cgmapQi :: forall v u.
Data v =>
Int -> (forall d. Data d => d -> u) -> UpdateOpExpression v -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> UpdateOpExpression v -> u
$cgmapM :: forall v (m :: * -> *).
(Data v, Monad m) =>
(forall d. Data d => d -> m d)
-> UpdateOpExpression v -> m (UpdateOpExpression v)
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> UpdateOpExpression v -> m (UpdateOpExpression v)
$cgmapMp :: forall v (m :: * -> *).
(Data v, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> UpdateOpExpression v -> m (UpdateOpExpression v)
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> UpdateOpExpression v -> m (UpdateOpExpression v)
$cgmapMo :: forall v (m :: * -> *).
(Data v, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> UpdateOpExpression v -> m (UpdateOpExpression v)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> UpdateOpExpression v -> m (UpdateOpExpression v)
Data, Int -> UpdateOpExpression v -> ShowS
[UpdateOpExpression v] -> ShowS
UpdateOpExpression v -> String
(Int -> UpdateOpExpression v -> ShowS)
-> (UpdateOpExpression v -> String)
-> ([UpdateOpExpression v] -> ShowS)
-> Show (UpdateOpExpression v)
forall v. Show v => Int -> UpdateOpExpression v -> ShowS
forall v. Show v => [UpdateOpExpression v] -> ShowS
forall v. Show v => UpdateOpExpression v -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: forall v. Show v => Int -> UpdateOpExpression v -> ShowS
showsPrec :: Int -> UpdateOpExpression v -> ShowS
$cshow :: forall v. Show v => UpdateOpExpression v -> String
show :: UpdateOpExpression v -> String
$cshowList :: forall v. Show v => [UpdateOpExpression v] -> ShowS
showList :: [UpdateOpExpression v] -> ShowS
Show, UpdateOpExpression v -> UpdateOpExpression v -> Bool
(UpdateOpExpression v -> UpdateOpExpression v -> Bool)
-> (UpdateOpExpression v -> UpdateOpExpression v -> Bool)
-> Eq (UpdateOpExpression v)
forall v.
Eq v =>
UpdateOpExpression v -> UpdateOpExpression v -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: forall v.
Eq v =>
UpdateOpExpression v -> UpdateOpExpression v -> Bool
== :: UpdateOpExpression v -> UpdateOpExpression v -> Bool
$c/= :: forall v.
Eq v =>
UpdateOpExpression v -> UpdateOpExpression v -> Bool
/= :: UpdateOpExpression v -> UpdateOpExpression v -> Bool
Eq)
data PgUpdateVariant pgKind v
= SingleBatch (UpdateBatch ('Postgres pgKind) UpdateOpExpression v)
| MultipleBatches [UpdateBatch ('Postgres pgKind) UpdateOpExpression v]
deriving stock instance (Eq (UpdateBatch ('Postgres pgKind) UpdateOpExpression v)) => Eq (PgUpdateVariant pgKind v)
deriving stock instance (Show (UpdateBatch ('Postgres pgKind) UpdateOpExpression v)) => Show (PgUpdateVariant pgKind v)
deriving stock instance (Backend ('Postgres pgKind)) => Functor (PgUpdateVariant pgKind)
deriving stock instance (Backend ('Postgres pgKind)) => Foldable (PgUpdateVariant pgKind)
deriving stock instance (Backend ('Postgres pgKind)) => Traversable (PgUpdateVariant pgKind)
updateVariantIsEmpty :: PgUpdateVariant b v -> Bool
updateVariantIsEmpty :: forall (b :: PostgresKind) v. PgUpdateVariant b v -> Bool
updateVariantIsEmpty = \case
SingleBatch UpdateBatch ('Postgres b) UpdateOpExpression v
b -> UpdateBatch ('Postgres b) UpdateOpExpression v -> Bool
forall (b :: BackendType) (updateOperators :: * -> *) v.
UpdateBatch b updateOperators v -> Bool
updateBatchIsEmpty UpdateBatch ('Postgres b) UpdateOpExpression v
b
MultipleBatches [UpdateBatch ('Postgres b) UpdateOpExpression v]
batches -> (UpdateBatch ('Postgres b) UpdateOpExpression v -> Bool)
-> [UpdateBatch ('Postgres b) UpdateOpExpression v] -> Bool
forall (t :: * -> *) a. Foldable t => (a -> Bool) -> t a -> Bool
all UpdateBatch ('Postgres b) UpdateOpExpression v -> Bool
forall (b :: BackendType) (updateOperators :: * -> *) v.
UpdateBatch b updateOperators v -> Bool
updateBatchIsEmpty [UpdateBatch ('Postgres b) UpdateOpExpression v]
batches