| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Hasura.RQL.IR.Select
Description
This modules defines the tree of Select types: how we represent a query internally, from its top
level QueryDB down to each individual field. Most of those types have three type arguments:
b: BackendType The backend that is targeted by that specific select (Postgres Vanilla, MSSQL...); we use the type families in the Backend class to decide how different parts of the IR are represented in different backends.
v: Type
The type of the leaf values in our AST; used almost exclusively for column values, over which
queries can be parameterized. The output of the parser phase will use UnpreparedValue b for
the leaves, and most backends will then transform the AST to interpret those values and
consequently change v to be SQLExpression b
r: BackendType -> Type
Joins across backends mean that the aforementioned b parameter won't be the same throughout
the entire tree; at some point we will have an AnyBackend used to encapsulate a branch that
uses a different b. We still want, however, to be able to parameterize the values of the
leaves in that separate branch, and that's what the r parameter is for. We also use
UnpreparedValue here during the parsing phase, meaning all leaf values will be
UnpreparedValue b for their respective backend b, and most backends will then transform
their AST, cutting all such remote branches, and therefore using Const Void for r.
Synopsis
- data QueryDB (b :: BackendType) (r :: Type) v
- = QDBMultipleRows (AnnSimpleSelectG b r v)
- | QDBSingleRow (AnnSimpleSelectG b r v)
- | QDBAggregation (AnnAggregateSelectG b r v)
- | QDBConnection (ConnectionSelect b r v)
- | QDBStreamMultipleRows (AnnSimpleStreamSelectG b r v)
- type AnnSimpleSelectG b r v = AnnSelectG b (AnnFieldG b r) v
- type AnnAggregateSelectG b r v = AnnSelectG b (TableAggregateFieldG b r) v
- type AnnSimpleStreamSelectG b r v = AnnSelectStreamG b (AnnFieldG b r) v
- type AnnSimpleSelect b = AnnSimpleSelectG b Void (SQLExpression b)
- type AnnAggregateSelect b = AnnAggregateSelectG b Void (SQLExpression b)
- type AnnSimpleStreamSelect b = AnnSimpleStreamSelectG b Void (SQLExpression b)
- data ConnectionSelect (b :: BackendType) (r :: Type) v = ConnectionSelect {
- _csXRelay :: XRelay b
- _csPrimaryKeyColumns :: PrimaryKeyColumns b
- _csSplit :: Maybe (NonEmpty (ConnectionSplit b v))
- _csSlice :: Maybe ConnectionSlice
- _csSelect :: AnnSelectG b (ConnectionField b r) v
- data ConnectionSplit (b :: BackendType) v = ConnectionSplit {
- _csKind :: ConnectionSplitKind
- _csValue :: v
- _csOrderBy :: OrderByItemG b (AnnotatedOrderByElement b v)
- data ConnectionSlice
- data ConnectionSplitKind
- data RemoteRelationshipSelect b r = RemoteRelationshipSelect {
- _rrsLHSJoinFields :: HashMap FieldName (DBJoinField b)
- _rrsRelationship :: r
- data AnnFieldG (b :: BackendType) (r :: Type) v
- = AFColumn (AnnColumnField b v)
- | AFObjectRelation (ObjectRelationSelectG b r v)
- | AFArrayRelation (ArraySelectG b r v)
- | AFComputedField (XComputedField b) ComputedFieldName (ComputedFieldSelect b r v)
- | AFRemote (RemoteRelationshipSelect b r)
- | AFNodeId (XRelay b) SourceName (TableName b) (PrimaryKeyColumns b)
- | AFExpression Text
- | AFNestedObject (AnnNestedObjectSelectG b r v)
- | AFNestedArray (XNestedObjects b) (AnnNestedArraySelectG b r v)
- type AnnField b = AnnFieldG b Void (SQLExpression b)
- type AnnFields b = AnnFieldsG b Void (SQLExpression b)
- mkAnnColumnField :: Column backend -> ColumnType backend -> AnnRedactionExp backend v -> Maybe (ScalarSelectionArguments backend) -> AnnFieldG backend r v
- mkAnnColumnFieldAsText :: ColumnInfo backend -> AnnFieldG backend r v
- traverseSourceRelationshipSelection :: (Applicative f, Backend backend) => (vf backend -> f (vg backend)) -> SourceRelationshipSelection backend r vf -> f (SourceRelationshipSelection backend r vg)
- data TableAggregateFieldG (b :: BackendType) (r :: Type) v
- = TAFAgg (AggregateFields b v)
- | TAFNodes (XNodesAgg b) (AnnFieldsG b r v)
- | TAFGroupBy (XGroupBy b) (GroupByG b r v)
- | TAFExp Text
- data AggregateField (b :: BackendType) v
- data AggregateOp (b :: BackendType) v = AggregateOp {
- _aoOp :: Text
- _aoFields :: SelectionFields b v
- data GroupByG (b :: BackendType) r v = GroupByG {
- _gbgKeys :: [GroupKeyField b]
- _gbgFields :: Fields (GroupByField b r v)
- data GroupByField (b :: BackendType) r v
- = GBFGroupKey (Fields (GroupKeyField b))
- | GBFAggregate (AggregateFields b v)
- | GBFNodes (AnnFieldsG b r v)
- | GBFExp Text
- data GroupKeyField (b :: BackendType)
- data SelectionField (b :: BackendType) v
- = SFCol (Column b) (ColumnType b) (AnnRedactionExp b v)
- | SFComputedField ComputedFieldName (ComputedFieldScalarSelect b v)
- | SFExp Text
- type TableAggregateField b = TableAggregateFieldG b Void (SQLExpression b)
- type TableAggregateFields b = TableAggregateFieldsG b Void (SQLExpression b)
- type TableAggregateFieldsG b r v = Fields (TableAggregateFieldG b r v)
- type SelectionFields b v = Fields (SelectionField b v)
- type AggregateFields b v = Fields (AggregateField b v)
- type AnnFieldsG b r v = Fields (AnnFieldG b r v)
- data ConnectionField (b :: BackendType) (r :: Type) v
- data PageInfoField
- data EdgeField (b :: BackendType) (r :: Type) v
- = EdgeTypename Text
- | EdgeCursor
- | EdgeNode (AnnFieldsG b r v)
- type ConnectionFields b r v = Fields (ConnectionField b r v)
- type PageInfoFields = Fields PageInfoField
- type EdgeFields b r v = Fields (EdgeField b r v)
- data AnnColumnField (b :: BackendType) v = AnnColumnField {
- _acfColumn :: Column b
- _acfType :: ColumnType b
- _acfAsText :: Bool
- _acfArguments :: Maybe (ScalarSelectionArguments b)
- _acfRedactionExpression :: AnnRedactionExp b v
- data ComputedFieldScalarSelect (b :: BackendType) v = ComputedFieldScalarSelect {}
- data ComputedFieldSelect (b :: BackendType) (r :: Type) v
- = CFSScalar (ComputedFieldScalarSelect b v)
- | CFSTable JsonAggSelect (AnnSimpleSelectG b r v)
- type ArrayRelationSelectG b r v = AnnRelationSelectG b (AnnSimpleSelectG b r v)
- type ArrayAggregateSelectG b r v = AnnRelationSelectG b (AnnAggregateSelectG b r v)
- type ArrayConnectionSelect b r v = AnnRelationSelectG b (ConnectionSelect b r v)
- type ArrayAggregateSelect b = ArrayAggregateSelectG b Void (SQLExpression b)
- data AnnObjectSelectG (b :: BackendType) (r :: Type) v = AnnObjectSelectG {
- _aosFields :: AnnFieldsG b r v
- _aosTarget :: SelectFromG b v
- _aosTargetFilter :: AnnBoolExp b v
- type AnnObjectSelect b r = AnnObjectSelectG b r (SQLExpression b)
- type ObjectRelationSelectG b r v = AnnRelationSelectG b (AnnObjectSelectG b r v)
- type ObjectRelationSelect b = ObjectRelationSelectG b Void (SQLExpression b)
- data ArraySelectG (b :: BackendType) (r :: Type) v
- = ASSimple (ArrayRelationSelectG b r v)
- | ASAggregate (ArrayAggregateSelectG b r v)
- | ASConnection (ArrayConnectionSelect b r v)
- type ArraySelect b = ArraySelectG b Void (SQLExpression b)
- type ArraySelectFieldsG b r v = Fields (ArraySelectG b r v)
- data SourceRelationshipSelection (b :: BackendType) (r :: Type) (vf :: BackendType -> Type)
- = SourceRelationshipObject (AnnObjectSelectG b r (vf b))
- | SourceRelationshipArray (AnnSimpleSelectG b r (vf b))
- | SourceRelationshipArrayAggregate (AnnAggregateSelectG b r (vf b))
- data RemoteSourceSelect (r :: Type) (vf :: BackendType -> Type) (tgt :: BackendType) = RemoteSourceSelect {
- _rssName :: SourceName
- _rssConfig :: SourceConfig tgt
- _rssSelection :: SourceRelationshipSelection tgt r vf
- _rssJoinMapping :: HashMap FieldName (ScalarType tgt, Column tgt)
- _rssStringifyNums :: StringifyNumbers
- data AnnNestedObjectSelectG (b :: BackendType) (r :: Type) v = AnnNestedObjectSelectG {
- _anosSupportsNestedObjects :: XNestedObjects b
- _anosColumn :: Column b
- _anosFields :: AnnFieldsG b r v
- type AnnNestedObjectSelect b r = AnnNestedObjectSelectG b r (SQLExpression b)
- data AnnNestedArraySelectG (b :: BackendType) (r :: Type) v
- = ANASSimple (AnnFieldG b r v)
- | ANASAggregate (AnnAggregateSelectG b r v)
- type AnnNestedArraySelect b r = AnnNestedArraySelectG b r (SQLExpression b)
- insertFunctionArg :: FunctionArgName -> Int -> a -> FunctionArgsExpG a -> FunctionArgsExpG a
- data CountDistinct
Documentation
data QueryDB (b :: BackendType) (r :: Type) v Source #
Constructors
| QDBMultipleRows (AnnSimpleSelectG b r v) | |
| QDBSingleRow (AnnSimpleSelectG b r v) | |
| QDBAggregation (AnnAggregateSelectG b r v) | |
| QDBConnection (ConnectionSelect b r v) | |
| QDBStreamMultipleRows (AnnSimpleStreamSelectG b r v) |
Instances
type AnnSimpleSelectG b r v = AnnSelectG b (AnnFieldG b r) v Source #
type AnnAggregateSelectG b r v = AnnSelectG b (TableAggregateFieldG b r) v Source #
type AnnSimpleStreamSelectG b r v = AnnSelectStreamG b (AnnFieldG b r) v Source #
type AnnSimpleSelect b = AnnSimpleSelectG b Void (SQLExpression b) Source #
type AnnAggregateSelect b = AnnAggregateSelectG b Void (SQLExpression b) Source #
type AnnSimpleStreamSelect b = AnnSimpleStreamSelectG b Void (SQLExpression b) Source #
data ConnectionSelect (b :: BackendType) (r :: Type) v Source #
Constructors
| ConnectionSelect | |
Fields
| |
Instances
data ConnectionSplit (b :: BackendType) v Source #
Constructors
| ConnectionSplit | |
Fields
| |
Instances
data ConnectionSlice Source #
Constructors
| SliceFirst Int | |
| SliceLast Int |
Instances
data ConnectionSplitKind Source #
Instances
| Generic ConnectionSplitKind Source # | |
Defined in Hasura.RQL.IR.Select Associated Types type Rep ConnectionSplitKind :: Type -> Type # Methods from :: ConnectionSplitKind -> Rep ConnectionSplitKind x # to :: Rep ConnectionSplitKind x -> ConnectionSplitKind # | |
| Show ConnectionSplitKind Source # | |
Defined in Hasura.RQL.IR.Select Methods showsPrec :: Int -> ConnectionSplitKind -> ShowS # show :: ConnectionSplitKind -> String # showList :: [ConnectionSplitKind] -> ShowS # | |
| Eq ConnectionSplitKind Source # | |
Defined in Hasura.RQL.IR.Select Methods (==) :: ConnectionSplitKind -> ConnectionSplitKind -> Bool # (/=) :: ConnectionSplitKind -> ConnectionSplitKind -> Bool # | |
| Hashable ConnectionSplitKind Source # | |
Defined in Hasura.RQL.IR.Select Methods hashWithSalt :: Int -> ConnectionSplitKind -> Int Source # hash :: ConnectionSplitKind -> Int Source # | |
| type Rep ConnectionSplitKind Source # | |
data RemoteRelationshipSelect b r Source #
captures a remote relationship's selection and the necessary context
Constructors
| RemoteRelationshipSelect | |
Fields
| |
Instances
data AnnFieldG (b :: BackendType) (r :: Type) v Source #
Constructors
| AFColumn (AnnColumnField b v) | |
| AFObjectRelation (ObjectRelationSelectG b r v) | |
| AFArrayRelation (ArraySelectG b r v) | |
| AFComputedField (XComputedField b) ComputedFieldName (ComputedFieldSelect b r v) | |
| AFRemote (RemoteRelationshipSelect b r) | A remote relationship field |
| AFNodeId (XRelay b) SourceName (TableName b) (PrimaryKeyColumns b) | |
| AFExpression Text | |
| AFNestedObject (AnnNestedObjectSelectG b r v) | Nested object. |
| AFNestedArray (XNestedObjects b) (AnnNestedArraySelectG b r v) | Nested array |
Instances
type AnnFields b = AnnFieldsG b Void (SQLExpression b) Source #
mkAnnColumnField :: Column backend -> ColumnType backend -> AnnRedactionExp backend v -> Maybe (ScalarSelectionArguments backend) -> AnnFieldG backend r v Source #
mkAnnColumnFieldAsText :: ColumnInfo backend -> AnnFieldG backend r v Source #
traverseSourceRelationshipSelection :: (Applicative f, Backend backend) => (vf backend -> f (vg backend)) -> SourceRelationshipSelection backend r vf -> f (SourceRelationshipSelection backend r vg) Source #
data TableAggregateFieldG (b :: BackendType) (r :: Type) v Source #
Constructors
| TAFAgg (AggregateFields b v) | |
| TAFNodes (XNodesAgg b) (AnnFieldsG b r v) | |
| TAFGroupBy (XGroupBy b) (GroupByG b r v) | |
| TAFExp Text |
Instances
data AggregateField (b :: BackendType) v Source #
Instances
data AggregateOp (b :: BackendType) v Source #
Constructors
| AggregateOp | |
Fields
| |
Instances
data GroupByG (b :: BackendType) r v Source #
Constructors
| GroupByG | |
Fields
| |
Instances
| Backend b => Bifoldable (GroupByG b) Source # | |
Defined in Hasura.RQL.IR.Select | |
| Backend b => Foldable (GroupByG b r) Source # | |
Defined in Hasura.RQL.IR.Select Methods fold :: Monoid m => GroupByG b r m -> m # foldMap :: Monoid m => (a -> m) -> GroupByG b r a -> m # foldMap' :: Monoid m => (a -> m) -> GroupByG b r a -> m # foldr :: (a -> b0 -> b0) -> b0 -> GroupByG b r a -> b0 # foldr' :: (a -> b0 -> b0) -> b0 -> GroupByG b r a -> b0 # foldl :: (b0 -> a -> b0) -> b0 -> GroupByG b r a -> b0 # foldl' :: (b0 -> a -> b0) -> b0 -> GroupByG b r a -> b0 # foldr1 :: (a -> a -> a) -> GroupByG b r a -> a # foldl1 :: (a -> a -> a) -> GroupByG b r a -> a # toList :: GroupByG b r a -> [a] # null :: GroupByG b r a -> Bool # length :: GroupByG b r a -> Int # elem :: Eq a => a -> GroupByG b r a -> Bool # maximum :: Ord a => GroupByG b r a -> a # minimum :: Ord a => GroupByG b r a -> a # | |
| Backend b => Traversable (GroupByG b r) Source # | |
Defined in Hasura.RQL.IR.Select Methods traverse :: Applicative f => (a -> f b0) -> GroupByG b r a -> f (GroupByG b r b0) # sequenceA :: Applicative f => GroupByG b r (f a) -> f (GroupByG b r a) # mapM :: Monad m => (a -> m b0) -> GroupByG b r a -> m (GroupByG b r b0) # sequence :: Monad m => GroupByG b r (m a) -> m (GroupByG b r a) # | |
| Backend b => Functor (GroupByG b r) Source # | |
| (Backend b, Show (GroupByField b r v), Show (GroupKeyField b)) => Show (GroupByG b r v) Source # | |
| (Backend b, Eq (GroupByField b r v), Eq (GroupKeyField b)) => Eq (GroupByG b r v) Source # | |
data GroupByField (b :: BackendType) r v Source #
Constructors
| GBFGroupKey (Fields (GroupKeyField b)) | |
| GBFAggregate (AggregateFields b v) | |
| GBFNodes (AnnFieldsG b r v) | |
| GBFExp Text |
Instances
| Backend b => Bifoldable (GroupByField b) Source # | |
Defined in Hasura.RQL.IR.Select Methods bifold :: Monoid m => GroupByField b m m -> m # bifoldMap :: Monoid m => (a -> m) -> (b0 -> m) -> GroupByField b a b0 -> m # bifoldr :: (a -> c -> c) -> (b0 -> c -> c) -> c -> GroupByField b a b0 -> c # bifoldl :: (c -> a -> c) -> (c -> b0 -> c) -> c -> GroupByField b a b0 -> c # | |
| Backend b => Foldable (GroupByField b r) Source # | |
Defined in Hasura.RQL.IR.Select Methods fold :: Monoid m => GroupByField b r m -> m # foldMap :: Monoid m => (a -> m) -> GroupByField b r a -> m # foldMap' :: Monoid m => (a -> m) -> GroupByField b r a -> m # foldr :: (a -> b0 -> b0) -> b0 -> GroupByField b r a -> b0 # foldr' :: (a -> b0 -> b0) -> b0 -> GroupByField b r a -> b0 # foldl :: (b0 -> a -> b0) -> b0 -> GroupByField b r a -> b0 # foldl' :: (b0 -> a -> b0) -> b0 -> GroupByField b r a -> b0 # foldr1 :: (a -> a -> a) -> GroupByField b r a -> a # foldl1 :: (a -> a -> a) -> GroupByField b r a -> a # toList :: GroupByField b r a -> [a] # null :: GroupByField b r a -> Bool # length :: GroupByField b r a -> Int # elem :: Eq a => a -> GroupByField b r a -> Bool # maximum :: Ord a => GroupByField b r a -> a # minimum :: Ord a => GroupByField b r a -> a # sum :: Num a => GroupByField b r a -> a # product :: Num a => GroupByField b r a -> a # | |
| Backend b => Traversable (GroupByField b r) Source # | |
Defined in Hasura.RQL.IR.Select Methods traverse :: Applicative f => (a -> f b0) -> GroupByField b r a -> f (GroupByField b r b0) # sequenceA :: Applicative f => GroupByField b r (f a) -> f (GroupByField b r a) # mapM :: Monad m => (a -> m b0) -> GroupByField b r a -> m (GroupByField b r b0) # sequence :: Monad m => GroupByField b r (m a) -> m (GroupByField b r a) # | |
| Backend b => Functor (GroupByField b r) Source # | |
Defined in Hasura.RQL.IR.Select Methods fmap :: (a -> b0) -> GroupByField b r a -> GroupByField b r b0 # (<$) :: a -> GroupByField b r b0 -> GroupByField b r a # | |
| (Backend b, Show (GroupKeyField b), Show (AggregateField b v), Show (AnnFieldG b r v)) => Show (GroupByField b r v) Source # | |
Defined in Hasura.RQL.IR.Select Methods showsPrec :: Int -> GroupByField b r v -> ShowS # show :: GroupByField b r v -> String # showList :: [GroupByField b r v] -> ShowS # | |
| (Backend b, Eq (GroupKeyField b), Eq (AggregateField b v), Eq (AnnFieldG b r v)) => Eq (GroupByField b r v) Source # | |
Defined in Hasura.RQL.IR.Select Methods (==) :: GroupByField b r v -> GroupByField b r v -> Bool # (/=) :: GroupByField b r v -> GroupByField b r v -> Bool # | |
data GroupKeyField (b :: BackendType) Source #
Instances
| Backend b => Show (GroupKeyField b) Source # | |
Defined in Hasura.RQL.IR.Select Methods showsPrec :: Int -> GroupKeyField b -> ShowS # show :: GroupKeyField b -> String # showList :: [GroupKeyField b] -> ShowS # | |
| Backend b => Eq (GroupKeyField b) Source # | |
Defined in Hasura.RQL.IR.Select Methods (==) :: GroupKeyField b -> GroupKeyField b -> Bool # (/=) :: GroupKeyField b -> GroupKeyField b -> Bool # | |
data SelectionField (b :: BackendType) v Source #
Types of fields that can be selected in a user query.
Constructors
| SFCol | |
Fields
| |
| SFComputedField ComputedFieldName (ComputedFieldScalarSelect b v) | |
| SFExp Text | |
Instances
type TableAggregateField b = TableAggregateFieldG b Void (SQLExpression b) Source #
type TableAggregateFields b = TableAggregateFieldsG b Void (SQLExpression b) Source #
type TableAggregateFieldsG b r v = Fields (TableAggregateFieldG b r v) Source #
type SelectionFields b v = Fields (SelectionField b v) Source #
type AggregateFields b v = Fields (AggregateField b v) Source #
type AnnFieldsG b r v = Fields (AnnFieldG b r v) Source #
data ConnectionField (b :: BackendType) (r :: Type) v Source #
Constructors
| ConnectionTypename Text | |
| ConnectionPageInfo PageInfoFields | |
| ConnectionEdges (EdgeFields b r v) |
Instances
data PageInfoField Source #
Constructors
| PageInfoTypename Text | |
| PageInfoHasNextPage | |
| PageInfoHasPreviousPage | |
| PageInfoStartCursor | |
| PageInfoEndCursor |
Instances
| Show PageInfoField Source # | |
Defined in Hasura.RQL.IR.Select Methods showsPrec :: Int -> PageInfoField -> ShowS # show :: PageInfoField -> String # showList :: [PageInfoField] -> ShowS # | |
| Eq PageInfoField Source # | |
Defined in Hasura.RQL.IR.Select Methods (==) :: PageInfoField -> PageInfoField -> Bool # (/=) :: PageInfoField -> PageInfoField -> Bool # | |
data EdgeField (b :: BackendType) (r :: Type) v Source #
Constructors
| EdgeTypename Text | |
| EdgeCursor | |
| EdgeNode (AnnFieldsG b r v) |
Instances
| Backend b => Bifoldable (EdgeField b) Source # | |
Defined in Hasura.RQL.IR.Select | |
| Backend b => Foldable (EdgeField b r) Source # | |
Defined in Hasura.RQL.IR.Select Methods fold :: Monoid m => EdgeField b r m -> m # foldMap :: Monoid m => (a -> m) -> EdgeField b r a -> m # foldMap' :: Monoid m => (a -> m) -> EdgeField b r a -> m # foldr :: (a -> b0 -> b0) -> b0 -> EdgeField b r a -> b0 # foldr' :: (a -> b0 -> b0) -> b0 -> EdgeField b r a -> b0 # foldl :: (b0 -> a -> b0) -> b0 -> EdgeField b r a -> b0 # foldl' :: (b0 -> a -> b0) -> b0 -> EdgeField b r a -> b0 # foldr1 :: (a -> a -> a) -> EdgeField b r a -> a # foldl1 :: (a -> a -> a) -> EdgeField b r a -> a # toList :: EdgeField b r a -> [a] # null :: EdgeField b r a -> Bool # length :: EdgeField b r a -> Int # elem :: Eq a => a -> EdgeField b r a -> Bool # maximum :: Ord a => EdgeField b r a -> a # minimum :: Ord a => EdgeField b r a -> a # | |
| Backend b => Traversable (EdgeField b r) Source # | |
Defined in Hasura.RQL.IR.Select Methods traverse :: Applicative f => (a -> f b0) -> EdgeField b r a -> f (EdgeField b r b0) # sequenceA :: Applicative f => EdgeField b r (f a) -> f (EdgeField b r a) # mapM :: Monad m => (a -> m b0) -> EdgeField b r a -> m (EdgeField b r b0) # sequence :: Monad m => EdgeField b r (m a) -> m (EdgeField b r a) # | |
| Backend b => Functor (EdgeField b r) Source # | |
| Show (AnnFieldsG b r v) => Show (EdgeField b r v) Source # | |
| Eq (AnnFieldsG b r v) => Eq (EdgeField b r v) Source # | |
type ConnectionFields b r v = Fields (ConnectionField b r v) Source #
type PageInfoFields = Fields PageInfoField Source #
type EdgeFields b r v = Fields (EdgeField b r v) Source #
data AnnColumnField (b :: BackendType) v Source #
Constructors
| AnnColumnField | |
Fields
| |
Instances
data ComputedFieldScalarSelect (b :: BackendType) v Source #
Constructors
| ComputedFieldScalarSelect | |
Fields
| |
Instances
data ComputedFieldSelect (b :: BackendType) (r :: Type) v Source #
Constructors
| CFSScalar | |
Fields
| |
| CFSTable JsonAggSelect (AnnSimpleSelectG b r v) | |
Instances
type ArrayRelationSelectG b r v = AnnRelationSelectG b (AnnSimpleSelectG b r v) Source #
type ArrayAggregateSelectG b r v = AnnRelationSelectG b (AnnAggregateSelectG b r v) Source #
type ArrayConnectionSelect b r v = AnnRelationSelectG b (ConnectionSelect b r v) Source #
type ArrayAggregateSelect b = ArrayAggregateSelectG b Void (SQLExpression b) Source #
data AnnObjectSelectG (b :: BackendType) (r :: Type) v Source #
Constructors
| AnnObjectSelectG | |
Fields
| |
Instances
type AnnObjectSelect b r = AnnObjectSelectG b r (SQLExpression b) Source #
type ObjectRelationSelectG b r v = AnnRelationSelectG b (AnnObjectSelectG b r v) Source #
type ObjectRelationSelect b = ObjectRelationSelectG b Void (SQLExpression b) Source #
data ArraySelectG (b :: BackendType) (r :: Type) v Source #
Constructors
| ASSimple (ArrayRelationSelectG b r v) | |
| ASAggregate (ArrayAggregateSelectG b r v) | |
| ASConnection (ArrayConnectionSelect b r v) |
Instances
| Backend b => Bifoldable (ArraySelectG b) Source # | |
Defined in Hasura.RQL.IR.Select Methods bifold :: Monoid m => ArraySelectG b m m -> m # bifoldMap :: Monoid m => (a -> m) -> (b0 -> m) -> ArraySelectG b a b0 -> m # bifoldr :: (a -> c -> c) -> (b0 -> c -> c) -> c -> ArraySelectG b a b0 -> c # bifoldl :: (c -> a -> c) -> (c -> b0 -> c) -> c -> ArraySelectG b a b0 -> c # | |
| Backend b => Foldable (ArraySelectG b r) Source # | |
Defined in Hasura.RQL.IR.Select Methods fold :: Monoid m => ArraySelectG b r m -> m # foldMap :: Monoid m => (a -> m) -> ArraySelectG b r a -> m # foldMap' :: Monoid m => (a -> m) -> ArraySelectG b r a -> m # foldr :: (a -> b0 -> b0) -> b0 -> ArraySelectG b r a -> b0 # foldr' :: (a -> b0 -> b0) -> b0 -> ArraySelectG b r a -> b0 # foldl :: (b0 -> a -> b0) -> b0 -> ArraySelectG b r a -> b0 # foldl' :: (b0 -> a -> b0) -> b0 -> ArraySelectG b r a -> b0 # foldr1 :: (a -> a -> a) -> ArraySelectG b r a -> a # foldl1 :: (a -> a -> a) -> ArraySelectG b r a -> a # toList :: ArraySelectG b r a -> [a] # null :: ArraySelectG b r a -> Bool # length :: ArraySelectG b r a -> Int # elem :: Eq a => a -> ArraySelectG b r a -> Bool # maximum :: Ord a => ArraySelectG b r a -> a # minimum :: Ord a => ArraySelectG b r a -> a # sum :: Num a => ArraySelectG b r a -> a # product :: Num a => ArraySelectG b r a -> a # | |
| Backend b => Traversable (ArraySelectG b r) Source # | |
Defined in Hasura.RQL.IR.Select Methods traverse :: Applicative f => (a -> f b0) -> ArraySelectG b r a -> f (ArraySelectG b r b0) # sequenceA :: Applicative f => ArraySelectG b r (f a) -> f (ArraySelectG b r a) # mapM :: Monad m => (a -> m b0) -> ArraySelectG b r a -> m (ArraySelectG b r b0) # sequence :: Monad m => ArraySelectG b r (m a) -> m (ArraySelectG b r a) # | |
| Backend b => Functor (ArraySelectG b r) Source # | |
Defined in Hasura.RQL.IR.Select Methods fmap :: (a -> b0) -> ArraySelectG b r a -> ArraySelectG b r b0 # (<$) :: a -> ArraySelectG b r b0 -> ArraySelectG b r a # | |
| (Show (ArrayRelationSelectG b r v), Show (ArrayAggregateSelectG b r v), Show (ArrayConnectionSelect b r v)) => Show (ArraySelectG b r v) Source # | |
Defined in Hasura.RQL.IR.Select Methods showsPrec :: Int -> ArraySelectG b r v -> ShowS # show :: ArraySelectG b r v -> String # showList :: [ArraySelectG b r v] -> ShowS # | |
| (Eq (ArrayRelationSelectG b r v), Eq (ArrayAggregateSelectG b r v), Eq (ArrayConnectionSelect b r v)) => Eq (ArraySelectG b r v) Source # | |
Defined in Hasura.RQL.IR.Select Methods (==) :: ArraySelectG b r v -> ArraySelectG b r v -> Bool # (/=) :: ArraySelectG b r v -> ArraySelectG b r v -> Bool # | |
type ArraySelect b = ArraySelectG b Void (SQLExpression b) Source #
type ArraySelectFieldsG b r v = Fields (ArraySelectG b r v) Source #
data SourceRelationshipSelection (b :: BackendType) (r :: Type) (vf :: BackendType -> Type) Source #
Captures the selection set of a remote source relationship.
Constructors
| SourceRelationshipObject (AnnObjectSelectG b r (vf b)) | |
| SourceRelationshipArray (AnnSimpleSelectG b r (vf b)) | |
| SourceRelationshipArrayAggregate (AnnAggregateSelectG b r (vf b)) |
Instances
| (Backend b, Show (AnnAggregateSelectG b r (vf b)), Show (AnnObjectSelectG b r (vf b)), Show (AnnSimpleSelectG b r (vf b))) => Show (SourceRelationshipSelection b r vf) Source # | |
Defined in Hasura.RQL.IR.Select Methods showsPrec :: Int -> SourceRelationshipSelection b r vf -> ShowS # show :: SourceRelationshipSelection b r vf -> String # showList :: [SourceRelationshipSelection b r vf] -> ShowS # | |
| (Backend b, Eq (AnnAggregateSelectG b r (vf b)), Eq (AnnObjectSelectG b r (vf b)), Eq (AnnSimpleSelectG b r (vf b))) => Eq (SourceRelationshipSelection b r vf) Source # | |
Defined in Hasura.RQL.IR.Select Methods (==) :: SourceRelationshipSelection b r vf -> SourceRelationshipSelection b r vf -> Bool # (/=) :: SourceRelationshipSelection b r vf -> SourceRelationshipSelection b r vf -> Bool # | |
data RemoteSourceSelect (r :: Type) (vf :: BackendType -> Type) (tgt :: BackendType) Source #
A relationship to a remote source. vf (could use a better name) is
analogous to v in other IR types such as AnnFieldG. vf's kind is
(BackendType -> Type) instead of v's Type so that v of AnnFieldG can
be specific to the backend that it captures (b of an AnnFieldG changes as
we walk down the IR branches which capture relationships to other databases)
Constructors
| RemoteSourceSelect | |
Fields
| |
Instances
| (Backend tgt, Show (SourceRelationshipSelection tgt r vf), Show (SourceConfig tgt)) => Show (RemoteSourceSelect r vf tgt) Source # | |
Defined in Hasura.RQL.IR.Select Methods showsPrec :: Int -> RemoteSourceSelect r vf tgt -> ShowS # show :: RemoteSourceSelect r vf tgt -> String # showList :: [RemoteSourceSelect r vf tgt] -> ShowS # | |
| (Backend tgt, Eq (SourceRelationshipSelection tgt r vf)) => Eq (RemoteSourceSelect r vf tgt) Source # | |
Defined in Hasura.RQL.IR.Select Methods (==) :: RemoteSourceSelect r vf tgt -> RemoteSourceSelect r vf tgt -> Bool # (/=) :: RemoteSourceSelect r vf tgt -> RemoteSourceSelect r vf tgt -> Bool # | |
data AnnNestedObjectSelectG (b :: BackendType) (r :: Type) v Source #
Constructors
| AnnNestedObjectSelectG | |
Fields
| |
Instances
type AnnNestedObjectSelect b r = AnnNestedObjectSelectG b r (SQLExpression b) Source #
data AnnNestedArraySelectG (b :: BackendType) (r :: Type) v Source #
Constructors
| ANASSimple (AnnFieldG b r v) | |
| ANASAggregate (AnnAggregateSelectG b r v) |
Instances
type AnnNestedArraySelect b r = AnnNestedArraySelectG b r (SQLExpression b) Source #
insertFunctionArg :: FunctionArgName -> Int -> a -> FunctionArgsExpG a -> FunctionArgsExpG a Source #
If argument positional index is less than or equal to length of
positional arguments then insert the value in positional arguments else
insert the value with argument name in named arguments
data CountDistinct Source #
The "distinct" input field inside "count" aggregate field
count ( distinct: Boolean ): Int
Constructors
| SelectCountDistinct | |
| SelectCountNonDistinct |