Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Implementing new features for queries Warning BC BREAK #705

merged 1 commit into from Dec 4, 2012


None yet
2 participants

jails commented Dec 4, 2012

BC break:

  • the 'constraint' option is now called 'constraints' (i.e with an extra 's')
  • Query::constraints() has been removed (see Database::on() for PDO datasources)
  • Query has been refactored (is doesn't build the join's contraints)
  • Queries are now exported according a datasource strategy (Acutally only the joined strategy (i.e. LEFT JOIN) have been implemented).
  • Deep aliasing support. If Models define constraints in their relationship (i.e. 'constraints => array('Model1.id' => 'Model2.model1_id), Model1 and/or Model2 will be automagically aliased to avoid conflicts and make nested 'with' works as expected
  • 'condititions' are unchanged (i.e. 'name escaped' => 'string escaped')
  • 'constraints' are unchanged (i.e. 'name escaped' => 'name escaped'). However (object) casted value now won't be escaped.

Futur developments :

  • Allow Queries to contain subqueries
  • Allow Datasource to manage queries with subqueries.
  • Implements the "subquery strategy" for both PDO and NoSql datasource.

Good luck for the reviewer ;-)

@nateabele nateabele added a commit that referenced this pull request Dec 4, 2012

@nateabele nateabele Merge pull request #705 from jails/database
Implementing new features for queries Warning BC BREAK

@nateabele nateabele merged commit 5614b74 into UnionOfRAD:dev Dec 4, 2012

1 check passed

default The Travis build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment