Safe Haskell | None |
---|---|
Language | Haskell2010 |
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.
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 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 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 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 parseJSON :: Value -> Parser (GBoolExp b a) parseJSONList :: Value -> Parser [GBoolExp b a] | |
(Backend backend, ToJSONKeyValue field) => ToJSON (GBoolExp backend field) Source # | |
Defined in Hasura.RQL.IR.BoolExp 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 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 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 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 parseJSON :: Value -> Parser (GExists b a) parseJSONList :: Value -> Parser [GExists b a] | |
(Backend b, ToJSONKeyValue a) => ToJSON (GExists b a) Source # | |
Defined in Hasura.RQL.IR.BoolExp 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 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 parseJSONKeyValue :: (Key, Value) -> Parser ColExp Source # | |
ToJSONKeyValue ColExp Source # | |
Defined in Hasura.RQL.IR.BoolExp 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 parseJSON :: Value -> Parser (BoolExp b) parseJSONList :: Value -> Parser [BoolExp b] | |
Backend b => ToJSON (BoolExp b) Source # | |
Defined in Hasura.RQL.IR.BoolExp toEncoding :: BoolExp b -> Encoding toJSONList :: [BoolExp b] -> Value toEncodingList :: [BoolExp b] -> Encoding | |
Wrapped (BoolExp b) Source # | |
Defined in Hasura.RQL.IR.BoolExp 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.
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
.
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 #
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.
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.
AnnComputedFieldBoolExp | |
|
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.
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
DWithinGeomOp | |
|
Instances
data DWithinGeogOp field Source #
Operand for STDWithin opoerator
DWithinGeogOp | |
|
Instances
data STIntersectsNbandGeommin field Source #
Operand for STIntersect
STIntersectsNbandGeommin | |
|
Instances
data STIntersectsGeomminNband field Source #
Operand for STIntersect
STIntersectsGeomminNband | |
|
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?
AnnColumnCaseBoolExpField | |
|
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 #