Skip to content

Commit 714f898

Browse files
Chris Petersbrianmario
authored andcommitted
Showed how to get count of results.
1 parent 5de5755 commit 714f898

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ escaped = client.escape("gi'thu\"bbe\0r's")
4444
results = client.query("SELECT * FROM users WHERE group='#{escaped}'")
4545
```
4646

47+
You can get a count of your results with `results.count`.
48+
4749
Finally, iterate over the results:
4850

4951
``` ruby
@@ -321,4 +323,4 @@ rake
321323
* Eric Wong - for the contribution (and the informative explanations) of some thread-safety, non-blocking I/O and cleanup patches. You rock dude
322324
* Yury Korolev (http://github.com/yury) - for TONS of help testing the ActiveRecord adapter
323325
* Aaron Patterson (http://github.com/tenderlove) - tons of contributions, suggestions and general badassness
324-
* Mike Perham (http://github.com/mperham) - Async ActiveRecord adapter (uses Fibers and EventMachine)
326+
* Mike Perham (http://github.com/mperham) - Async ActiveRecord adapter (uses Fibers and EventMachine)

0 commit comments

Comments
 (0)