Droplet.Language.Internal.Condition
- Package
- purescript-droplet
- Repository
- easafe/purescript-droplet
Logical operators for filtering records
Do not import this module directly, it will break your code and make it not type safe. Use the sanitized Droplet.Language
instead
#ToCondition Source
class ToCondition :: Type -> Row Type -> Symbol -> Constraint
class ToCondition (c :: Type) (fields :: Row Type) (alias :: Symbol)
SQL logical expressions
Instances
(ToCondition (Op a b) fields alias, ToCondition (Op c d) fields alias) => ToCondition (Op (Op a b) (Op c d)) fields alias
ToCondition (Op Exists b) fields alias
(Cons name t d fields, IsNullable t) => ToCondition (Op IsNull (Proxy name)) fields alias
(Cons name t d fields, IsNullable t) => ToCondition (Op IsNull (Path alias name)) fields alias
ToCondition (Op IsNull (Path table name)) fields alias
(Cons name t d fields, IsNullable t) => ToCondition (Op IsNotNull (Proxy name)) fields alias
(Cons name t d fields, IsNullable t) => ToCondition (Op IsNotNull (Path alias name)) fields alias
ToCondition (Op IsNotNull (Path table name)) fields alias
(ToCondition a fields alias) => ToCondition (Op Not a) fields alias
(ToCondition (Op a b) fields alias) => ToCondition (Op In (Op a (NonEmptyArray b))) fields alias
(Comparison a fields alias t, Comparison b fields alias u, ValidComparision t u) => ToCondition (Op a b) fields alias
#ValidComparision Source
#OuterScope Source
data OuterScope
Instances
Comparison (Path table name) fields alias OuterScope
ValidComparision t OuterScope
ValidComparision OuterScope t
#In Source
data In
Instances
(ToCondition (Op a b) fields alias) => ToCondition (Op In (Op a (NonEmptyArray b))) fields alias
#Comparison Source
class Comparison :: Type -> Row Type -> Symbol -> Type -> Constraint
class Comparison (c :: Type) (fields :: Row Type) (alias :: Symbol) (t :: Type) | c -> fields t
Whether expression can be compared
Instances
(Cons name t d fields, UnwrapDefinition t u, UnwrapNullable u v) => Comparison (Proxy name) fields alias v
(Cons name t d fields, UnwrapDefinition t u, UnwrapNullable u v) => Comparison (Path alias name) fields alias v
Comparison (Path table name) fields alias OuterScope
(Fail (Text "Comparisons must not be wrapped in Maybe")) => Comparison (Maybe t) fields alias t
(ToValue t) => Comparison t fields alias t
#Op Source
data Op b c
Wrapper for comparisons
Constructors
Op (Maybe BinaryOperator) b c
Instances
(ToCondition (Op a b) fields alias, ToCondition (Op c d) fields alias) => ToCondition (Op (Op a b) (Op c d)) fields alias
AND/OR
ToCondition (Op Exists b) fields alias
(Cons name t d fields, IsNullable t) => ToCondition (Op IsNull (Proxy name)) fields alias
(Cons name t d fields, IsNullable t) => ToCondition (Op IsNull (Path alias name)) fields alias
ToCondition (Op IsNull (Path table name)) fields alias
(Cons name t d fields, IsNullable t) => ToCondition (Op IsNotNull (Proxy name)) fields alias
(Cons name t d fields, IsNullable t) => ToCondition (Op IsNotNull (Path alias name)) fields alias
ToCondition (Op IsNotNull (Path table name)) fields alias
(ToCondition a fields alias) => ToCondition (Op Not a) fields alias
(ToCondition (Op a b) fields alias) => ToCondition (Op In (Op a (NonEmptyArray b))) fields alias
(Comparison a fields alias t, Comparison b fields alias u, ValidComparision t u) => ToCondition (Op a b) fields alias
#IsNotNull Source
data IsNotNull
Constructors
Instances
(Cons name t d fields, IsNullable t) => ToCondition (Op IsNotNull (Proxy name)) fields alias
(Cons name t d fields, IsNullable t) => ToCondition (Op IsNotNull (Path alias name)) fields alias
ToCondition (Op IsNotNull (Path table name)) fields alias
#IsNull Source
data IsNull
Constructors
Instances
(Cons name t d fields, IsNullable t) => ToCondition (Op IsNull (Proxy name)) fields alias
(Cons name t d fields, IsNullable t) => ToCondition (Op IsNull (Path alias name)) fields alias
ToCondition (Op IsNull (Path table name)) fields alias
#BinaryOperator Source
#greaterThan Source
greaterThan :: forall compared field. field -> compared -> Op field compared
#lesserThan Source
lesserThan :: forall compared field. field -> compared -> Op field compared
#greaterEqualsThan Source
greaterEqualsThan :: forall compared field. field -> compared -> Op field compared
#lesserEqualsThan Source
lesserEqualsThan :: forall compared field. field -> compared -> Op field compared
#(.&&.) Source
Operator alias for Droplet.Language.Internal.Condition.and (left-associative / precedence 3)
#(.<>.) Source
Operator alias for Droplet.Language.Internal.Condition.notEquals (non-associative / precedence 4)
#(.=.) Source
Operator alias for Droplet.Language.Internal.Condition.equals (non-associative / precedence 4)
#(.||.) Source
Operator alias for Droplet.Language.Internal.Condition.or (left-associative / precedence 2)
#(.<.) Source
Operator alias for Droplet.Language.Internal.Condition.lesserThan (non-associative / precedence 4)
#(.>.) Source
Operator alias for Droplet.Language.Internal.Condition.greaterThan (non-associative / precedence 4)
- Modules
- Droplet.
Driver - Droplet.
Driver. Internal. Migration - Droplet.
Driver. Internal. Pool - Droplet.
Driver. Internal. Query - Droplet.
Driver. Migration - Droplet.
Driver. Unsafe - Droplet.
Language - Droplet.
Language. Internal. Condition - Droplet.
Language. Internal. Definition - Droplet.
Language. Internal. Function - Droplet.
Language. Internal. Syntax - Droplet.
Language. Internal. Token - Droplet.
Language. Internal. Translate
AND/OR