Overview
This chapter describes the built-in functions of seekdb.
Single-row functions
Single-row functions return a single row of result. They include date and time functions, string functions, conversion functions, mathematical functions, comparison functions, and control flow functions.
Aggregate functions
An aggregate function performs a calculation on a set of values and returns a single value. An aggregate function ignores null values. An aggregate function is often used with the GROUP BY clause in a SELECT statement.
All aggregate functions are deterministic. They return the same value when called with the same set of input values.
In seekdb, only one value expression can be specified in an aggregate function. For example, COUNT(c1, c2) is not supported, but COUNT(c1) is supported.
Analytic functions
Analytic functions (also known as window functions in some databases) are similar to aggregate functions. An analytic function performs a calculation on a set of rows, but it can return multiple rows for each group. Each row in the group is calculated based on the window logic. Analytic functions can significantly optimize queries that require self-joins.
A window is also called a frame. seekdb supports both ROWS and RANGE frame semantics. The ROWS frame is based on physical row offsets, while the RANGE frame is based on logical value offsets.
Encryption functions
Encryption functions are used for encrypting and decrypting data. They include encryption and decryption functions.
Information functions
Information functions are used for returning specified system information.
JSON functions
JSON functions are used for creating, operating on, and searching JSON values.
XML functions
XML functions are used for processing and analyzing XML data.
Spatial functions
Spatial functions are used for processing and analyzing spatial data. Spatial functions can be used with geospatial data.
Lock functions
Lock functions are used for operating on locks.
Bitmap functions
Bitmap functions are used for processing compressed bitmap data.
Array functions
Array functions are used for processing and analyzing array data.
Other functions
Other functions include some functions that are difficult to classify.