The Create Function command creates a new Server-Side function. Functions can be executed from SQL, HTTP and Java.
CREATE FUNCTION <name> <code>
[PARAMETERS [<comma-separated list of parameters' name>]]
[IDEMPOTENT true|false]
[LANGUAGE <language>]
Where:
Create function 'test' in Javascript with no parameters:
CREATE FUNCTION test "print('\nTest!')"
Create function 'allUsersButAdmin' in SQL with no parameters:
CREATE FUNCTION allUsersButAdmin "select from ouser where name <> 'admin'" LANGUAGE SQL