Meta and UUID functions
Meta functions retrieve information about the document or item as well as perform base64 encoding.
- BASE64(expression)
-
Returns base64 encoding of expression.
- 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).