Add OrderBy Rand()
This commit is contained in:
parent
5307f68364
commit
8355d803d4
|
@ -1185,8 +1185,12 @@ SQLConnector.prototype.buildOrderBy = function(model, order) {
|
|||
return '';
|
||||
}
|
||||
var self = this;
|
||||
if (typeof order === 'string') {
|
||||
order = [order];
|
||||
if (order === 'rand') {
|
||||
return 'ORDER BY RAND()';
|
||||
} else {
|
||||
if (typeof order === 'string') {
|
||||
order = [order];
|
||||
}
|
||||
}
|
||||
var clauses = [];
|
||||
for (var i = 0, n = order.length; i < n; i++) {
|
||||
|
|
Loading…
Reference in New Issue