phalcon/cphalcon — pull request #1204 by Emanuel1989 (2013-09-06 14:12:43+00:00)
Title: Phalcon\Mvc\Query\Builder's constructor sample code in comment + having ...

Hi,

I fixed 'having' key in parameters I also added 'offset' but there's many more to update:

- limit key could take array of 2 values (limit, offset) as the limit() method does limit (int $limit, [int $offset])

- 'conditions' key could take:
array(
array(string $conditions, [array $bindParams], [array $bindTypes])
)
or at least:
array(string $conditions, [array $bindParams], [array $bindTypes])

- 'having' key could work in the same way as 'conditions' but it could be simplified to single array(string $conditions, [array $bindParams], [array $bindTypes])

- adding explicit DESC or ASC to 'order' value like that array('name DESC', 'id ASC') causes following exception thrown:
Uncaught exception 'Phalcon\\Mvc\\Model\\Exception' with message 'Scanning error before 'name DESC], [id ...'

PS. Why all those function aren't simply using methods of that class instead of setting them inside constructor?

I hope that all above makes sense and it' at least a little bit helpful.

Thanks,

Kamil