class
Crystalforce::Collection
- Crystalforce::Collection
- Reference
- Object
Overview
Lazy-paginating collection for query results. Implements Enumerable and Iterator for automatic pagination.
Included Modules
- Enumerable(JSON::Any)
- Iterator(JSON::Any)
Defined in:
crystalforce/collection.crConstructors
Instance Method Summary
- #current_page : Array(JSON::Any)
- #done : Bool
-
#each(&)
Enumerable - iterate all records across all pages
- #has_next_page?
-
#next
Iterator
- #next_page : Array(JSON::Any) | Nil
- #rewind
-
#size : Int64
Returns the number of elements in the collection.
- #total_size : Int64
Constructor Detail
def self.new(records : Array(JSON::Any), total_size : Int64, done : Bool, next_records_url : String | Nil, client : Client | ToolingClient)
#
Instance Method Detail
def size : Int64
#
Description copied from module Enumerable(JSON::Any)
Returns the number of elements in the collection.
[1, 2, 3, 4].size # => 4