picoSQL - Language reference manual


4) Expressions


An expression is a single value that can also be computed using some operations. We call 'numeric expression' an expression whose result is a number. A numeric expression is formed from numeric literals, numeric dynamic parameters, numeric columns identifiers and numeric function results (see in the continuation). You can combine all this elements using the 4 arithmetic operators and get a new numeric expression. The allowed operators are, in the precedence order:

- unary minus;

* / multiplicatoin and division;

+ - addition and subtraction.

Operataions with the same precedence are executed left to right. The execution precedence order can be altered using parenthesis.

We call 'string expression' an expression whose result is a string. A string expression is formed from string literals, string dynamic parameters, string columns identifiers and string function results (see in the continuation).

We call 'datre/time expression' an expression whose result is a time, a data or a timestamp. A time expression is formed from escape sequences, dynamic parameters, time/data/timestamp columns identifiers and time/data/timestamp function results (see in the continuation).

In the current release, additions and subtractions between a number and a time expression are allowed and the result is a new time expression equal to the original one plus/less the seconds specified by the number.


Index Prevoius Next