Idris2Doc : Sqlite3.Expr

Sqlite3.Expr

(source)

Definitions

dataNumeric : SqliteType->Type
Totality: total
Visibility: public export
Constructors:
N_INTEGER : NumericINTEGER
N_REAL : NumericREAL
dataExpr : Schema->SqliteType->Type
  A syntax tree type representing well-typed SQLite expressions.

Totality: total
Visibility: public export
Constructors:
Lit : (t : SqliteType) ->IdrisTypet->Exprst
  A literal value in an SQL expression
NULL : Exprst
  The `NULL` literal
TRUE : ExprsBOOL
  Alias for the literal `1`, which corresponds to `True` in
boolean expressions
FALSE : ExprsBOOL
  Alias for the literal `0`, which corresponds to `False` in
boolean expressions
Raw : String->Exprst
  A raw expressions string that will be used as given.
Col : (col : String) -> {auto0p : IsJust (FindSchemaColcols)} ->Exprs (SchemaColTypecols)
  A column in a list of tables. Typically, it is convenient to
use string literals directly for this (see `Expr.fromString`).
(>) : Exprst->Exprst->ExprsBOOL
  Greater-than operator.

Note, that this is subject to SQL's three-valued logic in the
presence of `NULL`.
(<) : Exprst->Exprst->ExprsBOOL
  Less-than operator.

Note, that this is subject to SQL's three-valued logic in the
presence of `NULL`.
(>=) : Exprst->Exprst->ExprsBOOL
  Greater-than or equals operator.

Note, that this is subject to SQL's three-valued logic in the
presence of `NULL`.
(<=) : Exprst->Exprst->ExprsBOOL
  Less-than or equals operator.

Note, that this is subject to SQL's three-valued logic in the
presence of `NULL`.
(==) : Exprst->Exprst->ExprsBOOL
  Equality operator.

Note, that this is subject to SQL's three-valued logic in the
presence of `NULL`.
(/=) : Exprst->Exprst->ExprsBOOL
  Inequality operator.

We use the same operator as in the `Eq` interface here, but this
corresponds to SQL's `<>` (or `!=`) operator.

Note, that this is subject to SQL's three-valued logic in the
presence of `NULL`.
IS : Exprst->Exprst->ExprsBOOL
  Equality test.

Unlike `(==)`, this will always result in `TRUE` or `FALSE`
even in the presence of `NULL`.
IS_NOT : Exprst->Exprst->ExprsBOOL
  Inequality test.

Unlike `(==)`, this will always result in `TRUE` or `FALSE`
even in the presence of `NULL`.
(&&) : ExprsBOOL->ExprsBOOL->ExprsBOOL
  Logical `AND`.

Note, that this is subject to SQL's three-valued logic in the
presence of `NULL`.
(||) : ExprsBOOL->ExprsBOOL->ExprsBOOL
  Logical `OR`.

Note, that this is subject to SQL's three-valued logic in the
presence of `NULL`.
NOT : ExprsBOOL->ExprsBOOL
  Logical negation.

Note, that this is subject to SQL's three-valued logic in the
presence of `NULL`.
(.&.) : ExprsINTEGER->ExprsINTEGER->ExprsINTEGER
  Bit-wise `AND`.

This corresponds to SQLite's `&` operator.
(.|.) : ExprsINTEGER->ExprsINTEGER->ExprsINTEGER
  Bit-wise `OR`.

This corresponds to SQLite's `|` operator.
ShiftL : ExprsINTEGER->ExprsINTEGER->ExprsINTEGER
  Bit-wise left shift.

This corresponds to SQLite's `<<` operator.
ShiftR : ExprsINTEGER->ExprsINTEGER->ExprsINTEGER
  Bit-wise right shift.

This corresponds to SQLite's `>>` operator.
Add : {auto0_ : Numerict} ->Exprst->Exprst->Exprst
  Numeric addition.

Since `Expr s t` implements `Num` for numeric types `t`, you can
typically use the addition operator `(+)` instead of this constructor.
Mult : {auto0_ : Numerict} ->Exprst->Exprst->Exprst
  Numeric multiplication.

Since `Expr s t` implements `Num` for numeric types `t`, you can
typically use the multiplication operator `(*)` instead of this
constructor.
Sub : {auto0_ : Numerict} ->Exprst->Exprst->Exprst
  Numeric subtraction.

