node-datatable
node-datatable copied to clipboard
Fix(recordsTotal): do not use search string for total count
Hi,
This PR fixes https://github.com/jpravetz/node-datatable/issues/21
It adds a new parameter to buildCountStatement and buildWherePartial private functions, so that we can differentiate recordsTotal and recordsFiltered built queries.
See it in action: https://plnkr.co/edit/4VHcTgRzFziLQ9K8RUST?p=preview
@jpravetz This looks good to me. It just needs another test run.