LucidDbValueExpression

From Eigenpedia

Jump to: navigation, search

Syntax

value-expression ::=
| value-expression { + | - | * | / } value-expression
| { + | - } value-expression
| character-value-expression || character-value-expression
| subquery
| ( value-expression )
| literal
| dynamic-parameter
| builtin-function-call
| named-function-call
| context-variable
| column-reference
| case-expression
| predicate-expression
predicate-expression ::=
value-expression [ NOT ] IN ( query-expression | value-expression, ... )
| EXISTS ( query-expression )
| value-expression | [ NOT ] BETWEEN [ SYMMETRIC | ASYMMETRIC ] value-expression AND value-expression
| value-expression [ NOT ] { LIKE | SIMILAR TO } value-expression [ ESCAPE value-expression ]
| value-expression comparison-operator value-expression
| NOT predicate-expression 
| predicate-expression { AND | OR } predicate-expression
| value-expression IS [ NOT ] NULL
| predicate-expression IS [ NOT ] { TRUE | FALSE | UNKNOWN }
| boolean-value-expression
subquery ::= ( query-expression )
dynamic-parameter ::= ?
context-variable ::=
CURENT_DATE
| CURRENT_TIME
| CURRENT_TIMESTAMP
| LOCALTIME
| LOCALTIMESTAMP
| CURRENT_ROLE
| CURRENT_USER
| USER
| SESSION_USER
| SYSTEM_USER
| CURRENT_PATH
comparison-operator ::= { = | > | < | <= | >= | <> | IS [ NOT ] DISTINCT FROM }
case-expression ::= case-expression-by-value | case-expression-searched
case-expression-by-value :: = CASE value-expression { case-when-value-then, ... } ELSE value-expression END
case-expression-searched ::= CASE { case-when-predicate-then, ... } ELSE value-expression END
case-when-value-then ::= WHEN value-expression THEN value-expression
case-when-predicate-then ::= WHEN predicate-expression THEN value-expression
named-function-call ::=
[ SPECIFIC ] qualified-function-name ( [ value-expression, ... ] )
builtin-function-call ::=
CAST ( { value-expression | null } AS data-type )
| POSITION ( character-value-expression IN character-value-expression )
| OVERLAY ( character-value-expression PLACING character-value-expression FROM integer-value-expression [ FOR integer-value-expression ] )
| { FLOOR | CEIL | CEILING } ( numeric-value-expression )
| SUBSTRING ( character-value-expression { FROM | , } integer-value-expression [ FOR integer-value-expression ] )
| TRIM ( [ BOTH | TRAILING | LEADING ] [ character-value-expression ] [ FROM ] character-value-expression )
| CHAR_LENGTH ( character-value-expression )
| CHARACTER_LENGTH ( character-value-expression )
literal ::=
character-literal
| binary-literal
| numeric-literal
| boolean-literal
| datetime-literal
character-literal ::= 'xyz...'
binary-literal ::= { x | X } 'FFFF...'
numeric-literal ::= [ + | - ] 999... [ . 999... ] [ { e | E } [ + | - ] 999... ]
boolean-literal ::= TRUE | FALSE | UNKNOWN
datetime-literal ::= 
DATE 'yyyy-mm-dd'
| TIME 'hh:mm:ss[.fff...]'
| TIMESTAMP 'yyyy-mm-dd hh:mm:ss[.fff...]'

See LucidDbDataTypes for specification of data-type.

See LucidDbQueryStatement for specification of query-expression.

Built in function details

  • ABS - Returns the absolute value of a numeric expression
  • CEIL - Returns the smallest integer greater than or equal to a numeric expression
  • CHAR_LENGTH - Returns the number of characters within a string
  • COALESCE - Returns the first non-null argument from a list of arguments
  • CURRENT_DATE - Returns the current date
  • CURRENT_PATH - Returns the current path
  • CURRENT_ROLE - Returns the current role
  • CURRENT_TIME - Returns the current time in GMT
  • CURRENT_TIMESTAMP - Returns the current timestamp in GMT
  • CURRENT_USER - Returns the currently active authorization ID
  • EXP - Returns the exponential value of a numeric expression
  • EXTRACT - extracts subfield from interval value
  • FLOOR - Returns the largest integer less than or equal to a numeric expression
  • INITCAP - Capitalizes the first character and lowercases the rest of the characters for all words within a string
  • LN - Returns the natural logarithm
  • LOCALTIME - Returns the current time for the local timezone (Note: this currently returns GMT since timezones are not supported)
  • LOCALTIMESTAMP - Returns the current timestamp for the local timezone. (Note: this currently returns GMT since timezones are not supported)
  • LOG10 - Returns the base 10 logarithm
  • LOWER - Converts a string to all lowercase characters
  • MOD - returns the result of the modulo operation given a dividend and divisor
  • NULLIF - Compares two values and returns NULL if they are equal, otherwise returns the first value
  • OVERLAY - Replaces a substring within a string given the starting postion, replacement string, and optionally, the length
  • POSITION - Returns the position of a substring within a string
  • POWER - Returns the value of a number raised to the nth power
  • SESSION_USER - Returns the authorization ID for which this session was created
  • SUBSTRING - Extracts a substring from a string
  • SYSTEM_USER - Returns the currently active username for the host operating system
  • TRIM - Removes repetitions of the specified characters from either the beginning or ending of a string
  • UPPER - Converts a string to all uppercase characters
Personal tools