Meta and UUID Functions

Meta and UUID Functions

Meta functions retrieve information about the document or item as well as perform base64 encoding.

BASE64(expression)
Returns the base64 encoding of the given expression.
BASE64_ENCODE(expression)
Synonym of BASE64(), it returns the base64 encoding of the given expression.
BASE64_DECODE(expression)
It reverses the encoding done by the BASE64() or BASE64_ENCODING() functions.
META(expression)
Returns metadata for the document expression.
You can use the meta() function when creating an index. In this context, the meta() function does not require a parameter. It implicitly uses the keyspace being indexed.
CREATE INDEX id_ix on `beer-sample`(meta().id);
The meta() function in a query is given an expression; if this resolves to a keyspace alias, the requested field (id or CAS) is returned.
SELECT b.name, meta(b).id 
FROM `beer-sample` b 
WHERE meta(b).id > "g" limit 1;
UUID()
Returns a version 4 universally unique identifier (UUID).