| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Hasura.Backends.Postgres.SQL.DML
Description
Postgres SQL DML
Provide types and combinators for defining Postgres SQL queries and mutations.
Synopsis
- data Select = Select {}
- mkSelect :: Select
- newtype LimitExp = LimitExp SQLExp
- newtype OffsetExp = OffsetExp SQLExp
- newtype OrderByExp = OrderByExp (NonEmpty OrderByItem)
- data OrderByItem = OrderByItem {}
- data OrderType
- data NullsOrder
- newtype GroupByExp = GroupByExp [SQLExp]
- newtype FromExp = FromExp [FromItem]
- mkIdenFromExp :: IsIdentifier a => a -> FromExp
- mkSimpleFromExp :: QualifiedTable -> FromExp
- mkSelFromExp :: Bool -> Select -> TableName -> FromItem
- mkRowExp :: [Extractor] -> SQLExp
- newtype HavingExp = HavingExp BoolExp
- newtype WhereFrag = WhereFrag {}
- mkSIdenExp :: IsIdentifier a => a -> SQLExp
- mkQIdenExp :: (IsIdentifier a, IsIdentifier b) => a -> b -> SQLExp
- data Qual
- mkQual :: QualifiedTable -> Qual
- mkQIdentifier :: (IsIdentifier a, IsIdentifier b) => a -> b -> QIdentifier
- mkQIdentifierTable :: IsIdentifier a => QualifiedTable -> a -> QIdentifier
- data QIdentifier = QIdentifier Qual Identifier
- data ColumnOp = ColumnOp {}
- newtype SQLOp = SQLOp {
- sqlOpTxt :: Text
- incOp :: SQLOp
- mulOp :: SQLOp
- jsonbPathOp :: SQLOp
- jsonbConcatOp :: SQLOp
- jsonbDeleteOp :: SQLOp
- jsonbDeleteAtPathOp :: SQLOp
- newtype TypeAnn = TypeAnn {
- unTypeAnn :: Text
- mkTypeAnn :: CollectableType PGScalarType -> TypeAnn
- intTypeAnn :: TypeAnn
- numericTypeAnn :: TypeAnn
- textTypeAnn :: TypeAnn
- textArrTypeAnn :: TypeAnn
- jsonTypeAnn :: TypeAnn
- jsonbTypeAnn :: TypeAnn
- boolTypeAnn :: TypeAnn
- data CountType
- = CTStar
- | CTSimple [PGCol]
- | CTDistinct [PGCol]
- newtype TupleExp = TupleExp [SQLExp]
- data SQLExp
- = SEPrep Int
- | SENull
- | SELit Text
- | SEUnsafe Text
- | SESelect Select
- | SEStar (Maybe Qual)
- | SEIdentifier Identifier
- | SERowIdentifier Identifier
- | SEQIdentifier QIdentifier
- | SEFnApp Text [SQLExp] (Maybe OrderByExp)
- | SEOpApp SQLOp [SQLExp]
- | SETyAnn SQLExp TypeAnn
- | SECond BoolExp SQLExp SQLExp
- | SEBool BoolExp
- | SEExcluded Identifier
- | SEArray [SQLExp]
- | SEArrayIndex SQLExp SQLExp
- | SETuple TupleExp
- | SECount CountType
- | SENamedArg Identifier SQLExp
- | SEFunction FunctionExp
- newtype ColumnAlias = ColumnAlias {}
- toColumnAlias :: IsIdentifier a => a -> ColumnAlias
- columnAliasToSqlWithAs :: ColumnAlias -> Builder
- columnAliasToSqlWithoutAs :: ColumnAlias -> Builder
- newtype TableAlias = TableAlias {}
- toTableAlias :: IsIdentifier a => a -> TableAlias
- tableAliasToSqlWithAs :: TableAlias -> Builder
- tableAliasToSqlWithoutAs :: TableAlias -> Builder
- countStar :: SQLExp
- intToSQLExp :: Int -> SQLExp
- int64ToSQLExp :: Int64 -> SQLExp
- data Extractor = Extractor SQLExp (Maybe ColumnAlias)
- mkSQLOpExp :: SQLOp -> SQLExp -> SQLExp -> SQLExp
- columnDefaultValue :: SQLExp
- handleIfNull :: SQLExp -> SQLExp -> SQLExp
- applyJsonBuildObj :: [SQLExp] -> SQLExp
- applyJsonBuildArray :: [SQLExp] -> SQLExp
- applyRowToJson :: [Extractor] -> SQLExp
- applyUppercase :: SQLExp -> SQLExp
- mkExtr :: IsIdentifier a => a -> Extractor
- data DistinctExpr
- data FunctionArgs = FunctionArgs {
- fasPostional :: [SQLExp]
- fasNamed :: HashMap Text SQLExp
- data FunctionDefinitionListItem = FunctionDefinitionListItem {}
- data FunctionAlias = FunctionAlias {}
- mkFunctionAlias :: TableAlias -> Maybe [(ColumnAlias, PGScalarType)] -> FunctionAlias
- data FunctionExp = FunctionExp {}
- data FromItem
- mkSelFromItem :: Select -> TableAlias -> FromItem
- mkSelectWithFromItem :: SelectWithG Select -> TableAlias -> FromItem
- mkLateralFromItem :: Select -> TableAlias -> FromItem
- newtype Lateral = Lateral Bool
- data JoinExpr = JoinExpr {}
- data JoinType
- data JoinCond
- = JoinOn BoolExp
- | JoinUsing [Identifier]
- data BoolExp
- simplifyBoolExp :: BoolExp -> BoolExp
- mkExists :: FromItem -> BoolExp -> BoolExp
- data BinOp
- data CompareOp
- data SQLDelete = SQLDelete {}
- data SQLUpdate = SQLUpdate {}
- newtype SetExp = SetExp [SetExpItem]
- newtype SetExpItem = SetExpItem (PGCol, SQLExp)
- buildUpsertSetExp :: [PGCol] -> HashMap PGCol SQLExp -> SetExp
- newtype UsingExp = UsingExp [TableName]
- newtype RetExp = RetExp [Extractor]
- selectStar :: Extractor
- selectStar' :: Qual -> Extractor
- returningStar :: RetExp
- data SQLConflictTarget
- data SQLConflict
- newtype ValuesExp = ValuesExp {
- getValuesExp :: [TupleExp]
- data SQLInsert = SQLInsert {
- siTable :: QualifiedTable
- siCols :: [PGCol]
- siValues :: ValuesExp
- siConflict :: Maybe SQLConflict
- siRet :: Maybe RetExp
- data TopLevelCTE
- data SelectWithG statement = SelectWith {
- swCTEs :: [(TableAlias, statement)]
- swSelect :: Select
- type SelectWith = SelectWithG TopLevelCTE
- (<+>) :: ToSQL a => Text -> [a] -> Builder
Documentation
An select statement that does not require mutation CTEs.
See SelectWithG or SelectWith for select statements with mutations as CTEs.
Constructors
| Select | |
Fields
| |
Instances
Instances
| Eq LimitExp Source # | |
| Data LimitExp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LimitExp -> c LimitExp # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LimitExp # toConstr :: LimitExp -> Constr # dataTypeOf :: LimitExp -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LimitExp) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LimitExp) # gmapT :: (forall b. Data b => b -> b) -> LimitExp -> LimitExp # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LimitExp -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LimitExp -> r # gmapQ :: (forall d. Data d => d -> u) -> LimitExp -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> LimitExp -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LimitExp -> m LimitExp # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LimitExp -> m LimitExp # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LimitExp -> m LimitExp # | |
| Show LimitExp Source # | |
| NFData LimitExp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Hashable LimitExp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Cacheable LimitExp Source # | |
| ToSQL LimitExp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
Instances
| Eq OffsetExp Source # | |
| Data OffsetExp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OffsetExp -> c OffsetExp # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OffsetExp # toConstr :: OffsetExp -> Constr # dataTypeOf :: OffsetExp -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OffsetExp) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OffsetExp) # gmapT :: (forall b. Data b => b -> b) -> OffsetExp -> OffsetExp # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OffsetExp -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OffsetExp -> r # gmapQ :: (forall d. Data d => d -> u) -> OffsetExp -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> OffsetExp -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> OffsetExp -> m OffsetExp # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OffsetExp -> m OffsetExp # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OffsetExp -> m OffsetExp # | |
| Show OffsetExp Source # | |
| NFData OffsetExp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Hashable OffsetExp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Cacheable OffsetExp Source # | |
| ToSQL OffsetExp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
newtype OrderByExp Source #
Constructors
| OrderByExp (NonEmpty OrderByItem) |
Instances
data OrderByItem Source #
Constructors
| OrderByItem | |
Fields | |
Instances
Order by ascending or descending
Instances
| Eq OrderType Source # | |
| Data OrderType Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OrderType -> c OrderType # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OrderType # toConstr :: OrderType -> Constr # dataTypeOf :: OrderType -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OrderType) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OrderType) # gmapT :: (forall b. Data b => b -> b) -> OrderType -> OrderType # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OrderType -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OrderType -> r # gmapQ :: (forall d. Data d => d -> u) -> OrderType -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> OrderType -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> OrderType -> m OrderType # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OrderType -> m OrderType # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OrderType -> m OrderType # | |
| Show OrderType Source # | |
| Generic OrderType Source # | |
| NFData OrderType Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Hashable OrderType Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| FromJSON OrderType Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| ToJSON OrderType Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods toEncoding :: OrderType -> Encoding toJSONList :: [OrderType] -> Value toEncodingList :: [OrderType] -> Encoding | |
| Cacheable OrderType Source # | |
| ToSQL OrderType Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| type Rep OrderType Source # | |
data NullsOrder Source #
Constructors
| NullsFirst | |
| NullsLast |
Instances
newtype GroupByExp Source #
Constructors
| GroupByExp [SQLExp] |
Instances
Instances
| Eq FromExp Source # | |
| Data FromExp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FromExp -> c FromExp # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FromExp # toConstr :: FromExp -> Constr # dataTypeOf :: FromExp -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FromExp) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FromExp) # gmapT :: (forall b. Data b => b -> b) -> FromExp -> FromExp # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FromExp -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FromExp -> r # gmapQ :: (forall d. Data d => d -> u) -> FromExp -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> FromExp -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FromExp -> m FromExp # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FromExp -> m FromExp # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FromExp -> m FromExp # | |
| Show FromExp Source # | |
| NFData FromExp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Hashable FromExp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Cacheable FromExp Source # | |
| ToSQL FromExp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
mkIdenFromExp :: IsIdentifier a => a -> FromExp Source #
Instances
| Eq HavingExp Source # | |
| Data HavingExp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HavingExp -> c HavingExp # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HavingExp # toConstr :: HavingExp -> Constr # dataTypeOf :: HavingExp -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HavingExp) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HavingExp) # gmapT :: (forall b. Data b => b -> b) -> HavingExp -> HavingExp # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HavingExp -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HavingExp -> r # gmapQ :: (forall d. Data d => d -> u) -> HavingExp -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HavingExp -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HavingExp -> m HavingExp # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HavingExp -> m HavingExp # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HavingExp -> m HavingExp # | |
| Show HavingExp Source # | |
| NFData HavingExp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Hashable HavingExp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Cacheable HavingExp Source # | |
| ToSQL HavingExp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
Constructors
| WhereFrag | |
Fields | |
Instances
| Eq WhereFrag Source # | |
| Data WhereFrag Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WhereFrag -> c WhereFrag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c WhereFrag # toConstr :: WhereFrag -> Constr # dataTypeOf :: WhereFrag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c WhereFrag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WhereFrag) # gmapT :: (forall b. Data b => b -> b) -> WhereFrag -> WhereFrag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WhereFrag -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WhereFrag -> r # gmapQ :: (forall d. Data d => d -> u) -> WhereFrag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> WhereFrag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> WhereFrag -> m WhereFrag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WhereFrag -> m WhereFrag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WhereFrag -> m WhereFrag # | |
| Show WhereFrag Source # | |
| NFData WhereFrag Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Hashable WhereFrag Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Cacheable WhereFrag Source # | |
| ToSQL WhereFrag Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
mkSIdenExp :: IsIdentifier a => a -> SQLExp Source #
mkQIdenExp :: (IsIdentifier a, IsIdentifier b) => a -> b -> SQLExp Source #
Constructors
| QualifiedIdentifier Identifier (Maybe TypeAnn) | |
| QualTable QualifiedTable | |
| QualVar Text |
Instances
| Eq Qual Source # | |
| Data Qual Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Qual -> c Qual # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Qual # dataTypeOf :: Qual -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Qual) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Qual) # gmapT :: (forall b. Data b => b -> b) -> Qual -> Qual # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Qual -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Qual -> r # gmapQ :: (forall d. Data d => d -> u) -> Qual -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Qual -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Qual -> m Qual # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Qual -> m Qual # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Qual -> m Qual # | |
| Show Qual Source # | |
| Generic Qual Source # | |
| NFData Qual Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Hashable Qual Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Cacheable Qual Source # | |
| ToSQL Qual Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| type Rep Qual Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML type Rep Qual = D1 ('MetaData "Qual" "Hasura.Backends.Postgres.SQL.DML" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "QualifiedIdentifier" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Identifier) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe TypeAnn))) :+: (C1 ('MetaCons "QualTable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 QualifiedTable)) :+: C1 ('MetaCons "QualVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))) | |
mkQual :: QualifiedTable -> Qual Source #
mkQIdentifier :: (IsIdentifier a, IsIdentifier b) => a -> b -> QIdentifier Source #
mkQIdentifierTable :: IsIdentifier a => QualifiedTable -> a -> QIdentifier Source #
data QIdentifier Source #
Constructors
| QIdentifier Qual Identifier |
Instances
Instances
| Eq ColumnOp Source # | |
| Data ColumnOp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ColumnOp -> c ColumnOp # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ColumnOp # toConstr :: ColumnOp -> Constr # dataTypeOf :: ColumnOp -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ColumnOp) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ColumnOp) # gmapT :: (forall b. Data b => b -> b) -> ColumnOp -> ColumnOp # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ColumnOp -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ColumnOp -> r # gmapQ :: (forall d. Data d => d -> u) -> ColumnOp -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ColumnOp -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ColumnOp -> m ColumnOp # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ColumnOp -> m ColumnOp # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ColumnOp -> m ColumnOp # | |
| Show ColumnOp Source # | |
| Generic ColumnOp Source # | |
| NFData ColumnOp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Hashable ColumnOp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Cacheable ColumnOp Source # | |
| type Rep ColumnOp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML type Rep ColumnOp = D1 ('MetaData "ColumnOp" "Hasura.Backends.Postgres.SQL.DML" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "ColumnOp" 'PrefixI 'True) (S1 ('MetaSel ('Just "_colOp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SQLOp) :*: S1 ('MetaSel ('Just "_colExp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SQLExp))) | |
Instances
| Eq SQLOp Source # | |
| Data SQLOp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SQLOp -> c SQLOp # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SQLOp # dataTypeOf :: SQLOp -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SQLOp) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SQLOp) # gmapT :: (forall b. Data b => b -> b) -> SQLOp -> SQLOp # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SQLOp -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SQLOp -> r # gmapQ :: (forall d. Data d => d -> u) -> SQLOp -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SQLOp -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SQLOp -> m SQLOp # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SQLOp -> m SQLOp # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SQLOp -> m SQLOp # | |
| Show SQLOp Source # | |
| NFData SQLOp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Hashable SQLOp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Cacheable SQLOp Source # | |
jsonbPathOp :: SQLOp Source #
Instances
| Eq TypeAnn Source # | |
| Data TypeAnn Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TypeAnn -> c TypeAnn # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TypeAnn # toConstr :: TypeAnn -> Constr # dataTypeOf :: TypeAnn -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TypeAnn) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TypeAnn) # gmapT :: (forall b. Data b => b -> b) -> TypeAnn -> TypeAnn # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TypeAnn -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TypeAnn -> r # gmapQ :: (forall d. Data d => d -> u) -> TypeAnn -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TypeAnn -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TypeAnn -> m TypeAnn # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TypeAnn -> m TypeAnn # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TypeAnn -> m TypeAnn # | |
| Show TypeAnn Source # | |
| NFData TypeAnn Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Hashable TypeAnn Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Cacheable TypeAnn Source # | |
| ToSQL TypeAnn Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
intTypeAnn :: TypeAnn Source #
Constructors
| CTStar | |
| CTSimple [PGCol] | |
| CTDistinct [PGCol] |
Instances
Instances
| Eq TupleExp Source # | |
| Data TupleExp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TupleExp -> c TupleExp # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TupleExp # toConstr :: TupleExp -> Constr # dataTypeOf :: TupleExp -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TupleExp) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TupleExp) # gmapT :: (forall b. Data b => b -> b) -> TupleExp -> TupleExp # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TupleExp -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TupleExp -> r # gmapQ :: (forall d. Data d => d -> u) -> TupleExp -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TupleExp -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TupleExp -> m TupleExp # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TupleExp -> m TupleExp # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TupleExp -> m TupleExp # | |
| Show TupleExp Source # | |
| NFData TupleExp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Hashable TupleExp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Cacheable TupleExp Source # | |
| ToSQL TupleExp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
Constructors
| SEPrep Int | |
| SENull | |
| SELit Text | |
| SEUnsafe Text | |
| SESelect Select | |
| SEStar (Maybe Qual) | all fields ( |
| SEIdentifier Identifier | A column name |
| SERowIdentifier Identifier | SEIdentifier and SERowIdentifier are distinguished for easier rewrite rules |
| SEQIdentifier QIdentifier | A qualified column name |
| SEFnApp Text [SQLExp] (Maybe OrderByExp) | this is used to apply a sql function to an expression. The |
| SEOpApp SQLOp [SQLExp] | |
| SETyAnn SQLExp TypeAnn | |
| SECond BoolExp SQLExp SQLExp | |
| SEBool BoolExp | |
| SEExcluded Identifier | |
| SEArray [SQLExp] | |
| SEArrayIndex SQLExp SQLExp | |
| SETuple TupleExp | |
| SECount CountType | |
| SENamedArg Identifier SQLExp | |
| SEFunction FunctionExp |
Instances
newtype ColumnAlias Source #
Represents an alias assignment for a column
Constructors
| ColumnAlias | |
Fields | |
Instances
toColumnAlias :: IsIdentifier a => a -> ColumnAlias Source #
columnAliasToSqlWithAs :: ColumnAlias -> Builder Source #
Convert a column alias assignment to SQL _with_ AS prefix
columnAliasToSqlWithoutAs :: ColumnAlias -> Builder Source #
Convert a column alias assignment to SQL _without_ AS prefix
newtype TableAlias Source #
Represents an alias assignment for a table, relation or row
Constructors
| TableAlias | |
Fields | |
Instances
toTableAlias :: IsIdentifier a => a -> TableAlias Source #
tableAliasToSqlWithAs :: TableAlias -> Builder Source #
Convert a table alias assignment to SQL _with_ AS prefix
tableAliasToSqlWithoutAs :: TableAlias -> Builder Source #
Convert a table alias assignment to SQL _without_ AS prefix
intToSQLExp :: Int -> SQLExp Source #
int64ToSQLExp :: Int64 -> SQLExp Source #
Extractor can be used to apply Postgres alias to a column
Constructors
| Extractor SQLExp (Maybe ColumnAlias) |
Instances
applyJsonBuildObj :: [SQLExp] -> SQLExp Source #
applyJsonBuildArray :: [SQLExp] -> SQLExp Source #
applyRowToJson :: [Extractor] -> SQLExp Source #
applyUppercase :: SQLExp -> SQLExp Source #
mkExtr :: IsIdentifier a => a -> Extractor Source #
data DistinctExpr Source #
Constructors
| DistinctSimple | |
| DistinctOn [SQLExp] |
Instances
data FunctionArgs Source #
Constructors
| FunctionArgs | |
Fields
| |
Instances
data FunctionDefinitionListItem Source #
Constructors
| FunctionDefinitionListItem | |
Fields | |
Instances
data FunctionAlias Source #
We can alias the result of a function call that returns a SETOF RECORD
by naming the result relation, and the columns and their types. For example:
SELECT * FROM function_returns_record(arg1, arg2 ...) AS relation_name(column_1 column_1_type, column_2 column_2_type, ...)
Note: a function that returns a table (instead of a record) cannot name the types as seen in the above example.
Constructors
| FunctionAlias | |
Fields | |
Instances
mkFunctionAlias :: TableAlias -> Maybe [(ColumnAlias, PGScalarType)] -> FunctionAlias Source #
data FunctionExp Source #
A function call
Constructors
| FunctionExp | |
Fields | |
Instances
See from_item in https://www.postgresql.org/docs/current/sql-select.html
Constructors
| FISimple QualifiedTable (Maybe TableAlias) | A simple table |
| FIIdentifier Identifier | An identifier (from CTEs) |
| FIFunc FunctionExp | A function call (that should return a relation ( |
| FIUnnest [SQLExp] TableAlias [ColumnAlias] |
We have: * The unnest function arguments * The relation alias * A list of column aliases See |
| FISelect Lateral Select TableAlias | |
| FISelectWith Lateral (SelectWithG Select) TableAlias | |
| FIValues ValuesExp TableAlias (Maybe [ColumnAlias]) | |
| FIJoin JoinExpr |
Instances
mkSelFromItem :: Select -> TableAlias -> FromItem Source #
mkLateralFromItem :: Select -> TableAlias -> FromItem Source #
Instances
| Eq Lateral Source # | |
| Data Lateral Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Lateral -> c Lateral # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Lateral # toConstr :: Lateral -> Constr # dataTypeOf :: Lateral -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Lateral) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Lateral) # gmapT :: (forall b. Data b => b -> b) -> Lateral -> Lateral # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Lateral -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Lateral -> r # gmapQ :: (forall d. Data d => d -> u) -> Lateral -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Lateral -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Lateral -> m Lateral # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Lateral -> m Lateral # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Lateral -> m Lateral # | |
| Show Lateral Source # | |
| NFData Lateral Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Hashable Lateral Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Cacheable Lateral Source # | |
| ToSQL Lateral Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
Constructors
| JoinExpr | |
Instances
Constructors
| Inner | |
| LeftOuter | |
| RightOuter | |
| FullOuter |
Instances
| Eq JoinType Source # | |
| Data JoinType Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> JoinType -> c JoinType # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c JoinType # toConstr :: JoinType -> Constr # dataTypeOf :: JoinType -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c JoinType) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c JoinType) # gmapT :: (forall b. Data b => b -> b) -> JoinType -> JoinType # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> JoinType -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> JoinType -> r # gmapQ :: (forall d. Data d => d -> u) -> JoinType -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> JoinType -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> JoinType -> m JoinType # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> JoinType -> m JoinType # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> JoinType -> m JoinType # | |
| Show JoinType Source # | |
| Generic JoinType Source # | |
| NFData JoinType Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Hashable JoinType Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Cacheable JoinType Source # | |
| ToSQL JoinType Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| type Rep JoinType Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML type Rep JoinType = D1 ('MetaData "JoinType" "Hasura.Backends.Postgres.SQL.DML" "graphql-engine-1.0.0-inplace" 'False) ((C1 ('MetaCons "Inner" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LeftOuter" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RightOuter" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FullOuter" 'PrefixI 'False) (U1 :: Type -> Type))) | |
Constructors
| JoinOn BoolExp | |
| JoinUsing [Identifier] |
Instances
| Eq JoinCond Source # | |
| Data JoinCond Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> JoinCond -> c JoinCond # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c JoinCond # toConstr :: JoinCond -> Constr # dataTypeOf :: JoinCond -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c JoinCond) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c JoinCond) # gmapT :: (forall b. Data b => b -> b) -> JoinCond -> JoinCond # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> JoinCond -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> JoinCond -> r # gmapQ :: (forall d. Data d => d -> u) -> JoinCond -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> JoinCond -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> JoinCond -> m JoinCond # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> JoinCond -> m JoinCond # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> JoinCond -> m JoinCond # | |
| Show JoinCond Source # | |
| Generic JoinCond Source # | |
| NFData JoinCond Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Hashable JoinCond Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Cacheable JoinCond Source # | |
| ToSQL JoinCond Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| type Rep JoinCond Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML type Rep JoinCond = D1 ('MetaData "JoinCond" "Hasura.Backends.Postgres.SQL.DML" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "JoinOn" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 BoolExp)) :+: C1 ('MetaCons "JoinUsing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Identifier]))) | |
Constructors
Instances
simplifyBoolExp :: BoolExp -> BoolExp Source #
Instances
| Eq BinOp Source # | |
| Data BinOp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BinOp -> c BinOp # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BinOp # dataTypeOf :: BinOp -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c BinOp) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BinOp) # gmapT :: (forall b. Data b => b -> b) -> BinOp -> BinOp # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BinOp -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BinOp -> r # gmapQ :: (forall d. Data d => d -> u) -> BinOp -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> BinOp -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> BinOp -> m BinOp # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BinOp -> m BinOp # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BinOp -> m BinOp # | |
| Show BinOp Source # | |
| Generic BinOp Source # | |
| NFData BinOp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Hashable BinOp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Cacheable BinOp Source # | |
| ToSQL BinOp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| type Rep BinOp Source # | |
Constructors
| SEQ | |
| SGT | |
| SLT | |
| SIN | |
| SNE | |
| SGTE | |
| SLTE | |
| SNIN | |
| SLIKE | |
| SNLIKE | |
| SILIKE | |
| SNILIKE | |
| SSIMILAR | |
| SNSIMILAR | |
| SREGEX | |
| SIREGEX | |
| SNREGEX | |
| SNIREGEX | |
| SContains | |
| SContainedIn | |
| SHasKey | |
| SHasKeysAny | |
| SHasKeysAll | |
| SMatchesFulltext |
Instances
| Eq CompareOp Source # | |
| Data CompareOp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CompareOp -> c CompareOp # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CompareOp # toConstr :: CompareOp -> Constr # dataTypeOf :: CompareOp -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CompareOp) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CompareOp) # gmapT :: (forall b. Data b => b -> b) -> CompareOp -> CompareOp # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CompareOp -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CompareOp -> r # gmapQ :: (forall d. Data d => d -> u) -> CompareOp -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> CompareOp -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CompareOp -> m CompareOp # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CompareOp -> m CompareOp # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CompareOp -> m CompareOp # | |
| Show CompareOp Source # | |
| Generic CompareOp Source # | |
| NFData CompareOp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Hashable CompareOp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Cacheable CompareOp Source # | |
| ToSQL CompareOp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| type Rep CompareOp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML type Rep CompareOp = D1 ('MetaData "CompareOp" "Hasura.Backends.Postgres.SQL.DML" "graphql-engine-1.0.0-inplace" 'False) ((((C1 ('MetaCons "SEQ" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SGT" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SLT" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "SIN" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SNE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SGTE" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "SLTE" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SNIN" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SLIKE" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "SNLIKE" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SILIKE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SNILIKE" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "SSIMILAR" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SNSIMILAR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SREGEX" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "SIREGEX" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SNREGEX" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SNIREGEX" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "SContains" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SContainedIn" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SHasKey" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "SHasKeysAny" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SHasKeysAll" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SMatchesFulltext" 'PrefixI 'False) (U1 :: Type -> Type)))))) | |
Constructors
| SQLDelete | |
Constructors
| SQLUpdate | |
Constructors
| SetExp [SetExpItem] |
newtype SetExpItem Source #
Constructors
| SetExpItem (PGCol, SQLExp) |
Instances
| Eq SetExpItem Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Show SetExpItem Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods showsPrec :: Int -> SetExpItem -> ShowS # show :: SetExpItem -> String # showList :: [SetExpItem] -> ShowS # | |
| ToSQL SetExpItem Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods toSQL :: SetExpItem -> Builder Source # | |
selectStar' :: Qual -> Extractor Source #
data SQLConflictTarget Source #
Constructors
| SQLColumn [PGCol] | |
| SQLConstraint ConstraintName |
Instances
| Eq SQLConflictTarget Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods (==) :: SQLConflictTarget -> SQLConflictTarget -> Bool # (/=) :: SQLConflictTarget -> SQLConflictTarget -> Bool # | |
| Show SQLConflictTarget Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods showsPrec :: Int -> SQLConflictTarget -> ShowS # show :: SQLConflictTarget -> String # showList :: [SQLConflictTarget] -> ShowS # | |
| ToSQL SQLConflictTarget Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods toSQL :: SQLConflictTarget -> Builder Source # | |
data SQLConflict Source #
Constructors
| DoNothing (Maybe SQLConflictTarget) | |
| Update SQLConflictTarget SetExp (Maybe WhereFrag) |
Instances
| Eq SQLConflict Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Show SQLConflict Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods showsPrec :: Int -> SQLConflict -> ShowS # show :: SQLConflict -> String # showList :: [SQLConflict] -> ShowS # | |
| ToSQL SQLConflict Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods toSQL :: SQLConflict -> Builder Source # | |
Constructors
| ValuesExp | |
Fields
| |
Instances
| Eq ValuesExp Source # | |
| Data ValuesExp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ValuesExp -> c ValuesExp # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ValuesExp # toConstr :: ValuesExp -> Constr # dataTypeOf :: ValuesExp -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ValuesExp) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ValuesExp) # gmapT :: (forall b. Data b => b -> b) -> ValuesExp -> ValuesExp # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ValuesExp -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ValuesExp -> r # gmapQ :: (forall d. Data d => d -> u) -> ValuesExp -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ValuesExp -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ValuesExp -> m ValuesExp # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ValuesExp -> m ValuesExp # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ValuesExp -> m ValuesExp # | |
| Show ValuesExp Source # | |
| NFData ValuesExp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Hashable ValuesExp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Cacheable ValuesExp Source # | |
| ToSQL ValuesExp Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
Constructors
| SQLInsert | |
Fields
| |
data TopLevelCTE Source #
Top-level Common Table Expression statement.
A top level CTE can be a query or a mutation statement.
Postgres supports mutations only in top-level CTEs. See https://www.postgresql.org/docs/current/queries-with.html#QUERIES-WITH-MODIFYING
Instances
| Eq TopLevelCTE Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Show TopLevelCTE Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods showsPrec :: Int -> TopLevelCTE -> ShowS # show :: TopLevelCTE -> String # showList :: [TopLevelCTE] -> ShowS # | |
| ToSQL TopLevelCTE Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods toSQL :: TopLevelCTE -> Builder Source # | |
data SelectWithG statement Source #
A SELECT statement with Common Table Expressions.
https://www.postgresql.org/docs/current/queries-with.html
These CTEs are determined by the statement parameter.
Currently they are either TopLevelCTE, which allow for a query or mutation statement,
or Select, which only allow for querying results.
The distinction is required because Postgres only supports mutations in CTEs at the top level. See https://www.postgresql.org/docs/current/queries-with.html#QUERIES-WITH-MODIFYING
Constructors
| SelectWith | |
Fields
| |
Instances
| Eq statement => Eq (SelectWithG statement) Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods (==) :: SelectWithG statement -> SelectWithG statement -> Bool # (/=) :: SelectWithG statement -> SelectWithG statement -> Bool # | |
| Data statement => Data (SelectWithG statement) Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SelectWithG statement -> c (SelectWithG statement) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (SelectWithG statement) # toConstr :: SelectWithG statement -> Constr # dataTypeOf :: SelectWithG statement -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (SelectWithG statement)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (SelectWithG statement)) # gmapT :: (forall b. Data b => b -> b) -> SelectWithG statement -> SelectWithG statement # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SelectWithG statement -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SelectWithG statement -> r # gmapQ :: (forall d. Data d => d -> u) -> SelectWithG statement -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SelectWithG statement -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SelectWithG statement -> m (SelectWithG statement) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SelectWithG statement -> m (SelectWithG statement) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SelectWithG statement -> m (SelectWithG statement) # | |
| Show statement => Show (SelectWithG statement) Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods showsPrec :: Int -> SelectWithG statement -> ShowS # show :: SelectWithG statement -> String # showList :: [SelectWithG statement] -> ShowS # | |
| Generic (SelectWithG statement) Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Associated Types type Rep (SelectWithG statement) :: Type -> Type # Methods from :: SelectWithG statement -> Rep (SelectWithG statement) x # to :: Rep (SelectWithG statement) x -> SelectWithG statement # | |
| NFData v => NFData (SelectWithG v) Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods rnf :: SelectWithG v -> () # | |
| Hashable v => Hashable (SelectWithG v) Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML | |
| Cacheable v => Cacheable (SelectWithG v) Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods unchanged :: Accesses -> SelectWithG v -> SelectWithG v -> Bool Source # | |
| ToSQL v => ToSQL (SelectWithG v) Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML Methods toSQL :: SelectWithG v -> Builder Source # | |
| type Rep (SelectWithG statement) Source # | |
Defined in Hasura.Backends.Postgres.SQL.DML type Rep (SelectWithG statement) = D1 ('MetaData "SelectWithG" "Hasura.Backends.Postgres.SQL.DML" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "SelectWith" 'PrefixI 'True) (S1 ('MetaSel ('Just "swCTEs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [(TableAlias, statement)]) :*: S1 ('MetaSel ('Just "swSelect") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Select))) | |
type SelectWith = SelectWithG TopLevelCTE Source #
A top-level select with CTEs.