Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EventHandler

Hierarchy

  • EventHandler

Index

Constructors

Properties

Constructors

constructor

  • new EventHandler(eventType: "EventDBHandlerAdded" | "EventDBBackup" | "EventDBBackupComplete" | "EventDBRestore" | "EventDBRestoreComplete" | "EventDBAddCollection" | "EventDBDeleteCollection" | "EventDBDeleteCollectionComplete" | "EventDBEmptyCollection" | "EventDBEmptyCollectionComplete" | "EventCollectionFind" | "EventCollectionFindComplete" | "EventCollectionInsert" | "EventCollectionInsertComplete" | "EventCollectionToJSON" | "EventDocumentDelete" | "EventDocumentDeleteComplete" | "EventDocumentCustomPopulate" | "EventDocumentCustomPopulateComplete" | "EventDocumentTree" | "EventDocumentTreeComplete" | "EventDocumentClone" | "EventDocumentCloneComplete" | "EventCollectionDocumentUpdated", func: (event: MemsDBEvent) => void): EventHandler
  • Create a new EventHandler to handle events in MemsDB

    Parameters

    • eventType: "EventDBHandlerAdded" | "EventDBBackup" | "EventDBBackupComplete" | "EventDBRestore" | "EventDBRestoreComplete" | "EventDBAddCollection" | "EventDBDeleteCollection" | "EventDBDeleteCollectionComplete" | "EventDBEmptyCollection" | "EventDBEmptyCollectionComplete" | "EventCollectionFind" | "EventCollectionFindComplete" | "EventCollectionInsert" | "EventCollectionInsertComplete" | "EventCollectionToJSON" | "EventDocumentDelete" | "EventDocumentDeleteComplete" | "EventDocumentCustomPopulate" | "EventDocumentCustomPopulateComplete" | "EventDocumentTree" | "EventDocumentTreeComplete" | "EventDocumentClone" | "EventDocumentCloneComplete" | "EventCollectionDocumentUpdated"

      MemsDB event type to be handled

    • func: (event: MemsDBEvent) => void

      Function to run on event

        • (event: MemsDBEvent): void
        • Parameters

          • event: MemsDBEvent

          Returns void

    Returns EventHandler

Properties

eventType

eventType: "EventDBHandlerAdded" | "EventDBBackup" | "EventDBBackupComplete" | "EventDBRestore" | "EventDBRestoreComplete" | "EventDBAddCollection" | "EventDBDeleteCollection" | "EventDBDeleteCollectionComplete" | "EventDBEmptyCollection" | "EventDBEmptyCollectionComplete" | "EventCollectionFind" | "EventCollectionFindComplete" | "EventCollectionInsert" | "EventCollectionInsertComplete" | "EventCollectionToJSON" | "EventDocumentDelete" | "EventDocumentDeleteComplete" | "EventDocumentCustomPopulate" | "EventDocumentCustomPopulateComplete" | "EventDocumentTree" | "EventDocumentTreeComplete" | "EventDocumentClone" | "EventDocumentCloneComplete" | "EventCollectionDocumentUpdated"

Event type of this handler

func

func: (event: MemsDBEvent) => void = ...

Type declaration

    • (event: MemsDBEvent): void
    • Handler function for this event type. This function will get called in order of addition to the DB

      Parameters

      • event: MemsDBEvent

      Returns void

Generated using TypeDoc