UltipaDocs
Try Playground
  • Introduction
  • Terminologies
    • Graphset
    • Schema
    • Property
    • Constraints
    • Insert
    • Overwrite or Insert
    • Upsert
    • Update
    • Delete
    • Find Nodes
    • Find Edges
      • AB
      • Autonet
      • Spread
      • Path Template
      • K-Hop
      • K-Hop Template
    • GROUP BY
    • ORDER BY
    • SKIP
    • LIMIT
    • WHERE
    • RETURN
    • WITH
    • UNCOLLECT
    • UNION
    • UNION ALL
    • CALL
    • All Functions
    • Path Functions
    • Aggregate Functions
    • Mathematical Functions
    • Trigonometric Functions
    • String Functions
    • List Functions
    • Datetime Functions
    • Spatial Functions
    • Table Functions
    • Null Functions
    • Type Conversion Functions
  • Operators
  • Expressions
    • Index
    • Full-text Index
    • Vector Index
    • Cache
    • Overview
    • Managing HDC Graphs
    • HDC Graph Queries
    • Process
    • Job
    • Execution Plan
    • Alias
    • Filter
    • Values and Types
    • Data Flow in Queries
    • Comments
    • Reserved Words
  • Access Control
  1. Docs
  2. /
  3. UQL
  4. /
  5. Functions

All Functions

This section contains a summary of all functions supported in UQL.

Function Naming Convention

For function names that follow the camelCase convention (e.g., pedgeUuids()), the name must be used exactly as defined, preserving the original capitalization.

For function names that do not follow camelCase, it is acceptable to use either all uppercase or all lowercase when referencing them (e.g., length() or LENGTH()).

Path Functions

Function
Description
length()Returns the number of edges in a path.
pedges()Collects edges in a path into a list.
pedgeUuids()Collects the _uuid values of edges in a path into a list.
pnodes()Collects nodes in a path into a list.
pnodeIds()Collects the _id values of nodes in a path into a list.

Aggregate Functions

Function
Description
avg()Computes the average of a set of numeric values.
collect()Collects a set of values into a list.
count()Returns the number of rows in the input.
max()Returns the maximum value in a set of values.
min()Returns the minimum value in a set of values.
stddev_pop()Computes the population standard deviation of a set of numeric values.
stddev_samp()Computes the sample standard deviation of a set of numeric values.
sum()Computes the sum of a set of numeric values.

Mathematical Functions

Function
Description
abs()Returns the absolute value of a given number.
ceil()Rounds a given number up to the nearest integer.
floor()Rounds a given number down to the nearest integer.
pi()Returns the mathematical constant π (pi).
pow()Raises a number to the power of another number.
round()Returns the nearest value of a given number, rounded to a specified position of digits.
sqrt()Computes the square root of a given number.

Trigonometric Functions

Function
Description
acos()Computes the angle in radians whose cosine is a given number.
asin()Computes the angle in radians whose sine is a given number.
atan()Computes the angle in radians whose tangent is a given number.
cos()Computes the cosine of an angle expressed in radian.
cot()Computes the cotangent of an angle expressed in radian.
sin()Computes the sine of an angle expressed in radian.
tan()Computes the tangent of an angle expressed in radian.

String Functions

Function
Description
btrim()Removes characters from both ends of a given string until encountering a character that is not contained in the specified set of characters.
endsWith()Checks whether a string ends with a specified substring.
length()Returns the number of characters in a string.
lower()Converts all the characters in a given string to lowercase.
ltrim()Removes characters from the begining of a given string until encountering a character that is not contained in the specified set of characters.
rtrim()Removes characters from the end of a given string until encountering a character that is not contained in the specified set of characters.
split()Splits a string into a list of substrings using the specified delimiter.
startsWith()Checks whether a string begins with a specified substring.
upper()Converts all the characters in a given string to uppercase.

List Functions

Function
Description
append()Adds an element to the end of a list and returns the new list.
difference()Returns the difference between two lists.
head()Returns the first element in a list.
intersection()Returns the intersection of two lists.
listContains()Checks whether a specified element exists in a list.
listUnion()Returns the union of two lists.
reduce()Performs a calculation iteratively using each element in a list.
size()Returns the number of elements in a list.

Datetime Functions

Function
Description
date()Returns a value of type DATE.
local_datetime()Returns a value of type LOCAL DATETIME.
local_time()Returns a value of type LOCAL TIME.
now()Returns the current datetime in UTC.
zoned_datetime()Returns a value of type ZONED DATETIME.
zoned_time()Returns a value of type ZONED TIME.
dateAdd()Adds a specified time interval to a given date.
dateDiff()Computes the difference between two dates and returns the result as a specified unit of time.
dateFormat()Prints a given date in the specific format.
day()Extracts the day component from a given date.
dayOfWeek()Returns a number representing the day of the week for a given date.
month()Extracts the month component from a given date.
year()Extracts the year component from a given date.

Spatial Functions

Function
Description
distance()Computes the straight-line distance between two points.
point()Constructs a two-dimensional geographical coordinate.
point3d()Constructs a three-dimensional Cartesian coordinate.

Table Functions

Function
Description
table()Constructs an output table.

Null Functions

Function
Description
coalesce()Returns the first non-null value from a list of provided values.

Type Conversion Functions

Function
Description
toDouble()Converts a value to a double-precision floating-point number.
toFloat()Converts a value to a single-precision floating-point number.
toInteger()Converts a value to a 64-bit integer.
toString()Converts a value to a string.