SurrealDB World   |   Join us in September

Back to top
Documentation SurrealQL Functions Meta functions

Meta functions

These functions can be used to retrieve specific metadata from a SurrealDB Record ID.

Function Description
meta::id() Extracts and returns the table id from a SurrealDB Record ID
meta::tb() Extracts and returns the table name from a SurrelDB Record ID

meta::id

The meta::id function extracts and returns the table id from a SurrealDB Record ID.

meta::id() -> value

The following example shows this function, and its output, when used in a select statement:

SELECT * FROM meta::id(person:tobie);
"tobie"

meta::tb

The meta::tb function extracts and returns the table name from a SurrelDB Record ID.

meta::tb() -> string

The following example shows this function, and its output, when used in a select statement:

SELECT * FROM meta::tb(person:tobie);
"person"