chrisandchris/passive-record-orm

View on GitHub
changelog/v2.1.0.md

Summary

Maintainability
Test Coverage
# Changelog for v2.1.0
[![Build Status](https://travis-ci.org/chrisandchris/symfony-rowmapper.svg?branch=target%2F2.1.0)](https://travis-ci.org/chrisandchris/symfony-rowmapper)

This file is the changelog for changes from version 2.0.4 to 2.1.0

## Changes
* `ModelDependencyProvider` now does not rely anymore on `PdoLayer` but on `\PDO`
* a lot of `camelCase` changes in variable naming
* Methods in `Model` relying on `\PdoStatement` are now private, use `SqlQuery`
* Method `RowMapper::mapRow` is now public
* The `Builder` is now created through a factory (`BuilderFactory`)
* So the `ModelDependencyProvider` now relies on the `BuilderFactory`
* The class `SqlQuery` does not anymore need an array for parameters
* The `_rollback()` method does not return anymore an exception if no transaction is running
* search result utility
    * uses now a `search_result` table to store the primary keys
    * caches now the result count in the `search` table
    * stores now the connected table for history purpose
    * the `SearchResultUtility::getInStatement()` method has a changed signature not requiring the table anymore
* fixed an issue where the `Builder::join()` method ignored the alias

## Additions
* the `SqlQuery` is now able to force a result using `::requiresResult()`
* added support for `UNION [ALL|DISTINCT]`
* added support for while loop with `Builder::asLong()`
* added support for foreach with `Builder::each()`
* added simpler `VALUES()` statement using `Builder::values()` with parameter
* added (basic) support for encrypted fields, using AES encryption while fetching or inserting
* added custom run handler `Model::runCustom()`
* added `Model::_inTransaction()` method
* added a whole subsystem to perform automated searches, called `Searchable`; no perfect doc yet :S
* added `Builder::combine()` method to combine builders
* added `ConcreteModel` class for use with DI instead of extending `Model` class
 
## Fixes
* the *orderby* snippet now supports the common field naming (array or with colon)
* if database mapping is missing, it is generated automatically

## Removals
* removed cache (`Builder`)
* removed statement logger (`Model`)
* removed `Model::runWithFirstKeyFirstValue`, use `SqlQuery` instead
* removed `Model::handleWithFirstRowFirstColumn`, use `SqlQuery` instead
* removed `Model::handleKeyValue`, use `SqlQuery` instead

## Deprecations
* the `Model::setMustHaveResult()` method is deprecated and to be removed in v2.2.0