SheetXL - v0.3.20
    Preparing search index...

    Class TransactionStore

    Events are never fired on sub transactions. Only when making changes to the root either directly or through a final commit. Any models that want to fire non transactional events should do this directly.

    Index

    Constructors

    Methods

    • Parameters

      • event: keyof IStateListener<any, any>
      • container: CommitContainer
      • states: Map<any, any>
      • Optionalview: Record<string, any>
      • isRevert: boolean = false
      • isRestore: boolean = false
      • async: boolean = false

      Returns void

    • {@inheritDoc ITransaction.IStore.addStateListener}

      Type Parameters

      • State = any
      • View = any

      Parameters

      • model: any
      • listener: IStateListener<State, View>

      Returns Remove

    • {@inheritDoc ITransaction.IStore.doBatch}

      Type Parameters

      • R

      Parameters

      Returns R | Promise<R>

    • {@inheritDoc ITransaction.IStore.getCommitCount}

      Returns number

    • {@inheritDoc ITransaction.IStore.getCurrentCommit}

      Returns ICommit

    • {@inheritDoc ITransaction.IStore.getLog}

      Parameters

      • commitId: string
      • max: number = 100

      Returns ICommit[]

    • {@inheritDoc ITransaction.IStore.getView}

      Returns Record<string, any>

    • {@inheritDoc ITransaction.IStore.getState}

      Type Parameters

      • STATE = any

      Parameters

      • model: any

      Returns Readonly<STATE>

    • {@inheritDoc ITransaction.IStore.isOpenTransaction}

      Returns boolean

    • {@inheritDoc ITransaction.IStore.remove}

      Parameters

      • model: any

      Returns boolean

    • {@inheritDoc ITransaction.IStore.restore}

      Parameters

      • commitId: string
      • Optionaloptions: RestoreOptions

      Returns ICommit

    • {@inheritDoc ITransaction.IStore.revert}

      Parameters

      • commitId: string
      • Optionaloptions: RestoreOptions

      Returns ICommit

    • Sets the transaction store to be synchronous or asynchronous.

      Parameters

      • sync: boolean

      Returns void

      This is used for unit tests only.