jennifer v0.6.2 Release Notes

Release Date: 2018-10-23 // over 5 years ago
  • ๐Ÿš€ This is an intermediate release before the breaking 0.7.0.

    ๐Ÿ”„ Changelog

    General

    • โž• add :nodoc: to all internal constants and generated methods (implementing standard ORM methods) from the macros

    QueryBuilder

    • Query isn't extended by Ifrit
    • โž• add OrderItem to describe order direction
    • โž• add Criteria#order, Criteria#asc and Criteria#desc to create OrderItem
    • โž• add Condition#eql? to compare with other condition or SQLNode (returns false)
    • โž• add Criteria#eql?, Grouping#eql?, LogicOperator#eql?
    • โž• add Query#order and Query#reorder with accepting OrderItem
    • now Query#order with block to expect a OrderItem
    • โœ‚ remove CriteriaContainer
    • QueryObject now is an abstract class
    • ๐Ÿ”„ changed wording for the ArgumentError in #max, #min, #sum, #avg methods of Aggregation to "Cannot be used with grouping"
    • ๐Ÿ”„ change Query#from(_from : String | Query) signature to Query#from(from : String | Query)

    Model

    • โšก๏ธ #save and #update will return true when is called on an object with no changed fields (all before callbacks are invoked)
    • next Base methods become abstract: .primary_auto_incrementable?, .build_params, #destroy, #arguments_to_save, #arguments_to_insert
    • Base#_extract_attributes and Base#_sti_extract_attributes become private
    • all callback invocation methods become protected
    • next Resource methods become abstract: .primary, .field_count, .field_names, .columns_tuple, #to_h, #to_str_h
    • Resource isn't extended by Ifrit
    • ๐Ÿ— regenerate .build_params for STI models
    • Scoping.scope(Symbol,QueryObject) now checks in runtime whether T of Jennifer::QueryBuilder::ModelQuery(T) responds to method named after the scope

    View

    • Base#_after_initialize_callback becomes protected
    • Base#_extract_attributes becomes private

    Adapter

    • ๐Ÿ›  fix custom port not used when accessing the Postgres database

    Migration

    • TableBuilder::Base isn't extended by Ifrit
    • rename TableBuilder::ChangeTable#new_table_rename getter to #new_table_name
    • ๐Ÿ›  fix misuse of local variable in TableBuilder::ChangeTable#rename_table
    • TableBuilder::ChangeTable#change_column has next changes:
      • old_name argument renamed to name
      • new_name argument is replaced with option in options arguemnt hash
      • raise ArgumentError if both type and options[:sql_type] are nil
    • TableBuilder::ChangeTable#change_column raises ArgumentError if both type and options[:sql_type] are nil
    • TableBuilder::CreateTable#field data_type argument renamed to type
    • 0๏ธโƒฃ TableBuilder::CreateTable#timestamps creates fields with null: false by default
    • ๐Ÿšš TableBuilder::CreateTable#add_index is removed in favour of #index
    • ๐Ÿ”– .pending_versions, .assert_outdated_pending_migrations and .default_adapter methods of Runnerbecome private
    • ๐Ÿšš Runner.config is removed