graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hasura.RQL.IR.Update.Batch

Description

Contains types that can be used by backends to structure updates to batches of rows in a table

Synopsis

Documentation

data UpdateBatch (b :: BackendType) updateOperators v Source #

Represents a set of update operations (_ubOperations) applied to a batch of rows selected from a table by filtering it with a boolean expression (_ubWhere).

This type may be used by specific backends as a part their UpdateVariant. See PgUpdateVariant for an example.

The actual operators used to affect changes against columns in _ubOperations are abstract here and are specified by the specific backends based on what they actually support

Constructors

UpdateBatch 

Fields

Instances

Instances details
(Backend b, Foldable updateOperators) => Foldable (UpdateBatch b updateOperators) Source # 
Instance details

Defined in Hasura.RQL.IR.Update.Batch

Methods

fold :: Monoid m => UpdateBatch b updateOperators m -> m #

foldMap :: Monoid m => (a -> m) -> UpdateBatch b updateOperators a -> m #

foldMap' :: Monoid m => (a -> m) -> UpdateBatch b updateOperators a -> m #

foldr :: (a -> b0 -> b0) -> b0 -> UpdateBatch b updateOperators a -> b0 #

foldr' :: (a -> b0 -> b0) -> b0 -> UpdateBatch b updateOperators a -> b0 #

foldl :: (b0 -> a -> b0) -> b0 -> UpdateBatch b updateOperators a -> b0 #

foldl' :: (b0 -> a -> b0) -> b0 -> UpdateBatch b updateOperators a -> b0 #

foldr1 :: (a -> a -> a) -> UpdateBatch b updateOperators a -> a #

foldl1 :: (a -> a -> a) -> UpdateBatch b updateOperators a -> a #

toList :: UpdateBatch b updateOperators a -> [a] #

null :: UpdateBatch b updateOperators a -> Bool #

length :: UpdateBatch b updateOperators a -> Int #

elem :: Eq a => a -> UpdateBatch b updateOperators a -> Bool #

maximum :: Ord a => UpdateBatch b updateOperators a -> a #

minimum :: Ord a => UpdateBatch b updateOperators a -> a #

sum :: Num a => UpdateBatch b updateOperators a -> a #

product :: Num a => UpdateBatch b updateOperators a -> a #

(Backend b, Traversable updateOperators) => Traversable (UpdateBatch b updateOperators) Source # 
Instance details

Defined in Hasura.RQL.IR.Update.Batch

Methods

traverse :: Applicative f => (a -> f b0) -> UpdateBatch b updateOperators a -> f (UpdateBatch b updateOperators b0) #

sequenceA :: Applicative f => UpdateBatch b updateOperators (f a) -> f (UpdateBatch b updateOperators a) #

mapM :: Monad m => (a -> m b0) -> UpdateBatch b updateOperators a -> m (UpdateBatch b updateOperators b0) #

sequence :: Monad m => UpdateBatch b updateOperators (m a) -> m (UpdateBatch b updateOperators a) #

(Backend b, Functor updateOperators) => Functor (UpdateBatch b updateOperators) Source # 
Instance details

Defined in Hasura.RQL.IR.Update.Batch

Methods

fmap :: (a -> b0) -> UpdateBatch b updateOperators a -> UpdateBatch b updateOperators b0 #

(<$) :: a -> UpdateBatch b updateOperators b0 -> UpdateBatch b updateOperators a #

(Backend b, Show v, Show (updateOperators v), Show (AnnBoolExp b v)) => Show (UpdateBatch b updateOperators v) Source # 
Instance details

Defined in Hasura.RQL.IR.Update.Batch

Methods

showsPrec :: Int -> UpdateBatch b updateOperators v -> ShowS #

show :: UpdateBatch b updateOperators v -> String #

showList :: [UpdateBatch b updateOperators v] -> ShowS #

(Backend b, Eq v, Eq (updateOperators v), Eq (AnnBoolExp b v)) => Eq (UpdateBatch b updateOperators v) Source # 
Instance details

Defined in Hasura.RQL.IR.Update.Batch

Methods

(==) :: UpdateBatch b updateOperators v -> UpdateBatch b updateOperators v -> Bool #

(/=) :: UpdateBatch b updateOperators v -> UpdateBatch b updateOperators v -> Bool #

updateBatchIsEmpty :: UpdateBatch b updateOperators v -> Bool Source #

Are we actually updating anything in the batch?