orville-postgresql-1.0.0.0: A Haskell library for PostgreSQL
CopyrightFlipstone Technology Partners 2023
LicenseMIT
StabilityStable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Orville.PostgreSQL.Expr.BinaryOperator

Description

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

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

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 ValueExpressions resulting in some SqlExpression. Note that this does *NOT* extend typechecking to the ValueExpressions 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