Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Implementing new features for queries Warning BC BREAK #705

Merged
merged 1 commit into from

2 participants

Simon JAILLET Nate Abele
Simon JAILLET
Collaborator

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.

Ps:
Good luck for the reviewer ;-)

Nate Abele nateabele merged commit 5614b74 into from
Simon JAILLET jails referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Simon JAILLET jails referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Simon JAILLET jails referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Simon JAILLET jails referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Simon JAILLET jails referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Simon JAILLET jails referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Simon JAILLET jails referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Simon JAILLET jails referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Simon JAILLET jails referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Simon JAILLET jails referenced this pull request from a commit
Simon JAILLET jails `data\source\Database::fields()` && `data\model\Query::fields()` refa…
…ctoring

- Additionnal tests for `data\model\Query::fields()`
- Some cleanup & more test cases for #705
a540060
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.