-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding start/offset option for queries #421
Conversation
end | ||
|
||
def start_value=(value) | ||
raise ImmutableRelation if @loaded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recommend using loaded?' here instead of
@loaded'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed.
It should be noted that @loaded is used throughout this module. These _value methods could probably stand to be refactored. A lot of repetition.
Can we call it offset so it matches ActiveRecord? See http://guides.rubyonrails.org/active_record_querying.html#limit-and-offset |
I like 'offset' better, in general, but I called it start so it matches Solr. It looks like we're already not matching Solr's parameters on 'order'/'sort', though. What's the thinking? Better to match AR or Solr? Or should there be an alias? |
Consistency is key, and since AF is already matching AR's order/sort my vote's for #offset without an alias. |
Solr supports paginated results with the `start` option. This adds that to the find/query methods.
+1 to making Hydra feel more like vanilla Rails and less like niche cultural heritageware. |
Done. |
Adding start/offset option for queries
Solr supports paginated results with the
start
option. This adds thatto the find/query methods.