AbstractCreate new Documents using provided data and context. It is recommended to use foundry.abstract.Document.createDocuments or foundry.abstract.Document.create rather than calling this method directly.
The Document class definition
Parameters of the create operation
Optionaluser: BaseUserThe requesting User
An array of created Document instances
Delete Documents using provided ids and context. It is recommended to use foundry.abstract.Document.deleteDocuments or foundry.abstract.Document#delete rather than calling this method directly.
The Document class definition
Parameters of the delete operation
Optionaluser: BaseUserThe requesting User
An array of deleted Document instances
Retrieve Documents based on provided query parameters. It recommended to use CompendiumCollection#getDocuments or CompendiumCollection#getIndex rather than calling this method directly.
The Document class definition
Parameters of the get operation
Optionaluser: BaseUserThe requesting User
An array of retrieved Document instances or index objects
Describe the scopes which are suitable as the namespace for a flag key
Describe the scopes which are suitable as the namespace for a flag key
Update Documents using provided data and context. It is recommended to use foundry.abstract.Document.updateDocuments or foundry.abstract.Document#update rather than calling this method directly.
The Document class definition
Parameters of the update operation
Optionaluser: BaseUserThe requesting User
An array of updated Document instances
Protected Abstract_logProtectedLog a database operations message.
The logging level
The message
Protected_logProtectedConstruct a standardized error message given the context of an attempted operation
Optionalcontext: { pack?: string; parent?: Document<object, DocumentConstructionContext> } = {}Protected_logProtectedLog a database operation for an embedded document, capturing the action taken and relevant IDs
The action performed
The document type
The documents modified
Optionalcontext: {The context of the log request
Optionallevel?: stringThe logging level
Optionalpack?: stringA compendium pack within which the operation occurred
Optionalparent?: Document<object, DocumentConstructionContext>A parent document
An abstract base class extended on both the client and server which defines how Documents are retrieved, created, updated, and deleted.