Since `Expr s t` implements `Neg` for numeric types `t`, you can
typically use the subtraction operator `(-)` instead of this
constructor.
Abs : {auto0_ : Numerict} ->Exprst->Exprst
  Computes the absolute of an expressions.

This corresponds to the `abs()` function.
Neg : {auto0_ : Numerict} ->Exprst->Exprst
  Numeric negation.
Div : {auto0_ : Numerict} ->Exprst->Exprst->Exprst
  Numeric division.

Since `Expr s t` implements `Integral` for numeric types `INTEGER`,
you can typically use `div` for integer division. Likewise, you can
use `(/)` for floating point division.
Mod : ExprsINTEGER->ExprsINTEGER->ExprsINTEGER
  Computes the modulus of two integers.

This corresponds to the `%` operator in SQL.
(++) : ExprsTEXT->ExprsTEXT->ExprsTEXT
  String concatenation.

This corresponds to the `||` operator in SQL.
CURRENT_TIME : ExprsTEXT
  The current time as a string.
CURRENT_DATE : ExprsTEXT
  The current date as a string.
CURRENT_TIMESTAMP : ExprsTEXT
  The current date and time as a string.
LIKE : ExprsTEXT->ExprsTEXT->ExprsBOOL
  Matches the given text expression against the given
text pattern.
GLOB : ExprsTEXT->ExprsTEXT->ExprsBOOL
  Matches the given text expression against the given
GLOB pattern.
IN : Exprst->List (Exprst) ->ExprsBOOL
  True, if the given value appears in the given list of values.
COALESCE : List (Exprst) ->Exprst
  Returns the first non-NULL value in the given list of expressions.
COUNT : Exprst->ExprsINTEGER
  Counts the number of aggregated values.

This is typically used with a `GROUP BY` statement.
AVG : {auto0_ : Numerict} ->Exprst->ExprsREAL
  Returns the average of accumulated values.

This is typically used with a `GROUP BY` statement.
SUM : {auto0_ : Numerict} ->Exprst->Exprst
  Returns the sum of accumulated values.

This is typically used with a `GROUP BY` statement.
MIN : Exprst->Exprst
  Returns the minimum of accumulated values.

This is typically used with a `GROUP BY` statement.
MAX : Exprst->Exprst
  Returns the maximum of accumulated values.

This is typically used with a `GROUP BY` statement.
GROUP_CONCAT : ExprsTEXT->String->ExprsTEXT
  Concatenates aggregated text values using the given separator.

This is typically used with a `GROUP BY` statement.

Hints:
Fractional (ExprsREAL)
FromDouble (ExprsREAL)
Integral (ExprsINTEGER)
Neg (ExprsINTEGER)
Neg (ExprsREAL)
Num (ExprsINTEGER)
Num (ExprsREAL)
fromString : (col : String) -> {auto0p : IsJust (FindSchemaColcols)} ->Exprs (SchemaColTypecols)
Totality: total
Visibility: export
val : {auto{conArg:13694} : ToCella} ->a->Exprs (ToCellTypea)
  Convert a value of a marshallable type to a literal expression.

Totality: total
Visibility: export
text : String->ExprsTEXT
Totality: total
Visibility: export
int : Int64->ExprsINTEGER
Totality: total
Visibility: export
blob : ByteString->ExprsBLOB
Totality: total
Visibility: export
real : Double->ExprsREAL
Totality: total
Visibility: export
commaSep : (a->String) ->Lista->String
  Converts a list of values to strings and concatenates them using
a comma as the separator.

Totality: total
Visibility: export
encodeText : String->String
  Encodes a `String` as an SQL literal.

The whole string is wrapped in single quotes. Single quotes withing
the string are escaped by doubling them.

Totality: total
Visibility: export
encodeLit : (t : SqliteType) ->IdrisTypet->String
  Encodes an SQL literal as a string.

Totality: total
Visibility: export
encodeExpr : Exprst->String
  Encodes an expression as a string.

Literals will be correctly escaped and converted.

Note: See module `Sqlite3.Parameter` for encoding of expressions
with SQL parameters that will be bound separately when
binding the statement.

Totality: total
Visibility: export