@chego/chego-api
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -49,3 +49,4 @@ export declare enum QuerySyntaxEnum { | ||
Using = 45, | ||
In = 46 | ||
In = 46, | ||
UnionAll = 47 | ||
} | ||
@@ -52,0 +53,0 @@ export declare enum FilterResultEnum { |
@@ -53,2 +53,3 @@ "use strict"; | ||
QuerySyntaxEnum[QuerySyntaxEnum["In"] = 46] = "In"; | ||
QuerySyntaxEnum[QuerySyntaxEnum["UnionAll"] = 47] = "UnionAll"; | ||
})(QuerySyntaxEnum = exports.QuerySyntaxEnum || (exports.QuerySyntaxEnum = {})); | ||
@@ -55,0 +56,0 @@ var FilterResultEnum; |
@@ -1,2 +0,2 @@ | ||
import { IQueryAndWhere, IQuerySelect } from './interfaces'; | ||
import { IQueryAndWhere, IQuerySelect, IQueryUnionAll } from './interfaces'; | ||
import { QuerySyntaxEnum } from './enums'; | ||
@@ -42,2 +42,8 @@ import { QuerySyntaxTemplate, QueryBuildFunction, AnyButFunction, StringOrProperty, Fn } from './types'; | ||
} | ||
export interface IQueryHavingAnd { | ||
and: IQueryHaving & IQueryHavingNot & IQueryHavingEqualTo & IQueryHavingLike & IQueryHavingGT & IQueryHavingLT & IQueryHavingBetween & IQueryHavingWrapped; | ||
} | ||
export interface IQueryHavingAndLite { | ||
and: IQueryHaving & IQueryHavingWrapped; | ||
} | ||
export interface IQueryAnd { | ||
@@ -55,2 +61,5 @@ and: IQueryNot & IQueryEqualTo & IQueryLike & IQueryGT & IQueryLT & IQueryBetween & IQueryWhere & IQueryWrapped; | ||
} | ||
export interface IQueryHavingBetween { | ||
between(min: number, max: number): IQueryOrderBy & IQueryLimit & IQueryHavingAnd & IQueryHavingOr; | ||
} | ||
export interface IQueryDelete { | ||
@@ -62,2 +71,5 @@ delete(): IQueryFrom; | ||
} | ||
export interface IQueryHavingEqualTo { | ||
eq(...values: CommandProp[]): IQueryOrderBy & IQueryLimit & IQueryHavingAnd & IQueryHavingOr; | ||
} | ||
export interface IQueryExists { | ||
@@ -67,6 +79,6 @@ exists(fn: Fn): IQueryOrderBy & IQueryGroupBy & IQueryLimit & IQueryAndWhere & IQueryOrWhere; | ||
export interface IQueryIn { | ||
in(...values: AnyButFunction[]): IQueryOrderBy & IQueryGroupBy & IQueryLimit & IQueryAndWhere & IQueryOrWhere; | ||
in(...values: CommandProp[]): IQueryOrderBy & IQueryGroupBy & IQueryLimit & IQueryAndWhere & IQueryOrWhere; | ||
} | ||
export interface IQueryFrom { | ||
from(...tables: string[]): IQueryGroupBy & IQueryUnion & IQueryLeftJoin & IQueryRightJoin & IQueryJoin & IQueryFullJoin & IQueryOrderBy & IQueryWhere & IQueryLimit & IQueryWrapped; | ||
from(...tables: CommandProp[]): IQueryGroupBy & IQueryUnion & IQueryLeftJoin & IQueryRightJoin & IQueryJoin & IQueryFullJoin & IQueryOrderBy & IQueryWhere & IQueryLimit & IQueryWrapped; | ||
} | ||
@@ -76,2 +88,5 @@ export interface IQueryGT { | ||
} | ||
export interface IQueryHavingGT { | ||
gt(...values: CommandProp[]): IQueryOrderBy & IQueryLimit & IQueryHavingAnd & IQueryHavingOr; | ||
} | ||
export interface IQueryInsert { | ||
@@ -86,2 +101,5 @@ insert(...items: object[]): IQueryTo; | ||
} | ||
export interface IQueryHavingLike { | ||
like(...values: CommandProp[]): IQueryOrderBy & IQueryLimit & IQueryHavingAnd & IQueryHavingOr; | ||
} | ||
export interface IQueryLimit { | ||
@@ -93,5 +111,17 @@ limit(offsetOrCount: number, count?: number): IQueryGroupBy & IQueryOrderBy; | ||
} | ||
export interface IQueryHavingLT { | ||
lt(...values: CommandProp[]): IQueryOrderBy & IQueryLimit & IQueryHavingAnd & IQueryHavingOr; | ||
} | ||
export interface IQueryNull { | ||
null: IQueryGroupBy & IQueryOrderBy & IQueryLimit & IQueryAnd & IQueryOr; | ||
} | ||
export interface IQueryHavingNull { | ||
null: IQueryOrderBy & IQueryLimit & IQueryHavingAnd & IQueryHavingOr; | ||
} | ||
export interface IQueryHavingOr { | ||
or: IQueryHaving & IQueryNot & IQueryHavingEqualTo & IQueryHavingLike & IQueryHavingGT & IQueryHavingLT & IQueryHavingBetween & IQueryHavingWrapped; | ||
} | ||
export interface IQueryHavingOrLite { | ||
or: IQueryHaving & IQueryHavingWrapped; | ||
} | ||
export interface IQueryOr { | ||
@@ -121,2 +151,5 @@ or: IQueryNot & IQueryEqualTo & IQueryLike & IQueryGT & IQueryLT & IQueryBetween & IQueryWhere & IQueryWrapped; | ||
} | ||
export interface IQueryHavingWrapped { | ||
wrapped(fn: QueryBuildFunction<IQuery>): IQueryOrderBy & IQueryLimit & IQueryHavingAnd & IQueryHavingOr; | ||
} | ||
export interface IQueryWrapped { | ||
@@ -126,3 +159,3 @@ wrapped(fn: QueryBuildFunction<IQuery>): IQueryGroupBy & IQueryOrderBy & IQueryLimit & IQueryAnd & IQueryOr; | ||
export interface IQueryHaving { | ||
having(...values: CommandProp[]): IQueryGroupBy & IQueryOrderBy & IQueryLimit; | ||
having(...values: CommandProp[]): IQueryHavingAndLite & IQueryHavingOrLite & IQueryHavingEqualTo & IQueryHavingLT & IQueryHavingGT & IQueryHavingBetween & IQueryHavingNot & IQueryHavingNull & IQueryHavingWrapped; | ||
} | ||
@@ -148,4 +181,7 @@ export interface IQueryOn { | ||
export interface IQueryUnion { | ||
union(all: boolean): IQuerySelect; | ||
union(...fns: Fn[]): IQueryGroupBy & IQueryOrderBy & IQueryLimit; | ||
} | ||
export interface IQueryUnionAll { | ||
unionAll(...fns: Fn[]): IQueryGroupBy & IQueryOrderBy & IQueryLimit; | ||
} | ||
export interface IQueryGroupBy { | ||
@@ -157,9 +193,19 @@ groupBy(...values: StringOrProperty[]): IQueryOrderBy & IQueryLimit & IQueryHaving; | ||
} | ||
export interface IQueryHavingNot { | ||
not: IQueryHavingEqualTo & IQueryHavingLike & IQueryHavingGT & IQueryHavingLT & IQueryHavingBetween & IQueryHavingNull; | ||
} | ||
export interface IQueryNot { | ||
not: IQueryEqualTo & IQueryLike & IQueryGT & IQueryLT & IQueryBetween & IQueryNull; | ||
} | ||
export interface IQueryMethods extends IQueryAre, IQueryBetween, IQueryEqualTo, IQueryGT, IQueryIs, IQueryLike, IQueryLimit, IQueryLT, IQueryOrderBy, IQueryDelete, IQuerySelect, IQueryUpdate, IQueryWhere, IQueryWrapped, IQueryFrom, IQueryInsert, IQueryTo, IQueryNull, IQueryExists, IQueryIn, IQuerySet, IQueryOn, IQueryUsing, IQueryLeftJoin, IQueryRightJoin, IQueryJoin, IQueryFullJoin, IQueryUnion, IQueryHaving, IQueryGroupBy { | ||
export interface IQueryMethods extends IQueryAre, IQueryIs, IQueryLimit, IQueryOrderBy, IQueryDelete, IQuerySelect, IQueryUpdate, IQueryWhere, IQueryFrom, IQueryInsert, IQueryTo, IQueryExists, IQueryIn, IQuerySet, IQueryOn, IQueryUsing, IQueryLeftJoin, IQueryRightJoin, IQueryJoin, IQueryFullJoin, IQueryHaving, IQueryGroupBy, IQueryUnion, IQueryUnionAll { | ||
not: any; | ||
and: any; | ||
or: any; | ||
eq: any; | ||
lt: any; | ||
gt: any; | ||
like: any; | ||
null: any; | ||
between: any; | ||
wrapped: any; | ||
} |
{ | ||
"name": "@chego/chego-api", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "The API layer of Chego modules.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/api.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
32445
381