A newer version of this documentation is available.

View Latest

Meta and UUID Functions

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


Returns the base64 encoding of the given expression.


Synonym of BASE64(), it returns the base64 encoding of the given expression.


It reverses the encoding done by the BASE64() or BASE64_ENCODING() functions.


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;

Returns a version 4 universally unique identifier (UUID).