@balena/abstract-sql-compiler
Advanced tools
Comparing version 7.2.0 to 7.2.1-improve-typings-74e3699cdde33d55127b8219b7c269f7da9426d4
@@ -7,2 +7,6 @@ # Change Log | ||
## 7.2.1 - 2020-12-18 | ||
* Improve typing for UpsertQuery compilation result [Pagan Gazzard] | ||
## 7.2.0 - 2020-12-16 | ||
@@ -9,0 +13,0 @@ |
@@ -207,3 +207,3 @@ export declare const enum Engines { | ||
compileSchema: (abstractSqlModel: AbstractSqlModel) => SqlModel; | ||
compileRule: (abstractSQL: AbstractSqlQuery) => SqlResult | SqlResult[]; | ||
compileRule: (abstractSQL: AbstractSqlQuery) => SqlResult | [SqlResult, SqlResult]; | ||
dataTypeValidate: (value: any, field: Pick<AbstractSqlField, 'dataType' | 'required'>) => Promise<any>; | ||
@@ -215,8 +215,8 @@ getReferencedFields: (ruleBody: AbstractSqlQuery) => ReferencedFields; | ||
export declare function compileRule(abstractSQL: AbstractSqlQuery, engine: Engines, noBinds: true): string; | ||
export declare function compileRule(abstractSQL: AbstractSqlQuery, engine: Engines, noBinds?: false): SqlResult | SqlResult[]; | ||
export declare function compileRule(abstractSQL: AbstractSqlQuery, engine: Engines, noBinds?: boolean): SqlResult | SqlResult[] | string; | ||
export declare function compileRule(abstractSQL: AbstractSqlQuery, engine: Engines, noBinds?: false): SqlResult | [SqlResult, SqlResult]; | ||
export declare function compileRule(abstractSQL: AbstractSqlQuery, engine: Engines, noBinds?: boolean): SqlResult | [SqlResult, SqlResult] | string; | ||
export declare const postgres: { | ||
optimizeSchema: (abstractSqlModel: AbstractSqlModel) => AbstractSqlModel; | ||
compileSchema: _.Function1<AbstractSqlModel, SqlModel>; | ||
compileRule: (abstractSQL: AbstractSqlQuery) => SqlResult | SqlResult[]; | ||
compileRule: (abstractSQL: AbstractSqlQuery) => SqlResult | [SqlResult, SqlResult]; | ||
dataTypeValidate: (value: any, field: Pick<AbstractSqlField, 'dataType' | 'required'>) => Promise<any>; | ||
@@ -229,3 +229,3 @@ getReferencedFields: (ruleBody: AbstractSqlQuery) => ReferencedFields; | ||
compileSchema: _.Function1<AbstractSqlModel, SqlModel>; | ||
compileRule: (abstractSQL: AbstractSqlQuery) => SqlResult | SqlResult[]; | ||
compileRule: (abstractSQL: AbstractSqlQuery) => SqlResult | [SqlResult, SqlResult]; | ||
dataTypeValidate: (value: any, field: Pick<AbstractSqlField, 'dataType' | 'required'>) => Promise<any>; | ||
@@ -238,3 +238,3 @@ getReferencedFields: (ruleBody: AbstractSqlQuery) => ReferencedFields; | ||
compileSchema: _.Function1<AbstractSqlModel, SqlModel>; | ||
compileRule: (abstractSQL: AbstractSqlQuery) => SqlResult | SqlResult[]; | ||
compileRule: (abstractSQL: AbstractSqlQuery) => SqlResult | [SqlResult, SqlResult]; | ||
dataTypeValidate: (value: any, field: Pick<AbstractSqlField, 'dataType' | 'required'>) => Promise<any>; | ||
@@ -241,0 +241,0 @@ getReferencedFields: (ruleBody: AbstractSqlQuery) => ReferencedFields; |
@@ -28,3 +28,3 @@ import { AbstractSqlQuery, AbstractSqlType, Engines } from './AbstractSQLCompiler'; | ||
export declare function AbstractSQLRules2SQL(abstractSQL: AbstractSqlQuery, $engine: Engines, $noBinds: true): string; | ||
export declare function AbstractSQLRules2SQL(abstractSQL: AbstractSqlQuery, $engine: Engines, $noBinds?: false): SqlResult | SqlResult[]; | ||
export declare function AbstractSQLRules2SQL(abstractSQL: AbstractSqlQuery, $engine: Engines, $noBinds?: boolean): SqlResult | SqlResult[] | string; | ||
export declare function AbstractSQLRules2SQL(abstractSQL: AbstractSqlQuery, $engine: Engines, $noBinds?: false): SqlResult | [SqlResult, SqlResult]; | ||
export declare function AbstractSQLRules2SQL(abstractSQL: AbstractSqlQuery, $engine: Engines, $noBinds?: boolean): SqlResult | [SqlResult, SqlResult] | string; |
{ | ||
"name": "@balena/abstract-sql-compiler", | ||
"version": "7.2.0", | ||
"version": "7.2.1-improve-typings-74e3699cdde33d55127b8219b7c269f7da9426d4", | ||
"description": "A translator for abstract sql into sql.", | ||
@@ -5,0 +5,0 @@ "main": "out/AbstractSQLCompiler.js", |
@@ -312,3 +312,5 @@ export const enum Engines { | ||
compileSchema: (abstractSqlModel: AbstractSqlModel) => SqlModel; | ||
compileRule: (abstractSQL: AbstractSqlQuery) => SqlResult | SqlResult[]; | ||
compileRule: ( | ||
abstractSQL: AbstractSqlQuery, | ||
) => SqlResult | [SqlResult, SqlResult]; | ||
dataTypeValidate: ( | ||
@@ -520,3 +522,3 @@ value: any, | ||
noBinds?: false, | ||
): SqlResult | SqlResult[]; | ||
): SqlResult | [SqlResult, SqlResult]; | ||
export function compileRule( | ||
@@ -526,3 +528,3 @@ abstractSQL: AbstractSqlQuery, | ||
noBinds?: boolean, | ||
): SqlResult | SqlResult[] | string; | ||
): SqlResult | [SqlResult, SqlResult] | string; | ||
export function compileRule( | ||
@@ -532,3 +534,3 @@ abstractSQL: AbstractSqlQuery, | ||
noBinds = false, | ||
): SqlResult | SqlResult[] | string { | ||
): SqlResult | [SqlResult, SqlResult] | string { | ||
abstractSQL = AbstractSQLOptimiser(abstractSQL, noBinds); | ||
@@ -535,0 +537,0 @@ return AbstractSQLRules2SQL(abstractSQL, engine, noBinds); |
@@ -1271,3 +1271,3 @@ import * as _ from 'lodash'; | ||
$noBinds?: false, | ||
): SqlResult | SqlResult[]; | ||
): SqlResult | [SqlResult, SqlResult]; | ||
export function AbstractSQLRules2SQL( | ||
@@ -1277,3 +1277,3 @@ abstractSQL: AbstractSqlQuery, | ||
$noBinds?: boolean, | ||
): SqlResult | SqlResult[] | string; | ||
): SqlResult | [SqlResult, SqlResult] | string; | ||
export function AbstractSQLRules2SQL( | ||
@@ -1283,3 +1283,3 @@ abstractSQL: AbstractSqlQuery, | ||
$noBinds = false, | ||
): SqlResult | SqlResult[] | string { | ||
): SqlResult | [SqlResult, SqlResult] | string { | ||
engine = $engine; | ||
@@ -1286,0 +1286,0 @@ noBinds = $noBinds; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
549849
12028
2