@akylas/kiss-orm
Advanced tools
Comparing version 2.1.10 to 2.1.11
@@ -26,6 +26,7 @@ import DatabaseInterface from '../Databases/DatabaseInterface'; | ||
}): Promise<Model>; | ||
search({ from, postfix, where, orderBy, select }?: { | ||
search({ from, postfix, where, groupBy, orderBy, select }?: { | ||
from?: SqlQuery; | ||
postfix?: SqlQuery; | ||
where?: SqlQuery; | ||
groupBy?: SqlQuery; | ||
orderBy?: SqlQuery; | ||
@@ -32,0 +33,0 @@ select?: SqlQuery; |
@@ -39,3 +39,3 @@ import NotFoundError from '../Errors/NotFoundError'; | ||
} | ||
async search({ from, postfix, where, orderBy, select } = {}) { | ||
async search({ from, postfix, where, groupBy, orderBy, select } = {}) { | ||
const filters = []; | ||
@@ -52,2 +52,4 @@ if (this.scope) { | ||
? sql `ORDER BY ${orderBy}` : sql ``; | ||
const groupByClause = groupBy | ||
? sql `GROUP BY ${groupBy}` : sql ``; | ||
const postfixClause = postfix | ||
@@ -63,2 +65,3 @@ ? sql `${postfix}` : sql ``; | ||
${whereClause} | ||
${groupByClause} | ||
${orderByClause} | ||
@@ -65,0 +68,0 @@ `); |
@@ -8,3 +8,3 @@ { | ||
"author": "Sébastien Caparros", | ||
"version": "2.1.10", | ||
"version": "2.1.11", | ||
"engines": { | ||
@@ -11,0 +11,0 @@ "node": ">= 12.0.0" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41203
702