Back to top
Documentation SurrealQL Functions Scripting functions SurrealQL functions

Native SurrealQL functions

Embedded scripting functions have access to embedded scripting functions, allowing for complex and performant operations otherwise not possible. SurrealQL functions are published under the surrealdb.functions variable. Custom functions are not available within the embedded JavaScript function at the moment.

RETURN function() {
	// Using the rand::uuid::v4() function
	const uuid = surrealdb.functions.rand.uuid.v4();