1.1.4 • Published 5 years ago

rwait v1.1.4

Weekly downloads
23
License
Apache-2.0
Repository
github
Last release
5 years ago

rwait

js-standard-style npm downloads

Usage

const r = require('rethinkdbdash')({ host: 'localhost' })
const rwait = require('rwait')(r)

;(async () => {
  try {
    const pending = await rwait({
      db: 'test',
      table: 'test',
      timeout: 2000,
      filter: r.row('new_val')('id').eq('test')
    })

    // some operation that causes a write somewhere else....
    process.nextTick(() => {
      r.db('test').table('test').insert([ { id: 'test', value: 'hello world' } ]).run()
    })

    const value = await pending.value
    console.log('got value', value)
  } catch (err) {
    console.error('error', err)
  }
})()

license

Apache License, Version 2.0

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

7 years ago