@db-auto/tables
Advanced tools
Comparing version 0.0.12 to 0.0.13
@@ -18,2 +18,2 @@ import { ErrorsAnd, NameAnd } from "@db-auto/utils"; | ||
} | ||
export declare function buildPlan(tables: NameAnd<CleanTable>, path: string[], id?: string, queryParams?: NameAnd<string>): ErrorsAnd<Plan | undefined>; | ||
export declare function buildPlan(tables: NameAnd<CleanTable>, path: string[], id?: string, queryParams?: NameAnd<string>, wheres?: string[]): ErrorsAnd<Plan | undefined>; |
@@ -17,3 +17,3 @@ "use strict"; | ||
} | ||
function buildPlan(tables, path, id, queryParams) { | ||
function buildPlan(tables, path, id, queryParams, wheres) { | ||
if (path.length === 0) | ||
@@ -24,3 +24,3 @@ return ['Cannot build plan for empty path']; | ||
let alias = `T${0}`; | ||
const where = makeWhere(id, params, alias, table); | ||
const where = [...(0, utils_1.safeArray)(wheres), ...makeWhere(id, params, alias, table)]; | ||
const plan = { table, alias: alias, where }; | ||
@@ -27,0 +27,0 @@ return buildNextStep(tables, path, params, plan, 1); |
{ | ||
"name": "@db-auto/tables", | ||
"description": "", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"main": "dist/index", | ||
@@ -20,3 +20,3 @@ "types": "dist/index", | ||
"dependencies": { | ||
"@db-auto/utils": "0.0.12" | ||
"@db-auto/utils": "0.0.13" | ||
}, | ||
@@ -23,0 +23,0 @@ "devDependencies": { |
32781
+ Added@db-auto/utils@0.0.13(transitive)
- Removed@db-auto/utils@0.0.12(transitive)
Updated@db-auto/utils@0.0.13