Created
January 21, 2016 23:31
-
-
Save primitive-type/36fc9bb28ac6f7678780 to your computer and use it in GitHub Desktop.
Rename Field (ReQL)
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
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