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

Hasura.Backends.Postgres.Types.Update

Description

Postgres Types Update

This module defines the Update-related IR types specific to Postgres.

Synopsis

Documentation

data UpdateOpExpression v Source #

The various update operators supported by PostgreSQL, i.e. the _set, _inc operators that appear in the schema.

See Update Mutations User docs

Instances

Instances details
Foldable UpdateOpExpression Source # 
Instance details

Defined in Hasura.Backends.Postgres.Types.Update

Methods

fold :: Monoid m => UpdateOpExpression m -> m #

foldMap :: Monoid m => (a -> m) -> UpdateOpExpression a -> m #

foldMap' :: Monoid m => (a -> m) -> UpdateOpExpression a -> m #

foldr :: (a -> b -> b) -> b -> UpdateOpExpression a -> b #

foldr' :: (a -> b -> b) -> b -> UpdateOpExpression a -> b #

foldl :: (b -> a -> b) -> b -> UpdateOpExpression a -> b #

foldl' :: (b -> a -> b) -> b -> UpdateOpExpression a -> b #

foldr1 :: (a -> a -> a) -> UpdateOpExpression a -> a #

foldl1 :: (a -> a -> a) -> UpdateOpExpression a -> a #

toList :: UpdateOpExpression a -> [a] #

null :: UpdateOpExpression a -> Bool #

length :: UpdateOpExpression a -> Int #

elem :: Eq a => a -> UpdateOpExpression a -> Bool #

maximum :: Ord a => UpdateOpExpression a -> a #

minimum :: Ord a => UpdateOpExpression a -> a #

sum :: Num a => UpdateOpExpression a -> a #

product :: Num a => UpdateOpExpression a -> a #

Traversable UpdateOpExpression Source # 
Instance details

Defined in Hasura.Backends.Postgres.Types.Update

Functor UpdateOpExpression Source # 
Instance details

Defined in Hasura.Backends.Postgres.Types.Update

Data v => Data (UpdateOpExpression v) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Types.Update

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UpdateOpExpression v -> c (UpdateOpExpression v) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (UpdateOpExpression v) #

toConstr :: UpdateOpExpression v -> Constr #

dataTypeOf :: UpdateOpExpression v -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (UpdateOpExpression v)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (UpdateOpExpression v)) #

gmapT :: (forall b. Data b => b -> b) -> UpdateOpExpression v -> UpdateOpExpression v #

gmapQl :: (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 #

gmapQ :: (forall d. Data d => d -> u) -> UpdateOpExpression v -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UpdateOpExpression v -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UpdateOpExpression v -> m (UpdateOpExpression v) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UpdateOpExpression v -> m (UpdateOpExpression v) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UpdateOpExpression v -> m (UpdateOpExpression v) #

Generic (UpdateOpExpression v) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Types.Update

Associated Types

type Rep (UpdateOpExpression v) :: Type -> Type #

Show v => Show (UpdateOpExpression v) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Types.Update

Eq v => Eq (UpdateOpExpression v) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Types.Update

type Rep (UpdateOpExpression v) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Types.Update

data PgUpdateVariant pgKind v Source #

The different variants of updates that the Postgres backend supports.

This is parameterised over v which enables different phases of IR transformation to maintain the overall structure while enriching/transforming the data at the leaves.

Instances

Instances details
Backend ('Postgres pgKind) => Foldable (PgUpdateVariant pgKind) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Types.Update

Methods

fold :: Monoid m => PgUpdateVariant pgKind m -> m #

foldMap :: Monoid m => (a -> m) -> PgUpdateVariant pgKind a -> m #

foldMap' :: Monoid m => (a -> m) -> PgUpdateVariant pgKind a -> m #

foldr :: (a -> b -> b) -> b -> PgUpdateVariant pgKind a -> b #

foldr' :: (a -> b -> b) -> b -> PgUpdateVariant pgKind a -> b #

foldl :: (b -> a -> b) -> b -> PgUpdateVariant pgKind a -> b #

foldl' :: (b -> a -> b) -> b -> PgUpdateVariant pgKind a -> b #

foldr1 :: (a -> a -> a) -> PgUpdateVariant pgKind a -> a #

foldl1 :: (a -> a -> a) -> PgUpdateVariant pgKind a -> a #

toList :: PgUpdateVariant pgKind a -> [a] #

null :: PgUpdateVariant pgKind a -> Bool #

length :: PgUpdateVariant pgKind a -> Int #

elem :: Eq a => a -> PgUpdateVariant pgKind a -> Bool #

maximum :: Ord a => PgUpdateVariant pgKind a -> a #

minimum :: Ord a => PgUpdateVariant pgKind a -> a #

sum :: Num a => PgUpdateVariant pgKind a -> a #

product :: Num a => PgUpdateVariant pgKind a -> a #

Backend ('Postgres pgKind) => Traversable (PgUpdateVariant pgKind) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Types.Update

Methods

traverse :: Applicative f => (a -> f b) -> PgUpdateVariant pgKind a -> f (PgUpdateVariant pgKind b) #

sequenceA :: Applicative f => PgUpdateVariant pgKind (f a) -> f (PgUpdateVariant pgKind a) #

mapM :: Monad m => (a -> m b) -> PgUpdateVariant pgKind a -> m (PgUpdateVariant pgKind b) #

sequence :: Monad m => PgUpdateVariant pgKind (m a) -> m (PgUpdateVariant pgKind a) #

Backend ('Postgres pgKind) => Functor (PgUpdateVariant pgKind) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Types.Update

Methods

fmap :: (a -> b) -> PgUpdateVariant pgKind a -> PgUpdateVariant pgKind b #

(<$) :: a -> PgUpdateVariant pgKind b -> PgUpdateVariant pgKind a #

Show (UpdateBatch ('Postgres pgKind) UpdateOpExpression v) => Show (PgUpdateVariant pgKind v) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Types.Update

Methods

showsPrec :: Int -> PgUpdateVariant pgKind v -> ShowS #

show :: PgUpdateVariant pgKind v -> String #

showList :: [PgUpdateVariant pgKind v] -> ShowS #

Eq (UpdateBatch ('Postgres pgKind) UpdateOpExpression v) => Eq (PgUpdateVariant pgKind v) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Types.Update

Methods

(==) :: PgUpdateVariant pgKind v -> PgUpdateVariant pgKind v -> Bool #

(/=) :: PgUpdateVariant pgKind v -> PgUpdateVariant pgKind v -> Bool #

updateVariantIsEmpty :: PgUpdateVariant b v -> Bool Source #

Are we updating anything?