All Versions
21
Latest Version
Avg Release Cycle
81 days
Latest Release
1309 days ago

Changelog History
Page 3

  • v0.4.0 Changes

    September 30, 2017

    ๐Ÿ‘ป Exception

    • BadQuery now allows to append query body to the main error text

    Adapter

    • โž• added #view_exists?(name)

    QueryBuilder

    • now #eager_load behaves as old variant of #includes - via joining relations and adding them to the SELECT statement (breaking changes)
    • โž• added #preload method which allows to load all listed relations after execution of main request
    • ๐Ÿ’ฅ new behavior of #includes is same as #preload (breaking changes)
    • ๐Ÿš€ added Jennifer::QueryBuilder::QueryObject which designed to be as a abstract class for query objects for Model::Base scopes (will be renamed in futher releases)
    • all query related objects are clonable
    • now GROUP clause is placed right after the WHERE clause
    • ๐Ÿšš aggregation methods is moved to Jennifer::QueryBuilder::Aggregations module which is included in the Query class

    • Query#select now accepts Criteria object, Symbol (which now will be transformed to corresponding Criteria), 'String' (which will be transformed to RawSql), string and symbol tuples, array of criterion and could raise a block with ExpressionBuilder as a current context (Array(Criteria) is expected to be returned)

    • Query#group got same behavior as Query#select

    • Query#order realize same idea as with Query#select but with hashes

    • โž• added Criteria#alias method which allows to alias field in the SELECT clause

    • ExpressionBuilder#star creates "all" attribute; allows optional argument specifying table name

    • RawSql now has @use_brakets attribute presenting whether SQL statement should be surrounded by brackets

    • Criteria#sql method now accepts use_brackets argument which is passed to RawSql

    Migration

    • mysql got #varchar method for column definition
    • added invoking of TableBuilder::CreateMaterializedView in #create_materialized_view method
    • now Jennifer::TableBuilder::CreateMaterializedView accepts only String query
    • added #drop_materialized_view
    • โž• added CreateIndex, DropIndex, CreateView, DropView classes and corresponding methods

    Record

    • โž• added attribute(name : String, type : T.class) method

    Model

    • โž• added ::context method which return expression builder for current model
    • โž• added ::star method which returns "all" criteria
    • ๐Ÿšš moved scope definition to Scoping module
    • now scopes accepts QueryBuilder::QueryObject class name as a 2nd argument
    • now object inserting into db use old variant with inserting and grepping last inserted id (because of bug with pg crystal driver)

    View

    • โž• added view support for both mysql and postgres - name of abstract class for inheritance Jennifer::View::Base