-
Notifications
You must be signed in to change notification settings - Fork 153
My old patches cherry-picked from master branch #351
base: develop
Are you sure you want to change the base?
Conversation
Thanks for this PR, @dlnsk... |
Next commit (1853d41) fix wrong count when groupBy used in query. |
@dlnsk did you try setting the Doing: return \DB::table(\DB::raw('('.$originalBuilder->toSql().') as temp_tbl'))
->mergeBindings($originalBuilder->getQuery())
->count(); is not good, because it means a full table scan will need to be done for each search, sort and count, which will be extremely slow (http://dev.mysql.com/doc/refman/5.7/en/subquery-optimization.html) |
@timgws it isn't the same. When I use groupBy I want know how many groups there are. Not how many items in all groups which |
@Javier-Rotelli yes ;o) but in little less lines |
true :p |
@Javier-Rotelli thanks but it already in main develop branch |
…. You can get this data using "fnInitComplete" or "fnServerData" or "ajax.json()" or something else. More info: * http://datatables.net/reference/api/ajax.json * http://stackoverflow.com/questions/6090260/jquery-datatables-return-additional-information-from-server
…odel or DB facade
Can't pass function name through setCallbacks because it encoding as option.