Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@chego/chego-api

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chego/chego-api - npm Package Compare versions

Comparing version 1.2.5 to 2.0.0

5

lib/enums.d.ts

@@ -50,3 +50,6 @@ export declare enum QuerySyntaxEnum {

In = 46,
UnionAll = 47
UnionAll = 47,
Replace = 48,
Intersect = 49,
Minus = 50
}

@@ -53,0 +56,0 @@ export declare enum FilterResultEnum {

3

lib/enums.js

@@ -54,2 +54,5 @@ "use strict";

QuerySyntaxEnum[QuerySyntaxEnum["UnionAll"] = 47] = "UnionAll";
QuerySyntaxEnum[QuerySyntaxEnum["Replace"] = 48] = "Replace";
QuerySyntaxEnum[QuerySyntaxEnum["Intersect"] = 49] = "Intersect";
QuerySyntaxEnum[QuerySyntaxEnum["Minus"] = 50] = "Minus";
})(QuerySyntaxEnum = exports.QuerySyntaxEnum || (exports.QuerySyntaxEnum = {}));

@@ -56,0 +59,0 @@ var FilterResultEnum;

@@ -6,4 +6,4 @@ import { QuerySyntaxEnum } from './enums';

execute(...queries: IQuery[]): Promise<any>;
connect(callback?: Fn): void;
disconnect(callback?: Fn): void;
connect(): Promise<any>;
disconnect(): Promise<any>;
}

@@ -34,4 +34,4 @@ export interface IQuery extends IQueryMethods {

execute(queries: IQuery[]): Promise<any>;
connect(callback?: Fn): void;
disconnect(callback?: Fn): void;
connect(): Promise<any>;
disconnect(): Promise<any>;
}

