This repository was archived by the owner on Oct 6, 2024. It is now read-only.
Repository navigation
Releases: DePayFi/dhs
Releases · DePayFi/dhs
Release list
v1.6.0
v1.4.2
fix merge batch data for next offset pagination
v1.4.1
v1.4.0
v1.3.0
v1.2.0
adds .order to query chains
order
Set the expected order of things using .order
# app/controllers/some_controller.rb
Record.where(color: 'blue').order(:name, { created_at: :desc }) GET https://service.example.com/records?color=blue&order[name]=asc&order[created_at]=desc
v1.1.0
Adds offset_page pagination strategy:
Pagination strategy: offset_page
The offest_page strategy is based on the page strategy with the only difference
that the pages are counted from 0 onwards (not from 1).
# app/models/transaction.rb
class Transaction < DHS::Record
configuration pagination_strategy: 'offset_page', pagination_key: 'page'
endpoint '{+service}/transactions'
end# app/controllers/some_controller.rb
Record.allGET https://service.example.com/records?limit=100
{
items: [{...}, ...],
total: 300,
limit: 100,
page: 0
}
In parallel:
GET https://service.example.com/records?limit=100&page=1
GET https://service.example.com/records?limit=100&page=2
v1.0.3
Rails 6 starts new autoloading/reloading behavior.
This version fixes the deprecation warnings mentioned here: local-ch/lhs#404
v1.0.2
Previously find_in_batches and find_each have been implemented before the pagination abstraction and hence have only implemented the offset pagination type hardcoded.
This change rewrites find_in_batches to also work with the other pagination types.
v1.0.1
Reducing Ruby version entry level to 2.7.2