Skip to main content

close

Close the cursor.

This method is idempotent: calling it multiple times results in identical behavior to calling it once.

Syntax

let cursor = #db.f(query, projection)
cursor.close()

Parameters

No parameters.

Return

Always returns null.

Cursor State

This function closes the cursor.

Example

function(context, args) {
let cursor = #db.f({ type: "my_data" });

// removing the following line causes an error:
cursor.close();
}