auraphp / Aura.SqlQuery

Independent query builders for MySQL, PostgreSQL, SQLite, and Microsoft SQL Server.
MIT License
452 stars 86 forks source link

move copy/pasted limit()/offset() code to traits #120

Closed pavarnos closed 7 years ago

pavarnos commented 7 years ago

similar to #116: the code for limit() and offset() was duplicated in several classes. Extracted the common code to traits, added getLimit() and getOffset() to the relevant interfaces.

pavarnos commented 7 years ago

This PR is not as smooth and simple as #116 because Common\Select::page/paging has complex interactions with limit/offset. But: note the improvement in code quality: Scrutinizer reports 9.34 (up from 8.8?), mostly influenced by Common\Select