charcoal-core 0.3
Major rewrite of query expressions (Filter, Order, Pagination); minor improvements for datasource repositories and data models.
Highlights:
- Added
AbstractExpression
andExpressionInterface
as new foundation forFilter
,Order
, andPagination
- Added
Expression
to be a dedicated class for raw SQL expressions (extended byFilter
andOrder
) - Added Expression Field
trait
andinterface
to unify "table" and "property" options forFilter
andOrder
expressions - Added
DatabaseExpressionInterface
as foundation forDatabaseFilter
,DatabaseOrder
, andDatabasePagination
- Added Filter Collection
trait
andinterface
for groupingFilter
expressions (used byAbstractSource
andFilter
for nesting expressions) - Added Order Collection
trait
andinterface
for groupingOrder
expressions (used byAbstractSource
) - Improved decision tree when compiling SQL for
DatabaseFilter
andDatabaseOrder
- 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
andStorableTrait
to be leaner, less overriding - Cleanup DocBlocks for various classes
Warnings:
Filter
- Deprecated
string
option in favour ofcondition
- Deprecated
table_name
option in favour oftable
- Deprecated
val
option in favour ofvalue
- Removed
DEFAULT_FUNC
class constant - Moved
DEFAULT_TABLE_NAME
class constant toDatabaseSource::DEFAULT_TABLE_ALIAS
- Deprecated
Order
- Deprecated
string
option in favour ofcondition
- Deprecated
table_name
option in favour oftable
- Deprecated
Pagination
- Renamed
DEFAULT_NUM_PER_PAGE
class constant withDEFAULT_COUNT
- Renamed
DatabaseSource
- Renamed
DEFAULT_DB_TYPE
class constant toMYSQL_DRIVER_NAME
- Renamed