New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

sql-easy-builder

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sql-easy-builder - npm Package Compare versions

Comparing version
3.0.0
to
3.1.0
+1
-1
dist/attr_builder.d.ts

@@ -13,3 +13,3 @@ import { Builder } from './builder.js';

private args?;
constructor(fn: string, args?: any);
constructor(fn: string, args?: any | undefined);
build(builder: Builder): {

@@ -16,0 +16,0 @@ sql: string;

@@ -80,3 +80,3 @@ import { Op } from './attr_builder.js';

* where({ username: 'test' }) => WHERE username = ?; ['test']
* where(w => w.eq('username', 'test')) => WHERE username = ?; ['test']
* where(AB)
*/

@@ -83,0 +83,0 @@ private _where;

@@ -261,8 +261,13 @@ import { AttrBuilder, Op } from './attr_builder.js';

* where({ username: 'test' }) => WHERE username = ?; ['test']
* where(w => w.eq('username', 'test')) => WHERE username = ?; ['test']
* where(AB)
*/
_where(query) {
let result;
if (query && typeof query === 'object') {
result = new JsonWhereBuilder(this, query).build();
if (query) {
if (query instanceof AttrBuilder) {
result = query.build(this);
}
else if (typeof query === 'object') {
result = new JsonWhereBuilder(this, query).build();
}
}

@@ -269,0 +274,0 @@ return result;

@@ -57,3 +57,3 @@ import { Raw } from './raw.js';

*/
export type WhereType = JsonWhere;
export type WhereType = JsonWhere | AttrBuilder;
export type FieldsType = (FieldType | {

@@ -60,0 +60,0 @@ [key: string]: FieldType | FieldType[] | Builder;

{
"name": "sql-easy-builder",
"type": "module",
"version": "3.0.0",
"version": "3.1.0",
"description": "SQL easy builder",

@@ -6,0 +6,0 @@ "exports": "./dist/index.js",