All Versions
Latest Version
Avg Release Cycle
31 days
Latest Release

Changelog History
Page 1

  • v2.0 Changes

    • In order to keep options standardized, .select_row_to_json will be dropping cast_to_array in favor of the cast_with option; Furthermore, the default true for cast_with option will be deprecated as well in favor of more verbose :array option
  • v1.4.0 Changes

    November 06, 2019

    ๐ŸŽ Performance tweaks:

    • #33 Reduce object creations when using the ruby shorthand &method().
  • v1.3.1 Changes

    October 02, 2019

    ๐Ÿ› Bug fix:

    • Prevent STI models from appending where clauses to select_row_to_json(b) method scopes
  • v1.3.0 Changes

    September 09, 2019
    • โž• Add Postgres Window Functions to ActiveRecord querying level.

      • introduces two new methods that are used in conjunction: .define_window & .select_window ### define_window/1 && partition_by/2 Defines one or many windows that will be place at the bottom of your query. This will also require you to define a partition via .parition_by(:column)/2.
      • partition_by/2 arguments:
      • column name being partitioned
      • order_by Processes how the window should be orders


    • User.define_window(:w).partition_by(:name, order_by: :join_date)



    • ๐Ÿ“„ Window Function Name
    • Function's arguments *optional*
    • over:
      • The window name given when constructing .define_window
    • as: *optional*
      • Alias name to give the final result

    Overall Examples:

    • User.define_window(:w).partition_by(:name).select_window(:row_number, over: :w, as: :r_id)
    • User.define_window(:w).partition_by(:name).select_window(:first_value, :id, over: :w, as: :first_id)
  • v1.2.0 Changes

    August 11, 2019

    ๐Ÿ”„ Changes

    • Introduce .foster_select a helper for select statements that can handel aliasing and provides casting options for many common aggregate functions. ๐Ÿ‘Œ Supports any aggregate that does not require multiple arguments (COUNT, AVG, MAX, ARRAY_AGG, etc..): Aggregate Functions
      • Supports Aggregate DISTINCT and ORDER BY inner expressions.
    • โฌ‡๏ธ Reduced the code foot-print for declaring new Arel functions
    • Introduce new Arel::Nodes::AggregateFunctionName for dealing with inline-ing ORDER BY (will be expanded to handel FILTER next)
    • ๐ŸŽ Code cleanup and some minor performance tweaks
    Changes to .select_row_to_json
    • Argument-less scoped blocks (inner-block argument is now optional)
    • cast_with:
      • Supported options: true (array), :array, :array_agg, distinct, and :to_jsonb
    • order_by: : Accepts ActiveRecord like options for ordering responses from an array or aggregated array

    ๐Ÿ›  Bugfixes

    • ๐Ÿ‘ #26 Support for class namespace for inet_contains @znakaska
    • ๐Ÿ›  #27 Fixed TO_JSONB class name typo that would cause an exception
  • v1.1.0 Changes

    May 04, 2019
    • ๐Ÿš… ActiveRecord/Rails 6.0 support
    • ๐Ÿ‘ Allow for any pg gem version below v2.0
  • v1.0.1 Changes

    March 29, 2019
    • Increased the required PG gem version range to accept 1.1.x
  • v1.0.0 Changes

    March 23, 2019

    โž• Add support for Postgres Union types and refactor Arel building process into a single module

    Union Query Commands

    • .union (UNION)
    • .union_all (UNION ALL)
      • or .union.all
    • union_except (EXCEPT)
      • or .union.except
    • .union_intersect (INTERSECT)
      • or .union.intersect
    • 0๏ธโƒฃ union_as (From clause alias name) (defaults to calling class table name)
      • or
    • order_union (ORDER BY)
      • or .union.order
    • .reorder_union (overides previously set .order_union)
      • or union.reorder

    JSON Query Commands

    • .select_row_to_json (ROW_TO_JSON)
    • ๐Ÿ— .json_build_object (JSON_BUILD_OBJECT)
    • ๐Ÿ— .jsonb_build_object (JSONB_BUILD_OBJECT)
    • ๐Ÿ— .json_build_literal (JSON_BUILD_OBJECT) (static hash / array implementation)
    • ๐Ÿ— .jsonb_build_literal (JSONB_BUILD_OBJECT) (static hash / array implementation)
  • v0.7.0 Changes

    September 22, 2018

    โž• Add support for Postgres Commend Table Expression (CTE) methods.

    • .with/1
    • .with.recursive/1
  • v0.6.0 Changes

    July 25, 2018

    โฌ‡๏ธ Reduced Gem file allocation. We only care about stuff in the lib directory.