Safe Haskell | None |
---|---|
Language | Haskell2010 |
Hasura.Backends.MSSQL.Types.Update
Description
MSSQL Types Update
This module defines the Update-related IR types specific to MSSQL.
Synopsis
- data BackendUpdate v = BackendUpdate {
- updateOperations :: HashMap ColumnName (UpdateOperator v)
- data UpdateOperator v
- type UpdateSet = HashMap ColumnName (UpdateOperator Expression)
- type UpdateOutput = Output Inserted
- data Update = Update {}
Documentation
data BackendUpdate v Source #
The MSSQL-specific data of an Update expression.
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.
Constructors
BackendUpdate | |
Fields
|
Instances
Functor BackendUpdate Source # | |
Defined in Hasura.Backends.MSSQL.Types.Update Methods fmap :: (a -> b) -> BackendUpdate a -> BackendUpdate b # (<$) :: a -> BackendUpdate b -> BackendUpdate a # | |
Foldable BackendUpdate Source # | |
Defined in Hasura.Backends.MSSQL.Types.Update Methods fold :: Monoid m => BackendUpdate m -> m # foldMap :: Monoid m => (a -> m) -> BackendUpdate a -> m # foldMap' :: Monoid m => (a -> m) -> BackendUpdate a -> m # foldr :: (a -> b -> b) -> b -> BackendUpdate a -> b # foldr' :: (a -> b -> b) -> b -> BackendUpdate a -> b # foldl :: (b -> a -> b) -> b -> BackendUpdate a -> b # foldl' :: (b -> a -> b) -> b -> BackendUpdate a -> b # foldr1 :: (a -> a -> a) -> BackendUpdate a -> a # foldl1 :: (a -> a -> a) -> BackendUpdate a -> a # toList :: BackendUpdate a -> [a] # null :: BackendUpdate a -> Bool # length :: BackendUpdate a -> Int # elem :: Eq a => a -> BackendUpdate a -> Bool # maximum :: Ord a => BackendUpdate a -> a # minimum :: Ord a => BackendUpdate a -> a # sum :: Num a => BackendUpdate a -> a # product :: Num a => BackendUpdate a -> a # | |
Traversable BackendUpdate Source # | |
Defined in Hasura.Backends.MSSQL.Types.Update Methods traverse :: Applicative f => (a -> f b) -> BackendUpdate a -> f (BackendUpdate b) # sequenceA :: Applicative f => BackendUpdate (f a) -> f (BackendUpdate a) # mapM :: Monad m => (a -> m b) -> BackendUpdate a -> m (BackendUpdate b) # sequence :: Monad m => BackendUpdate (m a) -> m (BackendUpdate a) # | |
Data v => Data (BackendUpdate v) Source # | |
Defined in Hasura.Backends.MSSQL.Types.Update Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BackendUpdate v -> c (BackendUpdate v) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (BackendUpdate v) # toConstr :: BackendUpdate v -> Constr # dataTypeOf :: BackendUpdate v -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (BackendUpdate v)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (BackendUpdate v)) # gmapT :: (forall b. Data b => b -> b) -> BackendUpdate v -> BackendUpdate v # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BackendUpdate v -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BackendUpdate v -> r # gmapQ :: (forall d. Data d => d -> u) -> BackendUpdate v -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> BackendUpdate v -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> BackendUpdate v -> m (BackendUpdate v) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BackendUpdate v -> m (BackendUpdate v) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BackendUpdate v -> m (BackendUpdate v) # | |
Generic (BackendUpdate v) Source # | |
Defined in Hasura.Backends.MSSQL.Types.Update Associated Types type Rep (BackendUpdate v) :: Type -> Type # Methods from :: BackendUpdate v -> Rep (BackendUpdate v) x # to :: Rep (BackendUpdate v) x -> BackendUpdate v # | |
type Rep (BackendUpdate v) Source # | |
Defined in Hasura.Backends.MSSQL.Types.Update type Rep (BackendUpdate v) = D1 ('MetaData "BackendUpdate" "Hasura.Backends.MSSQL.Types.Update" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "BackendUpdate" 'PrefixI 'True) (S1 ('MetaSel ('Just "updateOperations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (HashMap ColumnName (UpdateOperator v))))) |
data UpdateOperator v Source #
The various update operators
supported by MSSQL,
i.e. the _set
, _inc
operators that appear in the schema.
TODO: Docs for MSSQL! See Update Mutations User docs
Instances
type UpdateSet = HashMap ColumnName (UpdateOperator Expression) Source #
type UpdateOutput = Output Inserted Source #
UPDATE [table_alias] SET [table_alias].column = value
OUTPUT INSERTED.column INTO #updated
FROM [table_name] AS [table_alias] WHERE filter-expression
Constructors
Update | |
Fields |