Skip to content

Instantly share code, notes, and snippets.

@dancannon
Created May 6, 2015 21:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dancannon/b7bdcf0711946f6f899d to your computer and use it in GitHub Desktop.
Save dancannon/b7bdcf0711946f6f899d to your computer and use it in GitHub Desktop.
var id = 3;
r.branch(
r.table("test").get(id),
r.table("test").get(id).update({a: r.row("a").add(1)}),
r.table("test").insert({id: id, a: 1})
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment