Skip to content

Commit

Permalink
release v - 4.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
ujjwalguptaofficial committed Jun 21, 2021
1 parent f53e27c commit 84c96af
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 26 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jsstore",
"version": "4.2.5",
"version": "4.2.6",
"description": "A complete IndexedDB wrapper with SQL like syntax.",
"main": "dist/npm.export.js",
"types": "dist/ts/main/index.d.ts",
Expand Down
49 changes: 24 additions & 25 deletions src/common/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,39 +27,39 @@ export interface IIntersectQuery {
skip: number;
limit: number;
order?: IOrderQuery;
};
}

export interface ITranscationQuery {
tables: string[];
method: string;
data?: any;
};
}

export interface ICountQuery {
from: string;
join?: IJoinQuery;
where?: IWhereQuery | IWhereQuery[];
};
}

export interface IRemoveQuery {
from: string;
where?: IWhereQuery | IWhereQuery[];
};
}

export interface IUpdateQuery {
in: string;
ignoreCase?: boolean;
set: { [columnName: string]: any };
where?: IWhereQuery | IWhereQuery[];
};
}

export interface IAlterQuery {
[version: number]: {
add: TColumns,
drop: TColumns,
modify: TColumns
}
};
};
}

export interface IOrderQuery {

Expand Down Expand Up @@ -89,19 +89,19 @@ export interface IOrderQuery {
*
* @type {[ICaseOption]}
*/
case?: [ICaseOption]
};
case?: [ICaseOption];
}

export interface IJoinQuery {
type?: string //'inner',
with: string // 'Customers',
on: string // "Customers.customerId = Orders.customerId"
type?: string; //'inner',
with: string; // 'Customers',
on: string; // "Customers.customerId = Orders.customerId"
where?: IWhereQuery | IWhereQuery[];
order?: IOrderQuery;
as?: { [originalColumnName: string]: string },
case?: { [columnName: string]: [ICaseOption] },
as?: { [originalColumnName: string]: string };
case?: { [columnName: string]: [ICaseOption] };
flatten?: string[];
};
}

export interface IWhereQueryOption {
'>'?: any;
Expand All @@ -114,12 +114,11 @@ export interface IWhereQueryOption {
regex?: any;
or?: IWhereQuery;
in?: any[];
};

export interface IWhereQuery { [columnName: string]: IWhereQueryOption | string | number | boolean };


}

export interface IWhereQuery {
[columnName: string]: IWhereQueryOption | string | number | boolean;
}

export interface ICaseOption {
'>'?: any;
Expand All @@ -129,15 +128,15 @@ export interface ICaseOption {
'-'?: any;
'!='?: any;
then: any;
};
}

export interface IAggregateOption {
max?: string | string[];
min?: string | string[];
sum?: string | string[];
count?: string | string[];
avg?: string | string[];
};
}

export interface IColumn extends IColumnOption {
name: string;
Expand All @@ -153,9 +152,9 @@ export interface ISelectQuery {
groupBy?: string | string[] | { [columnName: string]: [ICaseOption] };
aggregate?: IAggregateOption;
distinct?: boolean;
case?: { [columnName: string]: [ICaseOption] },
case?: { [columnName: string]: [ICaseOption] };
flatten?: string[];
};
}

export interface IInsertQuery {
into: string;
Expand All @@ -165,7 +164,7 @@ export interface IInsertQuery {
upsert?: boolean;
ignore?: boolean;
validation?: boolean;
};
}

export interface IColumnOption {

Expand Down

0 comments on commit 84c96af

Please sign in to comment.