-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Same output for all Query Builder #19
Comments
Is there any working demo available on git that support MySQL and JQuery DataTable? |
It's been awhile since I worked with SQL. I'd have to spend more time than I have to look at your first message. Sorry. Also, the only example I had was proprietary, so I can't share it (and it was quite complex). |
Thank you for answer. |
got the same error, did you find out how to use it ? |
Hi, FWIW, in order to have ORDER and WHERE / SEARCH being correctly taken into account, make sure to define your columns specifying their In my version of DataTables (not sure if behaviour changed at some point), the Line 199 in ca25ef7
Line 152 in ca25ef7
If you are in that case, you have to convert these fields first into strings before passing the refactored I had no problem at all regarding the PARTIAL / LIMIT query. Hope this helps. |
Live demo of this bug: https://plnkr.co/edit/auaYxFKq1bOVU4IhcP2T?p=preview An example of workaround: function formatRequestQuery(requestQuery) {
requestQuery.columns.forEach(function(column) {
formatColumnField(column, 'orderable');
formatColumnField(column, 'searchable');
});
return requestQuery;
}
function formatColumnField(column, fieldName) {
if (typeof column[fieldName] === 'boolean') {
column[fieldName] = column[fieldName] ? 'true' : 'false'
}
} Use it to refactor the See it in action: https://plnkr.co/edit/PZiw9h5z0AgqSAQIfcXM?p=preview |
I'm getting same output for all the method calls from generate.js, am I missing anything?
Called 1
Queries:
{"recordsTotal":"SELECT COUNT(id) FROM Orgs","select":"SELECT * FROM Orgs"}
Called 2
Queries:
{"recordsTotal":"SELECT COUNT(id) FROM Orgs","select":"SELECT * FROM Orgs"}
Called 3
Queries:
{"recordsTotal":"SELECT COUNT(id) FROM Orgs","select":"SELECT * FROM Orgs"}
Called 4
Queries:
{"recordsTotal":"SELECT COUNT(id) FROM Orgs","select":"SELECT * FROM Orgs"}
The text was updated successfully, but these errors were encountered: