🚨 Latest Research:Tanstack npm Packages Compromised in Ongoing Mini Shai-Hulud Supply-Chain Attack.Learn More
Socket
Book a DemoSign in
Socket

sql-easy-builder

Package Overview
Dependencies
Maintainers
1
Versions
97
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
2.14.1
to
2.15.0
+4
-0
dist/builder.d.ts

@@ -75,2 +75,6 @@ import { Op } from './attr_builder';

/**
* index('a') => USE INDEX (a)
*/
index(name: FieldType, type?: 'USE' | 'FORCE' | 'IGNORE', for_?: 'JOIN' | 'ORDER BY' | 'GROUP BY'): this;
/**
* where({ username: 'test' }) => WHERE username = ?; ['test']

@@ -77,0 +81,0 @@ * where(w => w.eq('username', 'test')) => WHERE username = ?; ['test']

@@ -249,2 +249,15 @@ "use strict";

/**
* index('a') => USE INDEX (a)
*/
index(name, type, for_) {
this.append(`${type || 'USE'} INDEX`);
if (for_) {
this.append(`FOR ${for_}`);
}
this.append('(');
this.fields([name]);
this.append(')');
return this;
}
/**
* where({ username: 'test' }) => WHERE username = ?; ['test']

@@ -251,0 +264,0 @@ * where(w => w.eq('username', 'test')) => WHERE username = ?; ['test']

+2
-2
{
"name": "sql-easy-builder",
"version": "2.14.1",
"version": "2.15.0",
"description": "SQL easy builder",

@@ -15,3 +15,3 @@ "exports": "./dist/index.js",

"build": "rimraf dist && tsc",
"prepublishOnly": "npm run build",
"prepack": "npm run build",
"test": "tsc && ts-mocha test/test.ts"

@@ -18,0 +18,0 @@ },

# Changelog
## [2.14.1] - 2023-10-26
- 修复: $and 数组无效元素产生空 AND () 问题
## [2.14.0] - 2023-8-23
- 新增: AB.distinctCount
## [2.13.0] - 2023-4-28
- 删除: class Where 此功能不太常用,没有 jsonWhere 方便,故此删除
- 更新: symbol UNSET 改为 class UNSET,修正 ts 检查问题
- 更新: 使用 typescript 重写 test
## [2.12.0] - 2023-4-23
- 更新: between 支持单个参数查询
## [2.11.0] - 2023-4-18
- 新增: JSON 查询新增 UNSET 类型,可以删除查询条件
## [2.10.0] - 2023-4-18
- 新增: PointType, AB.point, Buffer
- 更新: AttrBuilder 为抽象类
- 更新: BuildResult 为对象类型
## [2.9.0] - 2023-3-13
- fix: JsonWhere 不能设置 null 值问题
- update: 删除 JsonWhereParam 类型
- update: WhereType 增加 Where 类型
## 2.8.1
- update() 方法忽略值为 undefined 的
## 2.8.0
- null 检查