@platformatic/sql-mapper
Advanced tools
Comparing version 0.20.1 to 0.21.0
@@ -209,2 +209,11 @@ 'use strict' | ||
for (const key of Object.keys(where)) { | ||
if (key === 'or') { | ||
const orCriteria = [] | ||
for (const orPart of where[key]) { | ||
const cret = computeCriteria({ where: orPart }) | ||
orCriteria.push(sql`(${sql.join(cret, sql` AND `)})`) | ||
} | ||
criteria.push(sql`(${sql.join(orCriteria, sql` OR `)})`) | ||
continue | ||
} | ||
const value = where[key] | ||
@@ -211,0 +220,0 @@ const field = inputToFieldMap[key] |
{ | ||
"name": "@platformatic/sql-mapper", | ||
"version": "0.20.1", | ||
"version": "0.21.0", | ||
"description": "A data mapper utility for SQL databases", | ||
@@ -5,0 +5,0 @@ "main": "mapper.js", |
159337
29
5032