Hi Sebastian,
It seems the QueryBuilder doesn't support the SELECT * syntax. You need to name every column you want to query which is a pain.
You could file a feature request for this.
In the mean time you could use the following method to get all columns:
- Code: Select all
/**
* @param {QBSelect} _oSelect
*/
function getAllColumns(_oSelect) {
/** @type {Array<String>} */
var _aNames = _oSelect.columns['allnames'];
_aNames.map(function(_sName) {
_oSelect.result.add(_oSelect.getColumn(_sName));
});
// no need to return anything since it was passed as a reference
}
Then you just call it like so:
- Code: Select all
getAllColumns(query);
Hope this helps.