@@ -44,9 +44,9 @@ export interface IQuerySchemeElement {

export interface IQueryHavingAnd {
and: IQueryHaving & IQueryHavingNot & IQueryHavingEqualTo & IQueryHavingLike & IQueryHavingGT & IQueryHavingLT & IQueryHavingBetween & IQueryHavingWrapped;
and: IQueryHaving & IQueryHavingNot & IQueryHavingEqualTo & IQueryHavingLike & IQueryHavingGT & IQueryHavingLT & IQueryHavingBetween & IQueryHavingInParentheses;
}
export interface IQueryHavingAndLite {
and: IQueryHaving & IQueryHavingWrapped;
and: IQueryHaving & IQueryHavingInParentheses;
}
export interface IQueryAnd {
and: IQueryNot & IQueryEqualTo & IQueryLike & IQueryGT & IQueryLT & IQueryBetween & IQueryWhere & IQueryWrapped;
and: IQueryNot & IQueryEqualTo & IQueryLike & IQueryGT & IQueryLT & IQueryBetween & IQueryWhere & IQueryIn & IQueryInParentheses;
}

@@ -78,3 +78,3 @@ export interface IQueryAndWhere {

export interface IQueryExists {
exists(fn: Fn): IQueryOrderBy & IQueryGroupBy & IQueryLimit & IQueryAndWhere & IQueryOrWhere;
exists(fn: Fn<IQuery>): IQueryOrderBy & IQueryGroupBy & IQueryLimit & IQueryAndWhere & IQueryOrWhere;
}

@@ -85,4 +85,7 @@ export interface IQueryIn {

export interface IQueryFrom {
from(...tables: CommandProp[]): IQueryGroupBy & IQueryUnion & IQueryUnionAll & IQueryLeftJoin & IQueryRightJoin & IQueryJoin & IQueryFullJoin & IQueryOrderBy & IQueryWhere & IQueryLimit & IQueryWrapped;
from(...tables: CommandProp[]): IQueryGroupBy & IQueryUnion & IQueryUnionAll & IQueryLeftJoin & IQueryRightJoin & IQueryJoin & IQueryFullJoin & IQueryOrderBy & IQueryWhere & IQueryLimit & IQueryInParentheses;
}
export interface IQueryReplace {
replace(...values: CommandProp[]): IQueryGroupBy & IQueryUnion & IQueryUnionAll & IQueryLeftJoin & IQueryRightJoin & IQueryJoin & IQueryFullJoin & IQueryOrderBy & IQueryWhere & IQueryLimit & IQueryInParentheses;
}
export interface IQueryGT {

@@ -125,9 +128,9 @@ gt(...values: CommandProp[]): IQueryGroupBy & IQueryOrderBy & IQueryLimit & IQueryAnd & IQueryOr;

export interface IQueryHavingOr {
or: IQueryHaving & IQueryNot & IQueryHavingEqualTo & IQueryHavingLike & IQueryHavingGT & IQueryHavingLT & IQueryHavingBetween & IQueryHavingWrapped;
or: IQueryHaving & IQueryNot & IQueryHavingEqualTo & IQueryHavingLike & IQueryHavingGT & IQueryHavingLT & IQueryHavingBetween & IQueryHavingInParentheses;
}
export interface IQueryHavingOrLite {
or: IQueryHaving & IQueryHavingWrapped;
or: IQueryHaving & IQueryHavingInParentheses;
}
export interface IQueryOr {
or: IQueryNot & IQueryEqualTo & IQueryLike & IQueryGT & IQueryLT & IQueryBetween & IQueryWhere & IQueryWrapped;
or: IQueryNot & IQueryEqualTo & IQueryLike & IQueryGT & IQueryLT & IQueryBetween & IQueryWhere & IQueryIn & IQueryInParentheses;
}

@@ -138,12 +141,12 @@ export interface IQueryOrWhere {

export interface IQueryOrderBy {
orderBy(...values: StringOrProperty[]): IQueryGroupBy & IQueryLimit;
orderBy(...values: any[]): IQueryGroupBy & IQueryLimit;
}
export interface IQuerySelect {
select(...args: string[]): IQueryFrom;
select(...args: any[]): IQueryFrom;
}
export interface IQuerySet {
set(data: object): IQueryOrderBy & IQueryWhere & IQueryLimit & IQueryWrapped;
set(data: object): IQueryOrderBy & IQueryWhere & IQueryLimit & IQueryInParentheses;
}
export interface IQueryTo {
to(...tables: string[]): IQueryLeftJoin & IQueryRightJoin & IQueryJoin & IQueryFullJoin & IQueryOrderBy & IQueryWhere & IQueryLimit & IQueryWrapped;
to(...tables: string[]): IQueryLeftJoin & IQueryRightJoin & IQueryJoin & IQueryFullJoin & IQueryOrderBy & IQueryWhere & IQueryLimit & IQueryInParentheses;
}

@@ -156,16 +159,16 @@ export interface IQueryUpdate {

}
export interface IQueryHavingWrapped {
wrapped(fn: QueryBuildFunction<IQuery>): IQueryOrderBy & IQueryLimit & IQueryHavingAnd & IQueryHavingOr;
export interface IQueryHavingInParentheses {
inParentheses(fn: QueryBuildFunction<IQuery>): IQueryOrderBy & IQueryLimit & IQueryHavingAnd & IQueryHavingOr;
}
export interface IQueryWrapped {
wrapped(fn: QueryBuildFunction<IQuery>): IQueryGroupBy & IQueryOrderBy & IQueryLimit & IQueryAnd & IQueryOr;
export interface IQueryInParentheses {
inParentheses(fn: QueryBuildFunction<IQuery>): IQueryGroupBy & IQueryOrderBy & IQueryLimit & IQueryAnd & IQueryOr;
}
export interface IQueryHaving {
having(...values: CommandProp[]): IQueryHavingAndLite & IQueryHavingOrLite & IQueryHavingEqualTo & IQueryHavingLT & IQueryHavingGT & IQueryHavingBetween & IQueryHavingNot & IQueryHavingNull & IQueryHavingWrapped;
having(...values: CommandProp[]): IQueryHavingAndLite & IQueryHavingOrLite & IQueryHavingEqualTo & IQueryHavingLT & IQueryHavingGT & IQueryHavingBetween & IQueryHavingNot & IQueryHavingNull & IQueryHavingInParentheses;
}
export interface IQueryOn {
on(keyA: string, keyB: string): IQueryLeftJoin & IQueryRightJoin & IQueryJoin & IQueryFullJoin & IQueryOrderBy & IQueryWhere & IQueryLimit & IQueryWrapped;
on(keyA: StringOrProperty, keyB: StringOrProperty): IQueryLeftJoin & IQueryRightJoin & IQueryJoin & IQueryFullJoin & IQueryOrderBy & IQueryWhere & IQueryLimit & IQueryInParentheses;
}
export interface IQueryUsing {
using(key: string): IQueryLeftJoin & IQueryRightJoin & IQueryJoin & IQueryFullJoin & IQueryOrderBy & IQueryWhere & IQueryLimit & IQueryWrapped;
using(key: string): IQueryLeftJoin & IQueryRightJoin & IQueryJoin & IQueryFullJoin & IQueryOrderBy & IQueryWhere & IQueryLimit & IQueryInParentheses;
}

@@ -185,9 +188,15 @@ export interface IQueryLeftJoin {

export interface IQueryUnion {
union(...fns: Fn[]): IQueryGroupBy & IQueryOrderBy & IQueryLimit;
union(...fns: Fn<IQuery>[]): IQueryGroupBy & IQueryOrderBy & IQueryLimit;
}
export interface IQueryIntersect {
intersect(...fns: Fn<IQuery>[]): IQueryGroupBy & IQueryOrderBy & IQueryLimit;
}
export interface IQueryMinus {
minus(...fns: Fn<IQuery>[]): IQueryGroupBy & IQueryOrderBy & IQueryLimit;
}
export interface IQueryUnionAll {
unionAll(...fns: Fn[]): IQueryGroupBy & IQueryOrderBy & IQueryLimit;
unionAll(...fns: Fn<IQuery>[]): IQueryGroupBy & IQueryOrderBy & IQueryLimit;
}
export interface IQueryGroupBy {
groupBy(...values: StringOrProperty[]): IQueryOrderBy & IQueryLimit & IQueryHaving;
groupBy(...values: any[]): IQueryOrderBy & IQueryLimit & IQueryHaving;
}

@@ -209,3 +218,3 @@ export interface IQueryWhereNot {

}
export interface IQueryMethods extends IQueryLimit, IQueryOrderBy, IQueryDelete, IQuerySelect, IQueryUpdate, IQueryWhere, IQueryFrom, IQueryInsert, IQueryTo, IQueryExists, IQueryIn, IQuerySet, IQueryOn, IQueryUsing, IQueryLeftJoin, IQueryRightJoin, IQueryJoin, IQueryFullJoin, IQueryHaving, IQueryGroupBy, IQueryUnion, IQueryUnionAll {
export interface IQueryMethods extends IQueryLimit, IQueryOrderBy, IQueryDelete, IQuerySelect, IQueryUpdate, IQueryWhere, IQueryFrom, IQueryInsert, IQueryTo, IQueryExists, IQueryIn, IQuerySet, IQueryOn, IQueryUsing, IQueryLeftJoin, IQueryRightJoin, IQueryJoin, IQueryFullJoin, IQueryHaving, IQueryGroupBy, IQueryUnion, IQueryIntersect, IQueryMinus, IQueryReplace, IQueryUnionAll {
not: any;

@@ -220,5 +229,5 @@ and: any;

between: any;
wrapped: any;
inParentheses: any;
is: any;
are: any;
}
import { QuerySyntaxEnum, SortingOrderEnum } from './enums';
export declare type Fn = (...args: any[]) => any;
export declare type Fn<T> = (...args: any[]) => T;
export declare type PrimaryTypes = string | number | boolean | any[] | undefined | null;
export declare type Obj = {
[key: string]: PrimaryTypes | Obj;
[key: string]: any;
};

@@ -45,1 +45,12 @@ export declare type ComparisonFunctions = QuerySyntaxEnum.Greatest | QuerySyntaxEnum.Least | QuerySyntaxEnum.Coalesce;

export declare type AnyButFunction = Exclude<PrimaryTypes | Obj, (...args: any[]) => any>;
export declare type Expression = {
type: QuerySyntaxEnum;
not: boolean;
property: Property;
value: any;
};
export declare type ExpressionScope = {
type: QuerySyntaxEnum;
expressions: ExpressionOrExpressionScope[];
};
export declare type ExpressionOrExpressionScope = Expression | ExpressionScope;
{
"name": "@chego/chego-api",
"version": "1.2.5",
"version": "2.0.0",
"description": "The API layer of Chego modules.",

@@ -29,3 +29,9 @@ "main": "./lib/api.js",

"universal",
"query"
"query",
"mysql",
"firebase",
"mongodb",
"postgresql",
"dynamodb",
"couchdb"
],

@@ -32,0 +38,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc