Supports ',' as the delimeter

This commit is contained in:
Raymond Feng 2013-08-30 08:51:32 -07:00
parent dfa995eb17
commit 03840898dd
1 changed files with 1 additions and 1 deletions

View File

@ -339,7 +339,7 @@ function buildOrderBy(order) {
order = [order];
}
return 'ORDER BY ' + order.map(function(o) {
var t = o.split(/\s+/);
var t = o.split(/[\s,]+/);
if (t.length === 1) return '`' + o + '`';
return '`' + t[0] + '` ' + t[1];
}).join(', ');