RethinkDB: DELETE example

In RethinkDB, you can delete the rows returned by any query:

r.db('test')
 .table('users')
  .filter( (doc) => doc('user_name').match("ieling$") )
  .delete()

This is a nice change from SQL, where you sometimes have to make much more structural modifications to a query to do a deletion.

deleted
errors
inserted
replaced
skipped
unchanged
1
1
0
0
0
0
0

Leave a Reply

Your email address will not be published. Required fields are marked *