Skip to content

Releases: woylie/flop

0.11.0

13 Jun 01:07
4b778fa
Compare
Choose a tag to compare

Added

  • New functions Flop.Cursor.get_cursor_from_node/2 and
    Flop.Cursor.get_cursor_from_edge/2.
  • New function Flop.get_option/2.
  • Support Ecto prefixes.

Changed

  • Use Flop.Cursor.get_cursor_from_node/2 as default for the
    :get_cursor_value_func option.
  • Deprecate Flop.Cursor.get_cursor_from_map/2. Use
    Flop.Cursor.get_cursor_from_node/2 instead.
  • Flop.Relay.edges_from_result/2 can now handle nil instead of a map as
    edge information in a query result.

0.10.0

03 May 06:12
fa49a1e
Compare
Choose a tag to compare

Added

  • Add function Flop.push_order/2 for updating the order_by and
    order_directions values of a Flop struct.

0.9.1

21 Oct 09:20
11cd427
Compare
Choose a tag to compare

Fixed

  • Fixed type spec of Flop.Schema.default_order/1.

0.9.0

16 Oct 11:33
dfa7048
Compare
Choose a tag to compare

Added

  • Add like, like_and, like_or, ilike, ilike_and and ilike_or filter
    operators.
  • Add option to disable pagination types globally, for a schema or locally.
  • Add options to disable ordering or filtering.
  • Allow global configuration of get_cursor_value_func, max_limit and
    default_limit.
  • Add Flop.option type, improve documentation of available options.
  • Add Flop.Cursor.decode!/1.

Changed

  • Refactored the parameter validation. Default limits are now applied to all
    pagination types. Added validation for the after / before cursor values.
  • Flop.Cursor.decode/1 returns :ok tuple or :error now instead of raising
    an error if the cursor is invalid.
  • Flop.Cursor.decode/1 returns an error if the decoded cursor value is not a
    map with atom keys.
  • Improved documentation.

0.8.4

14 Oct 13:34
4db47ab
Compare
Choose a tag to compare

Fixed

  • Default limit was overriding first / last parameters when building query.

0.8.3

14 Oct 11:08
1c7272d
Compare
Choose a tag to compare

Fixed

  • Cursor-based pagination: has_next_page? was set when querying with last
    based on before being set. Likewise, has_previous_page? was set when
    querying with first based on after being set. Both assumptions are wrong.
    In both cases, the values are always set to false now.

0.8.2

08 Oct 16:08
a704207
Compare
Choose a tag to compare

Changed

  • Order directions are not restricted anymore for cursor-based pagination.

Fixed

  • Query for cursor-based pagination returned wrong results when using more than
    one cursor field.
  • Query for cursor-based pagination returned wrong results when using
    last/before.

0.8.1

07 Oct 01:08
62513c0
Compare
Choose a tag to compare

Changed

  • Allow structs in cursor values.

0.8.0

07 Oct 00:52
9bf1ba3
Compare
Choose a tag to compare

Added

  • Support for cursor-based pagination. Thanks to @bunker-inspector.
  • Add functions to turn query results into Relay connection format when using
    cursor-based pagination.

0.7.1

04 Sep 12:51
e24c41a
Compare
Choose a tag to compare

[0.7.1] - 2020-09-04

Fixed

  • Calculation of has_next_page? was wrong.