Skip to content

charcoal-core 0.3

Compare
Choose a tag to compare
@mcaskill mcaskill released this 17 Nov 18:21
· 91 commits to master since this release

Major rewrite of query expressions (Filter, Order, Pagination); minor improvements for datasource repositories and data models.

Highlights:

  • Added AbstractExpression and ExpressionInterface as new foundation for Filter, Order, and Pagination
  • Added Expression to be a dedicated class for raw SQL expressions (extended by Filter and Order)
  • Added Expression Field trait and interface to unify "table" and "property" options for Filter and Order expressions
  • Added DatabaseExpressionInterface as foundation for DatabaseFilter, DatabaseOrder, and DatabasePagination
  • Added Filter Collection trait and interface for grouping Filter expressions (used by AbstractSource and Filter for nesting expressions)
  • Added Order Collection trait and interface for grouping Order expressions (used by AbstractSource)
  • Improved decision tree when compiling SQL for DatabaseFilter and DatabaseOrder
  • Added support for serializing expressions
  • Added support for named expressions
  • Added "direction" option to Order
  • Refactored unit tests and improved coverage for Charcoal\Source
  • Improved AbstractModel and StorableTrait to be leaner, less overriding
  • Cleanup DocBlocks for various classes

Warnings:

  • Filter
    • Deprecated string option in favour of condition
    • Deprecated table_name option in favour of table
    • Deprecated val option in favour of value
    • Removed DEFAULT_FUNC class constant
    • Moved DEFAULT_TABLE_NAME class constant to DatabaseSource::DEFAULT_TABLE_ALIAS
  • Order
    • Deprecated string option in favour of condition
    • Deprecated table_name option in favour of table
  • Pagination
    • Renamed DEFAULT_NUM_PER_PAGE class constant with DEFAULT_COUNT
  • DatabaseSource
    • Renamed DEFAULT_DB_TYPE class constant to MYSQL_DRIVER_NAME