clickhouse-ts
Advanced tools
Comparing version 1.4.3 to 1.4.4
@@ -20,2 +20,3 @@ "use strict"; | ||
const sqlstring_1 = __importDefault(require("sqlstring")); | ||
const lodash_1 = require("lodash"); | ||
const ClickhouseHttpClient_1 = require("../httpClient/ClickhouseHttpClient"); | ||
@@ -50,7 +51,7 @@ const RedisCacheManager_1 = require("../caching/RedisCacheManager"); | ||
*/ | ||
if (typeof rowValue === 'object') { | ||
if (lodash_1.isObject(rowValue)) { | ||
const mapValues = Object | ||
.entries(rowValue) | ||
.map(([mapKey, mapValue]) => { | ||
if (typeof mapValue === 'object') | ||
if (lodash_1.isObject(rowValue)) | ||
throw new PreprocessInsertQueryError_1.PreprocessInsertQueryError(`Value of map() has denied type, ${mapValue}, ${typeof mapValue}`); | ||
@@ -57,0 +58,0 @@ return [sqlstring_1.default.escape(mapKey), sqlstring_1.default.escape(mapValue)]; |
@@ -12,3 +12,3 @@ { | ||
], | ||
"version": "1.4.3", | ||
"version": "1.4.4", | ||
"license": "ISC", | ||
@@ -15,0 +15,0 @@ "description": "Clickhouse client on TypeScript using redis caching queries", |
import sqlstring from 'sqlstring' | ||
import { Redis } from 'ioredis' | ||
import _ from 'lodash' | ||
import { isObject } from 'lodash' | ||
import { ClickhouseHttpClient } from '../httpClient/ClickhouseHttpClient' | ||
@@ -79,7 +79,7 @@ import { ClickhouseNamespace } from './interface' | ||
*/ | ||
if (typeof rowValue === 'object') { | ||
if (isObject(rowValue)) { | ||
const mapValues = Object | ||
.entries(rowValue) | ||
.map(([mapKey, mapValue]) => { | ||
if (typeof mapValue === 'object') throw new PreprocessInsertQueryError(`Value of map() has denied type, ${mapValue}, ${typeof mapValue}`) | ||
if (isObject(rowValue)) throw new PreprocessInsertQueryError(`Value of map() has denied type, ${mapValue}, ${typeof mapValue}`) | ||
return [sqlstring.escape(mapKey), sqlstring.escape(mapValue)] | ||
@@ -86,0 +86,0 @@ }) |
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
69688
1393