Skip to main content

Other

DECODEURI

​​❌ Cannot be used in filter queries

Decodes a URI (Uniform Resource Identifier) previously created by ENCODEURI() or by a similar function by replacing each escape sequence in the encoded URI component with the character that it represents. Returns the decoded URI.

Syntax‌‌

DECODEURI(text)

NameTypeDescription
textrequiredCan be any valid expression as long as it resolves to a text/string value.

ECOMPARE

​​❌ Cannot be used in filter queries

Compares the encrypted text with the plain text and returns true if they match and false otherwise.

Syntax‌‌

ECOMPARE(plain_text, encrypted_text)

NameTypeDescription
plain_textmandatoryCan be any valid expression as long as it resolves to a text/string.
encrypted_textmandatoryCan be any valid expression as long as it resolves to a text/string.

ENCODEURI

​​❌ Cannot be used in filter queries

Encodes a URI (Uniform Resource Identifier) by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character. Returns the encoded URI.

Syntax‌‌

ENCODEURI(text)

NameTypeDescription
textrequiredCan be any valid expression as long as it resolves to a text/string value.

ENCRYPT

​​❌ Cannot be used in filter queries

Encrypts the given text value and returns the encryted text.

Syntax‌‌

ENCRYPT(text)

NameTypeDescription
textmandatoryCan be any valid expression as long as it resolves to a text/string. The maximum length of the text that can be encrypted is 50 characters. Any text/string longer than 50 characters will result in an error.

EVAL

​​✔️ Safe to use in filter queries (depends on the functions used in expression text)

Evaluates the given expression text and returns the evaluation result.

Syntax‌‌

EVAL(expression_text, evaluation_type)

NameTypeDescription
expression_textmandatoryCan be any valid expression as long as it resolves to a text/string value.
evaluation_typemandatoryThe evaluation result type of the expression text. Can be either "integer", "decimal", "boolean", "text", or "object".

GETCONTEXT

​​❌ Cannot be used in filter queries

Returns the context object or context list associated with the provided context name. If no context object or list is found, it returns an empty object.

Syntax‌‌

GETCONTEXT(context_name)

NameTypeDescription
context_namemandatoryCan be any valid expression that resolves to a text value that specifies the name of the context.

ID

​✔️Safe to use in filter queries

Create a new unique id object from scratch or from a given input text value. The created id is a unique 24 characters long alphanumeric string value.

Syntax‌‌

ID(text)

NameTypeDescription
textoptionalCan be any valid expression as long as it resolves to a text/string. The text should be a valid id text, if not, ID raises an error.

MD5

​​❌ Cannot be used in filter queries

Hashes input text using the MD5 message-digest algorithm.

Syntax‌‌

MD5(text)

NameTypeDescription
textrequiredCan be any valid expression as long as it resolves to a text/string.

MONETARY

​​✔️ Safe to use in filter queries

Converts the input number to a monetary value.

Syntax‌‌

MONETARY(number)

NameTypeDescription
numberrequiredAny valid expression that resolves to a number.

NULL

​​✔️ Safe to use in filter queries

Returns null.

Syntax

NULL()

TOKEN

​​❌ Cannot be used in filter queries

Creates a new JSON Web Token (JWT) using the provided secret key, input object, and expiry parameter and returns the token text.

Syntax‌‌

TOKEN(secret, object, expiresIn)

NameTypeDescription
secretrequiredThe secret (private key) that will be used in encrypting the token. Can be any valid expression as long as it resolves to a text/string.
objectrequiredA valid object that will be tokenized. Can be any valid expression as long as it resolves to an object.
expiresInrequiredThe validity duration of the created token, expressed in seconds (integer) or a string describing a time span such as "5 days", "24h", "30d"

UUID

​​❌ Cannot be used in filter queries

Create a new unique UUID (Universally Unique Identifier). The created UUID is a unique 36 characters long alphanumeric string value (e.g., 123e4567-e89b-12d3-a456-426614174000).

Syntax‌‌

UUID()

VERIFY

​​❌ Cannot be used in filter queries

Verifies the given token using the secret key and check whether it has expired or not. Returns the object decoded if the secret is valid and the token has not expired. If not, it returns null.

Syntax‌‌

TOKEN(secret, token)

NameTypeDescription
secretrequiredThe secret (private key) that will be used in decrypting the token. The secret should be the same one used when creating the token. Can be any valid expression as long as it resolves to a text/string.
tokenrequiredThe token text that will be decoded. Can be any valid expression as long as it resolves to a text/string.