InternalActivate the Socket event listeners used to receive responses from events which modify database documents
The active game socket
Create new Documents using provided data and context. It is recommended to use Document.createDocuments or 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
Bundle multiple Document-modification operations into a single, batched request.
Update Documents using provided data and context. It is recommended to use Document.updateDocuments or 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_ProtectedConstruct a standardized error message given the context of an attempted operation
Optionalcontext: { pack?: string; parent?: Document<object, DocumentConstructionContext> } = {}Protected_ProtectedLog 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
OptionaldryRun?: booleanWhether this operation is part of a dry run: abort true and level isn't "debug"
Optionallevel?: stringThe logging level
Optionalpack?: stringA compendium pack within which the operation occurred
Optionalparent?: Document<object, DocumentConstructionContext>A parent document
The client-side database backend implementation which handles Document modification operations.