Created
July 19, 2021 08:59
-
-
Save zhongxiao37/87c99863db001d8799a01b1cb8db5ad2 to your computer and use it in GitHub Desktop.
Use Arel::UpdateManager to generate query
This file contains hidden or 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
table = Dev::Account.arel_table | |
stmt = Arel::UpdateManager.new | |
stmt.table table | |
stmt.where(table[:sfid].eq('0010H00002Ez1waQAB')) | |
stmt.set("name='Tracy'") | |
stmt.to_sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment