You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 9, 2021. It is now read-only.
This is something that would be helpful to me as well. Is this supported?
In the same vein, is there/could there be a way to remove all currently set fields? For instance, I have a paged query and want to count the total rows to be returned before it gets paged, so I'd like to replace all the currently selected fields with a single .field('count(1)'), but I don't see a way to do this.
This is not supported at the moment I'm afraid, although it wouldn't be hard to add. What you can currently do though is clone() a query builder prior to adding fields and then do a new query based off the clone.
var squel = require('squel');
var query = squel.select().from("foo").field("bar").field("xxx");
var sql = query.toString();
//if I want to only remove the "xxx" in field in runtime, how to do this?
query.remove_field("xxx"); // is squel support?
var sql2 = query.toString();
The text was updated successfully, but these errors were encountered: