Skip to content

Latest commit

 

History

History
82 lines (55 loc) · 3.92 KB

CHANGELOG.md

File metadata and controls

82 lines (55 loc) · 3.92 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

These are the latest changes on the project's master branch that have not yet been released.

[0.4.0] - 2023-10-06

Changed

  • Breaking change: Raised minimum required Ruby version to 2.7
  • Breaking change: Raised minimum required activerecord version to 6.0

Added

  • Test against Ruby version 3.2

Fixed

  • Breaking change: Ensure timestamp order_by fields (like created_at) will paginate results by honoring timestamp order down to microsecond resolution on comparison. This was done by changing the cursor logic for timestamp fields, which means that the cursors strings change from version 0.3.0 to 0.4.0 and old cursors cannot be decoded by the new gem version anymore.

[0.3.0] - 2022-07-08

Added

  • Add a limit param to paginator that can be used instead either first or last
  • Add a max_page_size to the configuration, allowing to set a global limit to the page size (non overridable): Default nil
  • Support explicitly requesting all columns via .select(*) without re-including the requested column

Removed

  • Breaking change: Drop support for Ruby 2.5 (EOL 2021-03-31)

Changed

  • Breaking change: Remove nesting of ParameterError and InvalidCursorError errors, they are now directly nested under the main gem module. So they're now RailsCursorPagination::ParameterError and RailsCursorPagination::InvalidCursorError.
  • Refactor paginator cursor interactions into exposed RailsCursorPagination::Cursor class
  • Require multi-factor-authentication to publish the gem on Rubygems

[0.2.0] - 2021-04-19

Changed

  • Breaking change: The way records are retrieved from a given cursor has been changed to no longer use CONCAT but instead simply use a compound WHERE clause in case of a custom order and having both the custom field as well as the id field in the ORDER BY query. This is a breaking change since it now changes the internal order of how records with the same value of the order_by field are returned.
  • Remove ORDER BY clause from COUNT queries

Fixed

  • Only trigger one SQL query to load the records from the database and use it to determine if there was a previous / is a next page
  • Memoize the Paginator#page method which is invoked multiple times to prevent it from mapping over the records again and again and rebuilding all cursors

Added

  • Description about order_by on arbitrary SQL to README.md

[0.1.3] - 2021-03-17

Changed

  • Make the gem publicly available via github.com/xing/rails_cursor_pagination and release it to Rubygems.org
  • Reference changelog file in the gemspec instead of the general releases Github tab

Removed

  • Remove bulk from release: The previous gem releases contained files like the content of the bin folder or the Gemfile used for testing. Since this is not useful for gem users, adjust the gemspec file accordingly.

[0.1.2] - 2021-02-04

Fixed

  • Pagination for relations in which a custom SELECT does not contain cursor-relevant fields like :id or the field specified via order_by

[0.1.1] - 2021-01-21

Added

  • Add support for handling nil for order and order_by values as if they were not passed

Fixed

  • Pagination for relations that use a custom SELECT

[0.1.0-pre] - 2021-01-12

Add

  • First version of the gem, including pagination, custom ordering by column and sort-order.