2

I can listen for changes using a library for one of supported languages. It's NodeJS in my case, and the code looks like this:

r = require('rethinkdb')

r.connect()
    .then(function (conn) {
        return r.table("messages").changes().run(conn);
    })
    .then(function (change) {
        change.each(function (err, item) {
            console.log(item)
        });
    });

But I wonder, if it's possible to run some request, or procedure that is executed by the RethinkDB engine itself so that not to have to add a listener procedure on the language level.

As RethinkDB is always on, and is listening to changes, I suppose technically it can do some work there?

Sergei Basharov
  • 51,276
  • 73
  • 200
  • 335

1 Answers1

2

As far as I know RethinkDB doesn't have mechanism like triggers or stored procedure.

There are 2 big issues on github: Proposal: triggers and triggers - attempt 2. I hope to see something like this in future version with new feeds mechanism.

  • This is the correct answer and should marked as so. Currently there is no way in which to have RethinkDB run triggered functions. All of this, as of 2.1.5 has to occur in the application logic layer. – dalanmiller Oct 27 '15 at 22:25