Skip to content

Commit

Permalink
Updates README, removes unneeded files
Browse files Browse the repository at this point in the history
  • Loading branch information
afair committed May 18, 2014
1 parent 8744c65 commit a939533
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 24 deletions.
24 changes: 22 additions & 2 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,30 @@ All these methods take an options hash to control things more:
This library uses 1.0 (Optimize for 100% of the result set)
Do not override this value unless you understand it.

Notes:

* Use cursors only for large result sets. It has more overhead with the database
than ActiveRecord selecting all matching records.
* Aliases each_hash and each_hash_by_sql are provided ifor each_row and each_row_by_sql
if you prefer to express what types are being returned.

== Hashes vs. Instances

The each_row method returns the Hash of strings for speed (as this allows you to process a lot of rows).
Hashes are returned with String values, and you must take care of any type conversion.

When you use each_instance, ActiveRecord lazily casts these strings into
Ruby types (Time, Fixnum, etc.) only when you read the attribute.

If you find you need the types cast for your attributes, consider using each_instance
insead. ActiveRecord's read casting algorithm will only cast the values you need and
has become more efficient over time.

==Authors
Allen Fair, allen.fair@gmail.com, http://github.com/afair
Allen Fair, @allenfair, http://github.com/afair

Thanks to:

Thank you to:
* Iulian Dogariu, http://github.com/iulianu (Fixes)
* Julian Mehnle, julian@mehnle.net (Suggestions)
* ...And all the other contributers!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module PostgreSQLCursor
module ActiveRecord
module ConnectionAdapters
module PostgreSQLTypeMap
# Returns the private "type_map" needed for the cursor operation
def get_type_map # :nodoc:
type_map
end
Expand Down
16 changes: 0 additions & 16 deletions lib/postgresql_cursor/active_record/relation/lazy.rb

This file was deleted.

6 changes: 0 additions & 6 deletions lib/postgresql_cursor/railtie.rb

This file was deleted.

0 comments on commit a939533

Please sign in to comment.