delete()

Delete an key.

Signature

delete(): { id: ID, coll: Collection}

Description

The delete() method deletes the key from storage, and returns an Object representing the deleted key with the id and coll identity fields.

Parameters

None

Return value

Type Description

NullKey

Document doesn’t exist or is inaccessible. See NullDoc.

Examples

Key.byId("371460335192768546")!.delete()
Key.byId("371460335192768546") /* not found */

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!