INT
, UINT
, FLOAT
, DOUBLE
)numeric
UINT
GSQL_UINT_MAX
INT
GSQL_INT_MAX
GSQL_INT_MIN
boolean
TRUE
FALSE
GSL_UINT_MAX
= 2 ^ 64 - 1 = 18446744073709551615GSQL_INT_MAX
= 2 ^ 63 - 1 = 9223372036854775807GSQL_INT_MIN
= -2 ^ 63 = -9223372036854775808+
and subtraction -
.LIKE
operator is used for string pattern matching and can only be used in WHERE
clauses. The expression string1 LIKE string_pattern
evaluates to boolean true if string1
matches the pattern in string_pattern
; otherwise, it is false. string1
can be a function call (e.g. lower(string_variable)
, string_pattern
must be a string literal or a parameter. A string_pattern
can contain characters as well as the following wildcard and other special symbols, in order to express a pattern (<char_list>
indicates a placeholder):%
%abc%
matches any string which contains the sequence "abc"
._
(underscore)_abc_e
matches any 6-character string where the 2nd to 4th characters are "abc"
and the last character is "e"
.[<char_list>]
[Tiger]
matches either T
, i
, g
, e
, or r
.[^<char_list>]
[^qxz]
matches any character other than q
, x
, or z
.[!<char_list>]
α-β
[a-mA-M0-3]
matches a letter from a to m, upper or lower case, or a digit from 0 to 3.\\
\
\\]
]
No special treatment is needed for [ inside a char list.
%[\\]!]
matches any string which ends with either ]
or !
ESCAPE escape_char
ESCAPE escape_char
clause is used to define an escape character. When escape_char
occurs in string_pattern
, then the next character is interpreted literally, instead of as a pattern matching operator. For example, if we want to specify the pattern "any string ending with the '%'
character", we could use
"%\%" ESCAPE "\"
"%"
has its usual pattern-matching meaning "zero or more characters".
"\%"
means a literal percentage character, because it starts with the escape character "\"
.@@max_diff
as the absolute value of the difference between the post-ACCUM score ([email protected]
) and the pre-ACCUM score ([email protected]'
).RETURNS
header following its CREATE
statement is called a subquery. A subquery acts as a callable function in GSQL. They take parameters, perform a set of actions, and return a value at the end. A subquery must end with a return statement to pass its output value to a query. Exactly one type is allowed in the RETURNS
header, and thus the RETURN
statement can only return one expression.INSTALL QUERY
command with the query that calls the subquery.INT
, UINT
, FLOAT
, DOUBLE
, STRING
, BOOL
VERTEX
VERTEX
elementsBagAccum
. SetAccum
, or ListAccum
with a tuple as its element, the tuple does not need to be defined at the catalog level and can be anonymous. person1
, search to a distance of 1 and a distance of 2.