Safe Haskell | None |
---|---|
Language | Haskell2010 |
Hasura.RQL.IR.BoolExp
Description
Boolean Expressions
This module defines the IR representation of boolean expressions
used in _where
clauses in GraphQL queries, permissions, and so on.
The types in this module define a generic structure with "holes" to be filled by each backend. Specifically, holes will include things like types for table names, and backend field types.
Synopsis
- data GBoolExp (backend :: BackendType) field
- gBoolExpTrue :: GBoolExp backend field
- data GExists (backend :: BackendType) field = GExists {}
- geWhere :: forall backend field field. Lens (GExists backend field) (GExists backend field) (GBoolExp backend field) (GBoolExp backend field)
- geTable :: forall backend field. Lens' (GExists backend field) (TableName backend)
- data ColExp = ColExp {}
- newtype BoolExp (b :: BackendType) = BoolExp {}
- _BoolField :: forall backend field. Prism' (GBoolExp backend field) field
- _BoolExists :: forall backend field. Prism' (GBoolExp backend field) (GExists backend field)
- _BoolNot :: forall backend field. Prism' (GBoolExp backend field) (GBoolExp backend field)
- _BoolOr :: forall backend field. Prism' (GBoolExp backend field) [GBoolExp backend field]
- _BoolAnd :: forall backend field. Prism' (GBoolExp backend field) [GBoolExp backend field]
- data PartialSQLExp (backend :: BackendType)
- = PSESessVar (SessionVarType backend) SessionVariable
- | PSESession
- | PSESQLExp (SQLExpression backend)
- isStaticValue :: PartialSQLExp backend -> Bool
- hasStaticExp :: Backend b => OpExpG b (PartialSQLExp b) -> Bool
- type CastExp backend field = HashMap (ScalarType backend) [OpExpG backend field]
- data OpExpG (backend :: BackendType) field
- = ACast (CastExp backend field)
- | AEQ Bool field
- | ANE Bool field
- | AIN field
- | ANIN field
- | AGT field
- | ALT field
- | AGTE field
- | ALTE field
- | ALIKE field
- | ANLIKE field
- | CEQ (RootOrCurrentColumn backend)
- | CNE (RootOrCurrentColumn backend)
- | CGT (RootOrCurrentColumn backend)
- | CLT (RootOrCurrentColumn backend)
- | CGTE (RootOrCurrentColumn backend)
- | CLTE (RootOrCurrentColumn backend)
- | ANISNULL
- | ANISNOTNULL
- | ABackendSpecific (BooleanOperators backend field)
- data RootOrCurrentColumn b = RootOrCurrentColumn RootOrCurrent (Column b)
- data RootOrCurrent
- opExpDepCol :: OpExpG backend field -> Maybe (RootOrCurrentColumn backend)
- data ComputedFieldBoolExp (backend :: BackendType) scalar
- = CFBEScalar [OpExpG backend scalar]
- | CFBETable (TableName backend) (AnnBoolExp backend scalar)
- data AnnComputedFieldBoolExp (backend :: BackendType) scalar = AnnComputedFieldBoolExp {
- _acfbXFieldInfo :: XComputedField backend
- _acfbName :: ComputedFieldName
- _acfbFunction :: FunctionName backend
- _acfbFunctionArgsExp :: FunctionArgsExp backend scalar
- _acfbBoolExp :: ComputedFieldBoolExp backend scalar
- data AnnBoolExpFld (backend :: BackendType) leaf
- = AVColumn (ColumnInfo backend) [OpExpG backend leaf]
- | AVRelationship (RelInfo backend) (AnnBoolExp backend leaf)
- | AVComputedField (AnnComputedFieldBoolExp backend leaf)
- | AVAggregationPredicates (AggregationPredicates backend leaf)
- type AnnBoolExp backend scalar = GBoolExp backend (AnnBoolExpFld backend scalar)
- type AnnBoolExpFldSQL backend = AnnBoolExpFld backend (SQLExpression backend)
- type AnnBoolExpSQL backend = AnnBoolExp backend (SQLExpression backend)
- type AnnBoolExpPartialSQL backend = AnnBoolExp backend (PartialSQLExp backend)
- annBoolExpTrue :: AnnBoolExp backend scalar
- andAnnBoolExps :: AnnBoolExp backend scalar -> AnnBoolExp backend scalar -> AnnBoolExp backend scalar
- data DWithinGeomOp field = DWithinGeomOp {
- dwgeomDistance :: field
- dwgeomFrom :: field
- data DWithinGeogOp field = DWithinGeogOp {
- dwgeogDistance :: field
- dwgeogFrom :: field
- dwgeogUseSpheroid :: field
- data STIntersectsNbandGeommin field = STIntersectsNbandGeommin {
- singNband :: field
- singGeommin :: field
- data STIntersectsGeomminNband field = STIntersectsGeomminNband {
- signGeommin :: field
- signNband :: Maybe field
- newtype AnnColumnCaseBoolExpField (backend :: BackendType) field = AnnColumnCaseBoolExpField {
- _accColCaseBoolExpField :: AnnBoolExpFld backend field
- type AnnColumnCaseBoolExp b a = GBoolExp b (AnnColumnCaseBoolExpField b a)
- type AnnColumnCaseBoolExpPartialSQL b = AnnColumnCaseBoolExp b (PartialSQLExp b)
- type PreSetColsG b v = HashMap (Column b) v
- type PreSetColsPartial b = HashMap (Column b) (PartialSQLExp b)
Documentation
data GBoolExp (backend :: BackendType) field Source #
This type represents a boolean expression tree. It is parametric over the actual implementation of the actual boolean term values. It nonetheless leaks some information: "exists" is only used in permissions, to add conditions based on another table.
- The
backend
parameter is used to find the backend-specific type for table names in theBoolExists
constructor. - The
field
type represent the type of database-specific field types.
Constructors
BoolAnd [GBoolExp backend field] | |
BoolOr [GBoolExp backend field] | |
BoolNot (GBoolExp backend field) | |
BoolExists (GExists backend field) | Represents a condition on an aribtrary table.
since the |
BoolField field | A column field |
Instances
Functor (GBoolExp backend) Source # | |
Foldable (GBoolExp backend) Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods fold :: Monoid m => GBoolExp backend m -> m # foldMap :: Monoid m => (a -> m) -> GBoolExp backend a -> m # foldMap' :: Monoid m => (a -> m) -> GBoolExp backend a -> m # foldr :: (a -> b -> b) -> b -> GBoolExp backend a -> b # foldr' :: (a -> b -> b) -> b -> GBoolExp backend a -> b # foldl :: (b -> a -> b) -> b -> GBoolExp backend a -> b # foldl' :: (b -> a -> b) -> b -> GBoolExp backend a -> b # foldr1 :: (a -> a -> a) -> GBoolExp backend a -> a # foldl1 :: (a -> a -> a) -> GBoolExp backend a -> a # toList :: GBoolExp backend a -> [a] # null :: GBoolExp backend a -> Bool # length :: GBoolExp backend a -> Int # elem :: Eq a => a -> GBoolExp backend a -> Bool # maximum :: Ord a => GBoolExp backend a -> a # minimum :: Ord a => GBoolExp backend a -> a # | |
Traversable (GBoolExp backend) Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods traverse :: Applicative f => (a -> f b) -> GBoolExp backend a -> f (GBoolExp backend b) # sequenceA :: Applicative f => GBoolExp backend (f a) -> f (GBoolExp backend a) # mapM :: Monad m => (a -> m b) -> GBoolExp backend a -> m (GBoolExp backend b) # sequence :: Monad m => GBoolExp backend (m a) -> m (GBoolExp backend a) # | |
(Backend backend, Eq field) => Eq (GBoolExp backend field) Source # | |
(Backend backend, Data field) => Data (GBoolExp backend field) Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GBoolExp backend field -> c (GBoolExp backend field) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GBoolExp backend field) # toConstr :: GBoolExp backend field -> Constr # dataTypeOf :: GBoolExp backend field -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GBoolExp backend field)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GBoolExp backend field)) # gmapT :: (forall b. Data b => b -> b) -> GBoolExp backend field -> GBoolExp backend field # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GBoolExp backend field -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GBoolExp backend field -> r # gmapQ :: (forall d. Data d => d -> u) -> GBoolExp backend field -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GBoolExp backend field -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GBoolExp backend field -> m (GBoolExp backend field) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GBoolExp backend field -> m (GBoolExp backend field) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GBoolExp backend field -> m (GBoolExp backend field) # | |
(Backend backend, Show field) => Show (GBoolExp backend field) Source # | |
Generic (GBoolExp backend field) Source # | |
(Backend b, NFData a) => NFData (GBoolExp b a) Source # | |
Defined in Hasura.RQL.IR.BoolExp | |
(Backend b, Hashable a) => Hashable (GBoolExp b a) Source # | |
Defined in Hasura.RQL.IR.BoolExp | |
(Backend b, FromJSONKeyValue a) => FromJSON (GBoolExp b a) Source # | |
Defined in Hasura.RQL.IR.BoolExp | |
(Backend backend, ToJSONKeyValue field) => ToJSON (GBoolExp backend field) Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods toJSON :: GBoolExp backend field -> Value toEncoding :: GBoolExp backend field -> Encoding toJSONList :: [GBoolExp backend field] -> Value toEncodingList :: [GBoolExp backend field] -> Encoding | |
(Backend b, Data a) => Plated (GBoolExp b a) Source # | |
Defined in Hasura.RQL.IR.BoolExp | |
(Backend b, Cacheable a) => Cacheable (GBoolExp b a) Source # | |
type Rep (GBoolExp backend field) Source # | |
Defined in Hasura.RQL.IR.BoolExp type Rep (GBoolExp backend field) = D1 ('MetaData "GBoolExp" "Hasura.RQL.IR.BoolExp" "graphql-engine-1.0.0-inplace" 'False) ((C1 ('MetaCons "BoolAnd" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [GBoolExp backend field])) :+: C1 ('MetaCons "BoolOr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [GBoolExp backend field]))) :+: (C1 ('MetaCons "BoolNot" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (GBoolExp backend field))) :+: (C1 ('MetaCons "BoolExists" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (GExists backend field))) :+: C1 ('MetaCons "BoolField" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 field))))) |
gBoolExpTrue :: GBoolExp backend field Source #
A default representation for a true
boolean value.
data GExists (backend :: BackendType) field Source #
Represents a condition on an aribtrary table. Used as part of our permissions boolean expressions. See our documentation for more information: https://hasura.io/docs/latest/graphql/core/auth/authorization/permission-rules.html#using-unrelated-tables-views
Instances
Functor (GExists backend) Source # | |
Foldable (GExists backend) Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods fold :: Monoid m => GExists backend m -> m # foldMap :: Monoid m => (a -> m) -> GExists backend a -> m # foldMap' :: Monoid m => (a -> m) -> GExists backend a -> m # foldr :: (a -> b -> b) -> b -> GExists backend a -> b # foldr' :: (a -> b -> b) -> b -> GExists backend a -> b # foldl :: (b -> a -> b) -> b -> GExists backend a -> b # foldl' :: (b -> a -> b) -> b -> GExists backend a -> b # foldr1 :: (a -> a -> a) -> GExists backend a -> a # foldl1 :: (a -> a -> a) -> GExists backend a -> a # toList :: GExists backend a -> [a] # null :: GExists backend a -> Bool # length :: GExists backend a -> Int # elem :: Eq a => a -> GExists backend a -> Bool # maximum :: Ord a => GExists backend a -> a # minimum :: Ord a => GExists backend a -> a # | |
Traversable (GExists backend) Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods traverse :: Applicative f => (a -> f b) -> GExists backend a -> f (GExists backend b) # sequenceA :: Applicative f => GExists backend (f a) -> f (GExists backend a) # mapM :: Monad m => (a -> m b) -> GExists backend a -> m (GExists backend b) # sequence :: Monad m => GExists backend (m a) -> m (GExists backend a) # | |
(Backend b, Eq a) => Eq (GExists b a) Source # | |
(Backend b, Data a) => Data (GExists b a) Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> GExists b a -> c (GExists b a) # gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GExists b a) # toConstr :: GExists b a -> Constr # dataTypeOf :: GExists b a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GExists b a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GExists b a)) # gmapT :: (forall b0. Data b0 => b0 -> b0) -> GExists b a -> GExists b a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GExists b a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GExists b a -> r # gmapQ :: (forall d. Data d => d -> u) -> GExists b a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GExists b a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GExists b a -> m (GExists b a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GExists b a -> m (GExists b a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GExists b a -> m (GExists b a) # | |
(Backend b, Show a) => Show (GExists b a) Source # | |
Generic (GExists backend field) Source # | |
(Backend b, NFData a) => NFData (GExists b a) Source # | |
Defined in Hasura.RQL.IR.BoolExp | |
(Backend b, Hashable a) => Hashable (GExists b a) Source # | |
Defined in Hasura.RQL.IR.BoolExp | |
(Backend b, FromJSONKeyValue a) => FromJSON (GExists b a) Source # | |
Defined in Hasura.RQL.IR.BoolExp | |
(Backend b, ToJSONKeyValue a) => ToJSON (GExists b a) Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods toJSON :: GExists b a -> Value toEncoding :: GExists b a -> Encoding toJSONList :: [GExists b a] -> Value toEncodingList :: [GExists b a] -> Encoding | |
(Backend b, Data a) => Plated (GExists b a) Source # | |
Defined in Hasura.RQL.IR.BoolExp | |
(Backend b, Cacheable a) => Cacheable (GExists b a) Source # | |
type Rep (GExists backend field) Source # | |
Defined in Hasura.RQL.IR.BoolExp type Rep (GExists backend field) = D1 ('MetaData "GExists" "Hasura.RQL.IR.BoolExp" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "GExists" 'PrefixI 'True) (S1 ('MetaSel ('Just "_geTable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (TableName backend)) :*: S1 ('MetaSel ('Just "_geWhere") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (GBoolExp backend field)))) |
geWhere :: forall backend field field. Lens (GExists backend field) (GExists backend field) (GBoolExp backend field) (GBoolExp backend field) Source #
We don't allow conditions across relationships in permissions: the type we use as the terms in GBoolExp is this one, ColExp, which only contains a FieldName and a JSON Value.
Instances
Eq ColExp Source # | |
Data ColExp Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ColExp -> c ColExp # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ColExp # toConstr :: ColExp -> Constr # dataTypeOf :: ColExp -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ColExp) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ColExp) # gmapT :: (forall b. Data b => b -> b) -> ColExp -> ColExp # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ColExp -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ColExp -> r # gmapQ :: (forall d. Data d => d -> u) -> ColExp -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ColExp -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ColExp -> m ColExp # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ColExp -> m ColExp # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ColExp -> m ColExp # | |
Show ColExp Source # | |
Generic ColExp Source # | |
NFData ColExp Source # | |
Defined in Hasura.RQL.IR.BoolExp | |
FromJSONKeyValue ColExp Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods parseJSONKeyValue :: (Key, Value) -> Parser ColExp Source # | |
ToJSONKeyValue ColExp Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods toJSONKeyValue :: ColExp -> (Key, Value) Source # | |
Cacheable ColExp Source # | |
type Rep ColExp Source # | |
Defined in Hasura.RQL.IR.BoolExp type Rep ColExp = D1 ('MetaData "ColExp" "Hasura.RQL.IR.BoolExp" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "ColExp" 'PrefixI 'True) (S1 ('MetaSel ('Just "ceCol") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 FieldName) :*: S1 ('MetaSel ('Just "ceVal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Value))) |
newtype BoolExp (b :: BackendType) Source #
This BoolExp
type is a simple alias for the boolean expressions used in permissions, that
uses ColExp
as the term in GBoolExp.
Instances
Backend b => Eq (BoolExp b) Source # | |
Backend b => Show (BoolExp b) Source # | |
Generic (BoolExp b) Source # | |
Backend b => NFData (BoolExp b) Source # | |
Defined in Hasura.RQL.IR.BoolExp | |
Backend b => FromJSON (BoolExp b) Source # | |
Defined in Hasura.RQL.IR.BoolExp | |
Backend b => ToJSON (BoolExp b) Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods toEncoding :: BoolExp b -> Encoding toJSONList :: [BoolExp b] -> Value toEncodingList :: [BoolExp b] -> Encoding | |
Wrapped (BoolExp b) Source # | |
Defined in Hasura.RQL.IR.BoolExp Associated Types type Unwrapped (BoolExp b) | |
Backend b => Cacheable (BoolExp b) Source # | |
BoolExp b1 ~ t => Rewrapped (BoolExp b2) t Source # | |
Defined in Hasura.RQL.IR.BoolExp | |
type Rep (BoolExp b) Source # | |
type Unwrapped (BoolExp b) Source # | |
Defined in Hasura.RQL.IR.BoolExp |
_BoolField :: forall backend field. Prism' (GBoolExp backend field) field Source #
_BoolExists :: forall backend field. Prism' (GBoolExp backend field) (GExists backend field) Source #
data PartialSQLExp (backend :: BackendType) Source #
Permissions get translated into boolean expressions that are threaded throuhgout the parsers. For the leaf values of those permissions, we use this type, which references but doesn't inline the session variables.
Constructors
PSESessVar (SessionVarType backend) SessionVariable | |
PSESession | |
PSESQLExp (SQLExpression backend) |
Instances
isStaticValue :: PartialSQLExp backend -> Bool Source #
hasStaticExp :: Backend b => OpExpG b (PartialSQLExp b) -> Bool Source #
type CastExp backend field = HashMap (ScalarType backend) [OpExpG backend field] Source #
Operand for cast operator
data OpExpG (backend :: BackendType) field Source #
This type represents the boolean operators that can be applied on values of a column. This type
only contains the common core, that we expect to be ultimately entirely supported in most if not
all backends. Backends can extend this with the BooleanOperators
type in Backend
.
Constructors
ACast (CastExp backend field) | |
AEQ Bool field | |
ANE Bool field | |
AIN field | |
ANIN field | |
AGT field | |
ALT field | |
AGTE field | |
ALTE field | |
ALIKE field | |
ANLIKE field | |
CEQ (RootOrCurrentColumn backend) | |
CNE (RootOrCurrentColumn backend) | |
CGT (RootOrCurrentColumn backend) | |
CLT (RootOrCurrentColumn backend) | |
CGTE (RootOrCurrentColumn backend) | |
CLTE (RootOrCurrentColumn backend) | |
ANISNULL | |
ANISNOTNULL | |
ABackendSpecific (BooleanOperators backend field) |
Instances
data RootOrCurrentColumn b Source #
Constructors
RootOrCurrentColumn RootOrCurrent (Column b) |
Instances
data RootOrCurrent Source #
The arguments of column-operators may refer to either the so-called 'root tabular value' or 'current tabular value'.
Instances
opExpDepCol :: OpExpG backend field -> Maybe (RootOrCurrentColumn backend) Source #
data ComputedFieldBoolExp (backend :: BackendType) scalar Source #
This type is used to represent the kinds of boolean expression used for compouted fields based on the return type of the SQL function.
Constructors
CFBEScalar [OpExpG backend scalar] | SQL function returning a scalar |
CFBETable (TableName backend) (AnnBoolExp backend scalar) | SQL function returning SET OF table |
Instances
data AnnComputedFieldBoolExp (backend :: BackendType) scalar Source #
Using a computed field in boolean expression.
Example: A computed field "full_name" ("first_name" || "last_name") is defined to the "user"
table. Boolean expression to filter whose "full_name" is LIKE "%bob%"
query {
user(where: {full_name: {_like: "%bob%"}}){
id
first_name
last_name
full_name
}
}
Limitation: We only support computed fields in boolean expressions when they
are functions with no input arguments, because it is complex to generate schema
for where
clauses for functions that have input arguments.
Constructors
AnnComputedFieldBoolExp | |
Fields
|
Instances
data AnnBoolExpFld (backend :: BackendType) leaf Source #
This type is used for boolean terms in GBoolExp in the schema; there are four kinds boolean
terms:
- operators on a column of the current table, using the OpExpG
kind of operators
- arbitrary expressions on columns of tables in relationships (in the same source)
- A computed field of the current table
- aggregation operations on array relationships on the current tables.
This type is parameterized over the type of leaf values, the values on which we operate.
Constructors
AVColumn (ColumnInfo backend) [OpExpG backend leaf] | |
AVRelationship (RelInfo backend) (AnnBoolExp backend leaf) | |
AVComputedField (AnnComputedFieldBoolExp backend leaf) | |
AVAggregationPredicates (AggregationPredicates backend leaf) |
Instances
type AnnBoolExp backend scalar = GBoolExp backend (AnnBoolExpFld backend scalar) Source #
A simple alias for the kind of boolean expressions used in the schema, that ties together
GBoolExp
, OpExpG
, and AnnBoolExpFld
.
type AnnBoolExpFldSQL backend = AnnBoolExpFld backend (SQLExpression backend) Source #
type AnnBoolExpSQL backend = AnnBoolExp backend (SQLExpression backend) Source #
type AnnBoolExpPartialSQL backend = AnnBoolExp backend (PartialSQLExp backend) Source #
annBoolExpTrue :: AnnBoolExp backend scalar Source #
andAnnBoolExps :: AnnBoolExp backend scalar -> AnnBoolExp backend scalar -> AnnBoolExp backend scalar Source #
data DWithinGeomOp field Source #
Operand for STDWithin opoerator
Constructors
DWithinGeomOp | |
Fields
|
Instances
Functor DWithinGeomOp Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods fmap :: (a -> b) -> DWithinGeomOp a -> DWithinGeomOp b # (<$) :: a -> DWithinGeomOp b -> DWithinGeomOp a # | |
Foldable DWithinGeomOp Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods fold :: Monoid m => DWithinGeomOp m -> m # foldMap :: Monoid m => (a -> m) -> DWithinGeomOp a -> m # foldMap' :: Monoid m => (a -> m) -> DWithinGeomOp a -> m # foldr :: (a -> b -> b) -> b -> DWithinGeomOp a -> b # foldr' :: (a -> b -> b) -> b -> DWithinGeomOp a -> b # foldl :: (b -> a -> b) -> b -> DWithinGeomOp a -> b # foldl' :: (b -> a -> b) -> b -> DWithinGeomOp a -> b # foldr1 :: (a -> a -> a) -> DWithinGeomOp a -> a # foldl1 :: (a -> a -> a) -> DWithinGeomOp a -> a # toList :: DWithinGeomOp a -> [a] # null :: DWithinGeomOp a -> Bool # length :: DWithinGeomOp a -> Int # elem :: Eq a => a -> DWithinGeomOp a -> Bool # maximum :: Ord a => DWithinGeomOp a -> a # minimum :: Ord a => DWithinGeomOp a -> a # sum :: Num a => DWithinGeomOp a -> a # product :: Num a => DWithinGeomOp a -> a # | |
Traversable DWithinGeomOp Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods traverse :: Applicative f => (a -> f b) -> DWithinGeomOp a -> f (DWithinGeomOp b) # sequenceA :: Applicative f => DWithinGeomOp (f a) -> f (DWithinGeomOp a) # mapM :: Monad m => (a -> m b) -> DWithinGeomOp a -> m (DWithinGeomOp b) # sequence :: Monad m => DWithinGeomOp (m a) -> m (DWithinGeomOp a) # | |
Eq field => Eq (DWithinGeomOp field) Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods (==) :: DWithinGeomOp field -> DWithinGeomOp field -> Bool # (/=) :: DWithinGeomOp field -> DWithinGeomOp field -> Bool # | |
Data field => Data (DWithinGeomOp field) Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DWithinGeomOp field -> c (DWithinGeomOp field) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (DWithinGeomOp field) # toConstr :: DWithinGeomOp field -> Constr # dataTypeOf :: DWithinGeomOp field -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (DWithinGeomOp field)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (DWithinGeomOp field)) # gmapT :: (forall b. Data b => b -> b) -> DWithinGeomOp field -> DWithinGeomOp field # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DWithinGeomOp field -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DWithinGeomOp field -> r # gmapQ :: (forall d. Data d => d -> u) -> DWithinGeomOp field -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> DWithinGeomOp field -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DWithinGeomOp field -> m (DWithinGeomOp field) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DWithinGeomOp field -> m (DWithinGeomOp field) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DWithinGeomOp field -> m (DWithinGeomOp field) # | |
Show field => Show (DWithinGeomOp field) Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods showsPrec :: Int -> DWithinGeomOp field -> ShowS # show :: DWithinGeomOp field -> String # showList :: [DWithinGeomOp field] -> ShowS # | |
Generic (DWithinGeomOp field) Source # | |
Defined in Hasura.RQL.IR.BoolExp Associated Types type Rep (DWithinGeomOp field) :: Type -> Type # Methods from :: DWithinGeomOp field -> Rep (DWithinGeomOp field) x # to :: Rep (DWithinGeomOp field) x -> DWithinGeomOp field # | |
NFData a => NFData (DWithinGeomOp a) Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods rnf :: DWithinGeomOp a -> () # | |
Hashable a => Hashable (DWithinGeomOp a) Source # | |
Defined in Hasura.RQL.IR.BoolExp | |
FromJSON field => FromJSON (DWithinGeomOp field) Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods parseJSON :: Value -> Parser (DWithinGeomOp field) parseJSONList :: Value -> Parser [DWithinGeomOp field] | |
ToJSON field => ToJSON (DWithinGeomOp field) Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods toJSON :: DWithinGeomOp field -> Value toEncoding :: DWithinGeomOp field -> Encoding toJSONList :: [DWithinGeomOp field] -> Value toEncodingList :: [DWithinGeomOp field] -> Encoding | |
Cacheable a => Cacheable (DWithinGeomOp a) Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods unchanged :: Accesses -> DWithinGeomOp a -> DWithinGeomOp a -> Bool Source # | |
type Rep (DWithinGeomOp field) Source # | |
Defined in Hasura.RQL.IR.BoolExp type Rep (DWithinGeomOp field) = D1 ('MetaData "DWithinGeomOp" "Hasura.RQL.IR.BoolExp" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "DWithinGeomOp" 'PrefixI 'True) (S1 ('MetaSel ('Just "dwgeomDistance") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 field) :*: S1 ('MetaSel ('Just "dwgeomFrom") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 field))) |
data DWithinGeogOp field Source #
Operand for STDWithin opoerator
Constructors
DWithinGeogOp | |
Fields
|
Instances
Functor DWithinGeogOp Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods fmap :: (a -> b) -> DWithinGeogOp a -> DWithinGeogOp b # (<$) :: a -> DWithinGeogOp b -> DWithinGeogOp a # | |
Foldable DWithinGeogOp Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods fold :: Monoid m => DWithinGeogOp m -> m # foldMap :: Monoid m => (a -> m) -> DWithinGeogOp a -> m # foldMap' :: Monoid m => (a -> m) -> DWithinGeogOp a -> m # foldr :: (a -> b -> b) -> b -> DWithinGeogOp a -> b # foldr' :: (a -> b -> b) -> b -> DWithinGeogOp a -> b # foldl :: (b -> a -> b) -> b -> DWithinGeogOp a -> b # foldl' :: (b -> a -> b) -> b -> DWithinGeogOp a -> b # foldr1 :: (a -> a -> a) -> DWithinGeogOp a -> a # foldl1 :: (a -> a -> a) -> DWithinGeogOp a -> a # toList :: DWithinGeogOp a -> [a] # null :: DWithinGeogOp a -> Bool # length :: DWithinGeogOp a -> Int # elem :: Eq a => a -> DWithinGeogOp a -> Bool # maximum :: Ord a => DWithinGeogOp a -> a # minimum :: Ord a => DWithinGeogOp a -> a # sum :: Num a => DWithinGeogOp a -> a # product :: Num a => DWithinGeogOp a -> a # | |
Traversable DWithinGeogOp Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods traverse :: Applicative f => (a -> f b) -> DWithinGeogOp a -> f (DWithinGeogOp b) # sequenceA :: Applicative f => DWithinGeogOp (f a) -> f (DWithinGeogOp a) # mapM :: Monad m => (a -> m b) -> DWithinGeogOp a -> m (DWithinGeogOp b) # sequence :: Monad m => DWithinGeogOp (m a) -> m (DWithinGeogOp a) # | |
Eq field => Eq (DWithinGeogOp field) Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods (==) :: DWithinGeogOp field -> DWithinGeogOp field -> Bool # (/=) :: DWithinGeogOp field -> DWithinGeogOp field -> Bool # | |
Data field => Data (DWithinGeogOp field) Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DWithinGeogOp field -> c (DWithinGeogOp field) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (DWithinGeogOp field) # toConstr :: DWithinGeogOp field -> Constr # dataTypeOf :: DWithinGeogOp field -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (DWithinGeogOp field)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (DWithinGeogOp field)) # gmapT :: (forall b. Data b => b -> b) -> DWithinGeogOp field -> DWithinGeogOp field # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DWithinGeogOp field -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DWithinGeogOp field -> r # gmapQ :: (forall d. Data d => d -> u) -> DWithinGeogOp field -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> DWithinGeogOp field -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DWithinGeogOp field -> m (DWithinGeogOp field) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DWithinGeogOp field -> m (DWithinGeogOp field) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DWithinGeogOp field -> m (DWithinGeogOp field) # | |
Show field => Show (DWithinGeogOp field) Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods showsPrec :: Int -> DWithinGeogOp field -> ShowS # show :: DWithinGeogOp field -> String # showList :: [DWithinGeogOp field] -> ShowS # | |
Generic (DWithinGeogOp field) Source # | |
Defined in Hasura.RQL.IR.BoolExp Associated Types type Rep (DWithinGeogOp field) :: Type -> Type # Methods from :: DWithinGeogOp field -> Rep (DWithinGeogOp field) x # to :: Rep (DWithinGeogOp field) x -> DWithinGeogOp field # | |
NFData a => NFData (DWithinGeogOp a) Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods rnf :: DWithinGeogOp a -> () # | |
Hashable a => Hashable (DWithinGeogOp a) Source # | |
Defined in Hasura.RQL.IR.BoolExp | |
FromJSON field => FromJSON (DWithinGeogOp field) Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods parseJSON :: Value -> Parser (DWithinGeogOp field) parseJSONList :: Value -> Parser [DWithinGeogOp field] | |
ToJSON field => ToJSON (DWithinGeogOp field) Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods toJSON :: DWithinGeogOp field -> Value toEncoding :: DWithinGeogOp field -> Encoding toJSONList :: [DWithinGeogOp field] -> Value toEncodingList :: [DWithinGeogOp field] -> Encoding | |
Cacheable a => Cacheable (DWithinGeogOp a) Source # | |
Defined in Hasura.RQL.IR.BoolExp Methods unchanged :: Accesses -> DWithinGeogOp a -> DWithinGeogOp a -> Bool Source # | |
type Rep (DWithinGeogOp field) Source # | |
Defined in Hasura.RQL.IR.BoolExp type Rep (DWithinGeogOp field) = D1 ('MetaData "DWithinGeogOp" "Hasura.RQL.IR.BoolExp" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "DWithinGeogOp" 'PrefixI 'True) (S1 ('MetaSel ('Just "dwgeogDistance") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 field) :*: (S1 ('MetaSel ('Just "dwgeogFrom") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 field) :*: S1 ('MetaSel ('Just "dwgeogUseSpheroid") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 field)))) |
data STIntersectsNbandGeommin field Source #
Operand for STIntersect
Constructors
STIntersectsNbandGeommin | |
Fields
|
Instances
data STIntersectsGeomminNband field Source #
Operand for STIntersect
Constructors
STIntersectsGeomminNband | |
Fields
|
Instances
newtype AnnColumnCaseBoolExpField (backend :: BackendType) field Source #
This is a simple newtype over AnnBoolExpFld. At time of writing, I do not know why we want this, and why it exists. It might be a relic of a needed differentiation, now lost? TODO: can this be removed?
Constructors
AnnColumnCaseBoolExpField | |
Fields
|
Instances
type AnnColumnCaseBoolExp b a = GBoolExp b (AnnColumnCaseBoolExpField b a) Source #
type AnnColumnCaseBoolExpPartialSQL b = AnnColumnCaseBoolExp b (PartialSQLExp b) Source #
type PreSetColsG b v = HashMap (Column b) v Source #
type PreSetColsPartial b = HashMap (Column b) (PartialSQLExp b) Source #