Options
All
  • Public
  • Public/Protected
  • All
Menu

The client-side database backend implementation which handles Document modification operations.

implements

{abstract.DatabaseBackend}

Hierarchy

Index

Constructors

Methods

  • activateSocketListeners(socket: Socket): void
  • Activate the Socket event listeners used to receive responses from events which modify database documents

    Parameters

    • socket: Socket

      The active game socket

    Returns void

  • _getDocuments(documentClass: any, __namedParameters: Object, user: any): Promise<any>
  • Get primary Document instances

    Parameters

    • documentClass: any
    • __namedParameters: Object
    • user: any

    Returns Promise<any>

  • _getEmbeddedDocuments(documentClass: any, parent: any, __namedParameters: Object, user: any): Promise<void>
  • _createDocuments(documentClass: any, __namedParameters: Object, user: any): Promise<any[]>
  • Create primary Document instances

    Parameters

    • documentClass: any
    • __namedParameters: Object
    • user: any

    Returns Promise<any[]>

  • _createEmbeddedDocuments(documentClass: any, parent: any, __namedParameters: Object, user: any): Promise<any>
  • _updateDocuments(documentClass: any, __namedParameters: Object, user: any): Promise<Document[]>
  • Update primary Document instances

    Parameters

    • documentClass: any
    • __namedParameters: Object
    • user: any

    Returns Promise<Document[]>

  • _updateEmbeddedDocuments(documentClass: any, parent: any, __namedParameters: Object, user: any): Promise<any>
  • _deleteDocuments(documentClass: any, __namedParameters: Object, user: any): Promise<Document[]>
  • Delete primary Document instances

    Parameters

    • documentClass: any
    • __namedParameters: Object
    • user: any

    Returns Promise<Document[]>

  • _deleteEmbeddedDocuments(documentClass: any, parent: any, __namedParameters: Object, user: any): Promise<any>
  • getFlagScopes(): any[]
  • getCompendiumScopes(): any[]
  • _preCreateDocumentArray(documentClass: any, __namedParameters: Object): Promise<any[]>
  • Perform a standardized pre-creation workflow for all Document types. For internal use only.

    Parameters

    • documentClass: any
    • __namedParameters: Object

    Returns Promise<any[]>

  • _handleCreateDocuments(response: SocketResponse): Document[]
  • Handle a SocketResponse from the server when one or multiple documents were created

    Parameters

    • response: SocketResponse

      The provided Socket response

    Returns Document[]

    An Array of created Document instances

  • _handleCreateEmbeddedDocuments(response: SocketResponse): Document[]
  • Handle a SocketResponse from the server when one or multiple documents were created

    Parameters

    • response: SocketResponse

      The provided Socket response

    Returns Document[]

    An Array of created Document instances

  • _postCreateDocumentCallbacks(type: any, collection: any, result: any, __namedParameters: Object): Function[]
  • Perform a standardized post-creation workflow for all Document types. For internal use only.

    Parameters

    • type: any
    • collection: any
    • result: any
    • __namedParameters: Object

    Returns Function[]

    An array of callback operations to perform once every Document is created

  • _preUpdateDocumentArray(collection: any, __namedParameters: Object): Promise<any[]>
  • Perform a standardized pre-update workflow for all Document types. For internal use only.

    Parameters

    • collection: any
    • __namedParameters: Object

    Returns Promise<any[]>

  • _handleUpdateDocuments(response?: SocketResponse): Document[]
  • Handle a SocketResponse from the server when one or multiple documents were updated

    Parameters

    • response: SocketResponse = {}

      The provided Socket response

    Returns Document[]

    An Array of updated Document instances

  • _handleUpdateEmbeddedDocuments(response: SocketResponse): Document[]
  • Handle a SocketResponse from the server when embedded Documents are updated in a parent Document.

    Parameters

    • response: SocketResponse

      The provided Socket response

    Returns Document[]

    An Array of updated Document instances

  • _postUpdateDocumentCallbacks(collection: any, result: any, __namedParameters: Object): Function[]
  • Perform a standardized post-update workflow for all Document types. For internal use only.

    Parameters

    • collection: any
    • result: any
    • __namedParameters: Object

    Returns Function[]

    An array of callback operations to perform after every Document is updated

  • _preDeleteDocumentArray(collection: any, __namedParameters: Object): Promise<any[]>
  • Perform a standardized pre-delete workflow for all Document types. For internal use only.

    Parameters

    • collection: any
    • __namedParameters: Object

    Returns Promise<any[]>

  • _handleDeleteDocuments(response?: SocketResponse): Document[]
  • Handle a SocketResponse from the server where Documents are deleted.

    Parameters

    • response: SocketResponse = {}

      The provided Socket response

    Returns Document[]

    An Array of deleted Document instances

  • _handleDeleteEmbeddedDocuments(response: SocketResponse): Document[]
  • Handle a SocketResponse from the server when embedded Documents are deleted from a parent Document.

    Parameters

    • response: SocketResponse

      The provided Socket response

    Returns Document[]

    An Array of deleted Document instances

  • _postDeleteDocumentCallbacks(collection: any, result: any, __namedParameters: Object): Function[]
  • Perform a standardized post-deletion workflow for all Document types. For internal use only.

    Parameters

    • collection: any
    • result: any
    • __namedParameters: Object

    Returns Function[]

    An array of callback operations to perform after every Document is deleted

Properties

#flagScopes: string[]

A cached array of valid flag scopes which can be read and written.