Home Manual Reference Source Test
import DatabaseChangeRecordDebouncer from 'electron-coresqlite/lib/database-change-record-debouncer.js'
public class | source

DatabaseChangeRecordDebouncer

DatabaseChangeRecordDebouncer.accumulate is a guarded version of trigger that can accumulate changes. This means that even if you're a bad person and call persistModel 100 times from 100 task objects queued at the same time, it will only create one trigger event. This is important since the database triggering impacts the entire application.

Constructor Summary

Public Constructor
public

constructor(objectPattern: {"onTrigger": *, "maxTriggerDelay": *})

Method Summary

Public Methods
public

accumulate(change: *): *

Public Constructors

public constructor(objectPattern: {"onTrigger": *, "maxTriggerDelay": *}) source

Params:

NameTypeAttributeDescription
objectPattern {"onTrigger": *, "maxTriggerDelay": *}
  • default: {"onTrigger":null,"maxTriggerDelay":null}

Public Methods

public accumulate(change: *): * source

Params:

NameTypeAttributeDescription
change *

Return:

*