# Results from Model.connection.execute

**URL:** <https://www.ruby-forum.com/t/results-from-model-connection-execute/171526>\
**Category:** Rails\
**Created:** [July 4, 2009, 1:37am UTC](https://www.ruby-forum.com/t/results-from-model-connection-execute/171526 "2009-07-04T01:37:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/db5fbb/32.png) [@alex](https://www.ruby-forum.com/u/alex)\
**Post date:** [July 4, 2009, 1:37am UTC](https://www.ruby-forum.com/t/results-from-model-connection-execute/171526/1 "2009-07-04T01:37:53Z")

</div>

I am having trouble finding documentations on what this methods  
returns.

I know for a SELECT query it will return an iterable object (although  
I can’t find any documentation on that).

I am doing a DELETE query. When executed this should return the  
number of affected rows, which is the best way to tell if the query  
worked. I’m also doing a COPY query.

Is there any way to get this result?

I am using postgres, so the result is a PGresult object, but that  
object does not respond well to .inspect and has no docs.

Thanks.
