-
Improvement
-
Resolution: Won't Do
-
Minor
-
None
-
3.2
There a few places where you are crafting some sql and need to insert a limit clause in the sql. In particular this happens inside subselects. An example is where you want join with a subselect which is ordered in a particular way but you only want the first record.
But not having this api it forces dev's to either just write non compatible sql (eg CONTRIB-4955) or to get an sql results set, and then reprocess it and do a second set of db calls for each row which can be horrible for performance.
So I'm proposing:
1) Make a new public method called limit_clause($limitfrom, $limitnum), it will return the syntax using LIMIT, and then override it as needed in each driver as needed.
2) Refactor get_records_sql() and get_recordset_sql() in all drivers to call this new method
- blocks
-
MDL-29795 Add user/group overrides for mod/assign
-
- Closed
-