Skip to content

Commit

Permalink
Merge pull request #693 from blowmage/datastore-queryresults-docs
Browse files Browse the repository at this point in the history
Update QueryResults#all docs and code example
  • Loading branch information
quartzmo committed May 12, 2016
2 parents 913c3a5 + 7f7ab87 commit ca6ce46
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/gcloud/datastore/dataset/query_results.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ def next
end

##
# Retrieves all datastore entries by repeatedly loading {#next} until
# Retrieves all query results by repeatedly loading {#next} until
# {#next?} returns `false`. Returns the list instance for method
# chaining.
#
# This method may make several API calls until all datastore entries are
# This method may make several API calls until all query results are
# retrieved. Be sure to use as narrow a search criteria as possible.
# Please use with caution.
#
Expand All @@ -134,9 +134,8 @@ def next
#
# gcloud = Gcloud.new
# datastore = gcloud.datastore
# hour_ago = (Time.now - 60*60).utc.strftime('%FT%TZ')
# recent_errors = "timestamp >= \"#{hour_ago}\" severity >= ERROR"
# entries = datastore.entries(filter: recent_errors).all
# query = datastore.query("Tasks")
# all_tasks = datastore.run(query).all
#
def all
while next?
Expand Down

0 comments on commit ca6ce46

Please sign in to comment.