definition

Get the collection document.

Signature

definition: <Document>

Description

Returns the collection definition document that the collection object represents.

Delete the collection by calling delete() on the collection document.

Return value

Type Description

Document

Collection document.

Examples

Get the collection document:

Letter.definition
{
  name: "Letter",
  coll: Collection,
  ts: Time("2023-02-19T14:32:29.050Z"),
  indexes: {},
  constraints: []
}

 

Delete the collection document:

Letter.definition.delete()
Collection.byName("Letter") /* 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!