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 theSELECT
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 forModel::Base
scopes (will be renamed in futher releases) - all query related objects are clonable
- now
GROUP
clause is placed right after theWHERE
clause ๐ aggregation methods is moved to
Jennifer::QueryBuilder::Aggregations
module which is included in theQuery
classQuery#select
now acceptsCriteria
object,Symbol
(which now will be transformed to correspondingCriteria
), 'String' (which will be transformed toRawSql
), string and symbol tuples, array of criterion and could raise a block withExpressionBuilder
as a current context (Array(Criteria)
is expected to be returned)Query#group
got same behavior asQuery#select
Query#order
realize same idea as withQuery#select
but with hashesโ added
Criteria#alias
method which allows to alias field in theSELECT
clauseExpressionBuilder#star
creates "all" attribute; allows optional argument specifying table nameRawSql
now has@use_brakets
attribute presenting whether SQL statement should be surrounded by bracketsCriteria#sql
method now acceptsuse_brackets
argument which is passed toRawSql
Migration
- mysql got
#varchar
method for column definition - added invoking of
TableBuilder::CreateMaterializedView
in#create_materialized_view
method - now
Jennifer::TableBuilder::CreateMaterializedView
accepts onlyString
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