Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add support for limit in update and delete queries for MySQL driver #140
I've prepared this pull request as solution for issue #120. It add support for limit in update and delete queries in MySQL as desribed in documentation http://dev.mysql.com/doc/refman/5.7/en/update.html + http://dev.mysql.com/doc/refman/5.7/en/delete.html.
It add new constants to ISupplementalDriver SUPPORT_UPDATE_LIMIT and SUPPORT_DELETE_LIMIT so each driver can define support. If it's not supported, then is throw same exception as before.
I've searched for LIMIT clause support in databases supported by Nette\Database and only Sqlite has compile switch to enable/disable limit in update/delete. So remove check and leave it on database driver to throw exception seems as better solution. I'll update commit.