Comparing version 1.0.32 to 1.0.33
import { orma_schema } from '../introspector/introspector'; | ||
export declare type mutate_function = (sql_strings: string[], sql_jsons: Record<string, unknown>[]) => Record<string, unknown>[]; | ||
export declare type mutate_function = (sql_strings: string[], sql_jsons: Record<string, unknown>[]) => Promise<Record<string, unknown>[]>; | ||
export declare type operation = 'create' | 'update' | 'delete'; | ||
@@ -4,0 +4,0 @@ export interface mutate_functions { |
@@ -13,7 +13,7 @@ "use strict"; | ||
for (const tier of mutate_plan) { | ||
await Promise.all(tier.map(({ operation, paths }) => { | ||
await Promise.all(tier.map(async ({ operation, paths }) => { | ||
const command_jsons = exports.get_command_jsons(operation, paths, mutation_result, orma_schema); | ||
const command_sqls = command_jsons.map(command_json => query_1.json_to_sql(command_jsons)); | ||
const mutate_function = mutate_functions[operation]; | ||
const results = mutate_function(command_sqls, command_jsons); | ||
const results = await mutate_function(command_sqls, command_jsons); | ||
paths.forEach((path, i) => { | ||
@@ -20,0 +20,0 @@ helpers_1.deep_set(path, results[i], mutation_result); |
{ | ||
"name": "orma", | ||
"version": "1.0.32", | ||
"version": "1.0.33", | ||
"description": "A declarative relational syncronous orm", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
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
221936