Affected rows for ActiveRecord::Base.connection.execute with Postgres

Viewed 856

Is there a way to get the number of affected rows resulting from a SQL operation using ActiveRecord::Base.connection.execute?

I found this answer for MySQL adapters, but it doesn't work with Postgres.

Alternatively, if there's a way to get the SQL text response (e.g. "UPDATE 126"), that would work too.

1 Answers
Related