Skip to content

Instantly share code, notes, and snippets.

@primitive-type
Created January 21, 2016 23:31
Show Gist options
  • Save primitive-type/36fc9bb28ac6f7678780 to your computer and use it in GitHub Desktop.
Save primitive-type/36fc9bb28ac6f7678780 to your computer and use it in GitHub Desktop.
Rename Field (ReQL)
r.db('local').table('TableName')
.replace(function (doc) {
return doc.merge({
newFieldName: doc('oldFieldName')
}).without('oldFieldName');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment