Supports ',' as the delimeter
This commit is contained in:
parent
dfa995eb17
commit
03840898dd
|
@ -339,7 +339,7 @@ function buildOrderBy(order) {
|
||||||
order = [order];
|
order = [order];
|
||||||
}
|
}
|
||||||
return 'ORDER BY ' + order.map(function(o) {
|
return 'ORDER BY ' + order.map(function(o) {
|
||||||
var t = o.split(/\s+/);
|
var t = o.split(/[\s,]+/);
|
||||||
if (t.length === 1) return '`' + o + '`';
|
if (t.length === 1) return '`' + o + '`';
|
||||||
return '`' + t[0] + '` ' + t[1];
|
return '`' + t[0] + '` ' + t[1];
|
||||||
}).join(', ');
|
}).join(', ');
|
||||||
|
|
Loading…
Reference in New Issue