Abstract
Create 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
Optional
user: 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
Optional
user: 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
Optional
user: 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
Optional
user: BaseUserThe requesting User
An array of updated Document instances
Protected
Abstract
_logProtected
Log a database operations message.
The logging level
The message
Protected
_logProtected
Construct a standardized error message given the context of an attempted operation
Optional
context: { pack?: string; parent?: Document<object, DocumentConstructionContext> } = {}Protected
_logProtected
Log a database operation for an embedded document, capturing the action taken and relevant IDs
The action performed
The document type
The documents modified
Optional
context: {The context of the log request
Optional
level?: stringThe logging level
Optional
pack?: stringA compendium pack within which the operation occurred
Optional
parent?: 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.