Last active
August 29, 2015 14:14
-
-
Save neumino/0916562008c620ba81c7 to your computer and use it in GitHub Desktop.
Pipe the changfeed of a table in the same table.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Require the current branch [next] of rethinkdbdash (probably 1.16.5) | |
var r = require('rethinkdbdash')(); | |
// Set up the infinite domino effect | |
r.table('test').changes()('new_val').without('id').toStream() | |
.on('error', handleError) | |
.pipe(r.table('test').toWritableStream()) | |
.on('error', handleError); | |
// Start the domino effect | |
r.table('test').insert({"hello": "world"}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment