sql-easy-builder
Advanced tools
@@ -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; |
+8
-3
@@ -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; |
+1
-1
@@ -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; |
+1
-1
| { | ||
| "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", |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
46760
0.11%1322
0.38%