How to find the number of records processed by PostgreSQL after executing an SQL statement using the ActiveRecord :: Base Connection class?
temp_sql = "UPDATE table_a SET column_a ='abc' WHERE column_b = 1" result = ActiveRecord::Base.establish_connection(@db).connection.execute(temp_sql)
Or you can suggest a better way to do this. Please keep in mind that the above update statement is simple to keep the question short. My real queries are "installed based" and include complex temp creation tables, updates, insert instructions.
mevdiven
source share