Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: dataType.on('updated-docs') when docs update #396

Merged
merged 5 commits into from
Nov 30, 2023

Commits on Nov 30, 2023

  1. feat: dataType.on('updated-docs') when docs update

    Emits an array of updated docs for the data type whenever the docs
    update (rather than emitting one doc at a time, it waits for indexing to
    complete, then emits all the docs that have been updated. If there are
    several updates to a particular docId, then only the resolved `head`
    version is returned).
    
    Attaching this listener to a data type that has many values / is
    frequently updated will have a performance impact, because large amounts
    of data could be read from the database and there is no limit, e.g. if
    this was attached to the `observation` dataType and a new device synced
    with a project with 10,000 observations, an attached listener would be
    called with 10,000 observations.
    
    The main reason for this feature is for internal use for capabilities,
    listening for changes and modifying permissions accordingly.
    gmaclennan committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    3b02267 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    70d7ba0 View commit details
    Browse the repository at this point in the history
  3. fix datastore test

    gmaclennan committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    976183f View commit details
    Browse the repository at this point in the history
  4. attempt to fix flakey test

    gmaclennan committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    98a6aa7 View commit details
    Browse the repository at this point in the history
  5. Update src/datastore/index.js

    Co-authored-by: Andrew Chou <[email protected]>
    gmaclennan and achou11 authored Nov 30, 2023
    Configuration menu
    Copy the full SHA
    60d5783 View commit details
    Browse the repository at this point in the history