@visactor/calculator
Advanced tools
Comparing version 1.2.12-alpha.0 to 1.2.12-alpha.1
@@ -1,2 +0,2 @@ | ||
import { isArray } from 'lodash'; | ||
import { isArray } from 'lodash-es'; | ||
import { checkIsColumnNode, replaceString, toFirstUpperCase } from './utils'; | ||
@@ -3,0 +3,0 @@ import { FilterNodeType, FilterOperator, OrderType } from '../types'; |
@@ -5,3 +5,3 @@ import NodeSQLParser from 'node-sql-parser'; | ||
import { parseSqlAST } from './parseSqlAST'; | ||
import { isArray } from 'lodash'; | ||
import { isArray } from 'lodash-es'; | ||
export const queryDataset = async (sql, fieldInfo, sourceDataset) => { | ||
@@ -8,0 +8,0 @@ const { validStr, replaceMap } = preprocessSQL(sql, fieldInfo); |
@@ -1,2 +0,2 @@ | ||
import { isInteger, isString } from 'lodash'; | ||
import { isInteger, isString } from 'lodash-es'; | ||
import { DataType, ROLE } from './type'; | ||
@@ -3,0 +3,0 @@ export const execPipeline = (src, pipes, context) => pipes.reduce((pre, pipe) => { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.limit = exports.orderBy = exports.having = exports.select = exports.groupBy = exports.where = exports.from = void 0; | ||
const lodash_1 = require("lodash"); | ||
const lodash_es_1 = require("lodash-es"); | ||
const utils_1 = require("./utils"); | ||
@@ -62,3 +62,3 @@ const types_1 = require("../types"); | ||
const valueName = valueNode.value; | ||
if (!(0, lodash_1.isArray)(valueName)) { | ||
if (!(0, lodash_es_1.isArray)(valueName)) { | ||
result.value = (0, utils_1.replaceString)(valueName, replaceMap); | ||
@@ -65,0 +65,0 @@ } |
@@ -11,3 +11,3 @@ "use strict"; | ||
const parseSqlAST_1 = require("./parseSqlAST"); | ||
const lodash_1 = require("lodash"); | ||
const lodash_es_1 = require("lodash-es"); | ||
const queryDataset = async (sql, fieldInfo, sourceDataset) => { | ||
@@ -17,3 +17,3 @@ const { validStr, replaceMap } = (0, utils_1.preprocessSQL)(sql, fieldInfo); | ||
const ast = parser.astify(validStr); | ||
const queryObject = (0, parseSqlAST_1.parseSqlAST)(((0, lodash_1.isArray)(ast) ? ast[0] : ast), sourceDataset, fieldInfo, replaceMap); | ||
const queryObject = (0, parseSqlAST_1.parseSqlAST)(((0, lodash_es_1.isArray)(ast) ? ast[0] : ast), sourceDataset, fieldInfo, replaceMap); | ||
const dataset = (0, query_1.query)(queryObject); | ||
@@ -20,0 +20,0 @@ const fieldInfoNew = (0, utils_1.parseRespondField)(fieldInfo, dataset, replaceMap); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.parseRespondField = exports.getOriginalString = exports.detectFieldType = exports.preprocessSQL = exports.mergeMap = exports.replaceNonASCIICharacters = exports.replaceAll = exports.replaceString = exports.checkIsColumnNode = exports.toFirstUpperCase = exports.execPipeline = void 0; | ||
const lodash_1 = require("lodash"); | ||
const lodash_es_1 = require("lodash-es"); | ||
const type_1 = require("./type"); | ||
@@ -21,3 +21,3 @@ const execPipeline = (src, pipes, context) => pipes.reduce((pre, pipe) => { | ||
const replaceString = (str, replaceMap) => { | ||
if (!(0, lodash_1.isString)(str)) { | ||
if (!(0, lodash_es_1.isString)(str)) { | ||
return str; | ||
@@ -115,3 +115,3 @@ } | ||
if (!isNaN(numberValue)) { | ||
if ((0, lodash_1.isInteger)(numberValue)) { | ||
if ((0, lodash_es_1.isInteger)(numberValue)) { | ||
fieldType = type_1.DataType.INT; | ||
@@ -141,3 +141,3 @@ } | ||
} | ||
else if (!(0, lodash_1.isInteger)(numberValue)) { | ||
else if (!(0, lodash_es_1.isInteger)(numberValue)) { | ||
fieldType = type_1.DataType.FLOAT; | ||
@@ -169,3 +169,3 @@ return true; | ||
const getOriginalString = (str, replaceMap) => { | ||
if (!(0, lodash_1.isString)(str)) { | ||
if (!(0, lodash_es_1.isString)(str)) { | ||
return str; | ||
@@ -172,0 +172,0 @@ } |
{ | ||
"name": "@visactor/calculator", | ||
"version": "1.2.12-alpha.0", | ||
"version": "1.2.12-alpha.1", | ||
"description": "SQL-like query executor with DSL", | ||
@@ -24,6 +24,5 @@ "main": "lib", | ||
"node-sql-parser": "~4.17.0", | ||
"lodash": "4.17.21" | ||
"lodash-es": "~4.17.21" | ||
}, | ||
"devDependencies": { | ||
"@types/lodash": "4.14.182", | ||
"@types/jest": "^26.0.0", | ||
@@ -39,2 +38,3 @@ "@typescript-eslint/eslint-plugin": "5.30.0", | ||
"typescript": "4.9.5", | ||
"@types/lodash-es": "~4.17.12", | ||
"@internal/ts-config": "0.0.1", | ||
@@ -41,0 +41,0 @@ "@internal/eslint-config": "0.0.1", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
141940
+ Addedlodash-es@~4.17.21
+ Addedlodash-es@4.17.21(transitive)
- Removedlodash@4.17.21
- Removedlodash@4.17.21(transitive)