Copyright | Flipstone Technology Partners 2023 |
---|---|
License | MIT |
Stability | Stable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Provides a type representing SQL operators with exactly two arguments, as well as values of that type for many common operators.
Since: 1.0.0.0
Synopsis
- data BinaryOperator
- binaryOperator :: String -> BinaryOperator
- binaryOpExpression :: SqlExpression sql => BinaryOperator -> ValueExpression -> ValueExpression -> sql
- equalsOp :: BinaryOperator
- notEqualsOp :: BinaryOperator
- greaterThanOp :: BinaryOperator
- lessThanOp :: BinaryOperator
- greaterThanOrEqualsOp :: BinaryOperator
- lessThanOrEqualsOp :: BinaryOperator
- likeOp :: BinaryOperator
- iLikeOp :: BinaryOperator
- orOp :: BinaryOperator
- andOp :: BinaryOperator
- plusOp :: BinaryOperator
- minusOp :: BinaryOperator
- multiplicationOp :: BinaryOperator
- divisionOp :: BinaryOperator
- moduloOp :: BinaryOperator
- exponentiationOp :: BinaryOperator
- bitwiseAndOp :: BinaryOperator
- bitwiseOrOp :: BinaryOperator
- bitwiseXorOp :: BinaryOperator
- bitwiseShiftLeftOp :: BinaryOperator
- bitwiseShiftRightOp :: BinaryOperator
Documentation
data BinaryOperator Source #
Type to represent any SQL operator of two arguments. E.G.
AND
BinaryOperator
provides a SqlExpression
instance. See
unsafeSqlExpression
for how to construct a value with your own custom
SQL.
Since: 1.0.0.0
Instances
SqlExpression BinaryOperator Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.BinaryOperator toRawSql :: BinaryOperator -> RawSql Source # |
binaryOperator :: String -> BinaryOperator Source #
Construct a binary operator. Note that this does not include any check to determine if the operator is valid, either by being a native SQL operator, or a custom-defined operator in the database.
Since: 1.0.0.0
binaryOpExpression :: SqlExpression sql => BinaryOperator -> ValueExpression -> ValueExpression -> sql Source #
Apply a binary operator to two ValueExpression
s resulting in some
SqlExpression
. Note that this does *NOT* extend typechecking to the ValueExpression
s
being used with the BinaryOperator
. It is left to the caller to ensure that the operator makes
sense with the arguments being passed.
Since: 1.0.0.0
equalsOp :: BinaryOperator Source #
The SQL equal binary operator.
Since: 1.0.0.0
notEqualsOp :: BinaryOperator Source #
The SQL not equal binary operator.
Since: 1.0.0.0
greaterThanOp :: BinaryOperator Source #
The SQL strictly greater than binary operator.
Since: 1.0.0.0
lessThanOp :: BinaryOperator Source #
The SQL strictly less than binary operator.
Since: 1.0.0.0
greaterThanOrEqualsOp :: BinaryOperator Source #
The SQL greater than or equal binary operator.
Since: 1.0.0.0
lessThanOrEqualsOp :: BinaryOperator Source #
The SQL less than or equal binary operator.
Since: 1.0.0.0
likeOp :: BinaryOperator Source #
The SQL LIKE binary operator.
Since: 1.0.0.0
iLikeOp :: BinaryOperator Source #
The SQL ILIKE binary operator.
Since: 1.0.0.0
orOp :: BinaryOperator Source #
The SQL logical or binary operator.
Since: 1.0.0.0
andOp :: BinaryOperator Source #
The SQL logical and binary operator.
Since: 1.0.0.0
plusOp :: BinaryOperator Source #
The SQL + binary operator.
Since: 1.0.0.0
minusOp :: BinaryOperator Source #
The SQL - binary operator.
Since: 1.0.0.0
multiplicationOp :: BinaryOperator Source #
The SQL * binary operator.
Since: 1.0.0.0
divisionOp :: BinaryOperator Source #
The SQL / binary operator.
Since: 1.0.0.0
moduloOp :: BinaryOperator Source #
The SQL % binary operator.
Since: 1.0.0.0
exponentiationOp :: BinaryOperator Source #
The SQL ^ binary operator.
Since: 1.0.0.0
bitwiseAndOp :: BinaryOperator Source #
The SQL bitwise and (a.k.a &) binary operator.
Since: 1.0.0.0
bitwiseOrOp :: BinaryOperator Source #
The SQL bitwise or (a.k.a |) binary operator.
Since: 1.0.0.0
bitwiseXorOp :: BinaryOperator Source #
The SQL bitwise exclusive or (a.k.a #) binary operator.
Since: 1.0.0.0
bitwiseShiftLeftOp :: BinaryOperator Source #
The SQL bitwise left shift (a.k.a <<) binary operator.
Since: 1.0.0.0
bitwiseShiftRightOp :: BinaryOperator Source #
The SQL bitwise right shift (a.k.a >>) binary operator.
Since: 1.0.0.0