Comparing version 55.2.1 to 55.2.3
@@ -64,15 +64,13 @@ import assert from 'node:assert'; | ||
}; | ||
if (outputMaping) { | ||
Object.entries(outputMaping).forEach(([key, key2]) => { | ||
if (!Object.hasOwn(props, key)) { | ||
return; | ||
} | ||
// @ts-ignore | ||
const value = props[key]; | ||
Object.defineProperty(data, key2, { | ||
...defaultPropDescriptor, | ||
value, | ||
}); | ||
Object.entries(outputMaping).forEach(([key, key2]) => { | ||
if (!Object.hasOwn(props, key)) { | ||
return; | ||
} | ||
// @ts-ignore | ||
const value = props[key]; | ||
Object.defineProperty(data, key2, { | ||
...defaultPropDescriptor, | ||
value, | ||
}); | ||
} | ||
}); | ||
return data; | ||
@@ -84,3 +82,3 @@ } | ||
} | ||
if (input) { | ||
if (input.length) { | ||
if (props.page === 1 && props.total < props.pageSize && input.length < props.total) { | ||
@@ -97,2 +95,3 @@ props.total = input.length; | ||
enumerable: false, | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment | ||
value, | ||
@@ -110,2 +109,3 @@ }); | ||
// @ts-ignore | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment | ||
const pagingOptions = builder[KmorePageKey.PagingOptions]; | ||
@@ -112,0 +112,0 @@ assert(pagingOptions, 'pagingOptions should be set'); |
@@ -17,3 +17,3 @@ /* eslint-disable max-params */ | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument | ||
if (!kmore?.dict?.tables || !Object.keys(kmore.dict?.tables)?.length) { | ||
if (!kmore.dict?.tables || !Object.keys(kmore.dict.tables).length) { | ||
console.info('Kmore:createRefTables() kmore.dict or kmore.dict.tables empty'); | ||
@@ -20,0 +20,0 @@ return rb; |
@@ -0,1 +1,3 @@ | ||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */ | ||
import assert from 'node:assert'; | ||
import { camelToSnake, camelKeys, snakeKeys, snakeToCamel, } from '@waiting/shared-core'; | ||
@@ -26,2 +28,3 @@ import { CaseType, EnumClient } from './types.js'; | ||
function parseRespMysql2(res) { | ||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, @typescript-eslint/prefer-optional-chain | ||
return res && res[0] && res[0][0] && res[0][0].currenttime | ||
@@ -74,2 +77,3 @@ ? res[0][0].currenttime | ||
const caseConvert = queryContext.postProcessResponseCaseConvert; | ||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition | ||
if (!caseConvert) { | ||
@@ -95,34 +99,10 @@ return result; | ||
if (Array.isArray(result)) { | ||
const ret = result.map(row => postProcessResponseToCamel(row, _queryContext)); | ||
const ret = result.map((row) => { | ||
const data = postProcessResponseToCamel(row, _queryContext); | ||
return data; | ||
}); | ||
return ret; | ||
} | ||
else if (typeof result === 'object' && result) { | ||
const columns = _queryContext?.columns; | ||
if (!columns) { | ||
const ret = genCamelKeysFrom(result); | ||
return ret; | ||
} | ||
const resultNotConvertKeys = {}; | ||
const resultNeedConvertKeys = {}; | ||
Object.entries(result).forEach(([key, value]) => { | ||
// do not convert if value is add by builder.columns(columns) | ||
if (isIdentifierInColumns(key, columns)) { | ||
Object.defineProperty(resultNotConvertKeys, key, { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value, | ||
}); | ||
} | ||
else { | ||
Object.defineProperty(resultNeedConvertKeys, key, { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value, | ||
}); | ||
} | ||
}); | ||
const reulst2 = genCamelKeysFrom(resultNeedConvertKeys); | ||
const ret = Object.assign(resultNotConvertKeys, reulst2); | ||
const ret = _elementKeyToCamel(result, _queryContext); | ||
return ret; | ||
@@ -132,2 +112,14 @@ } | ||
} | ||
function _elementKeyToCamel(row, _queryContext) { | ||
assert(typeof row === 'object' && row, 'row should be object'); | ||
const columns = _queryContext?.columns; | ||
if (!columns) { | ||
const ret = genCamelKeysFrom(row); | ||
return ret; | ||
} | ||
const { resultNotConvertKeys, resultNeedConvertKeys } = genResultKeysData(row, columns); | ||
const reulst2 = genCamelKeysFrom(resultNeedConvertKeys); | ||
const ret = Object.assign(resultNotConvertKeys, reulst2); | ||
return ret; | ||
} | ||
/** | ||
@@ -155,34 +147,10 @@ * Convert keys of result to PascalCase, if input is object | ||
if (Array.isArray(result)) { | ||
const ret = result.map(row => postProcessResponseToSnake(row, _queryContext)); | ||
const ret = result.map((row) => { | ||
const data = postProcessResponseToSnake(row, _queryContext); | ||
return data; | ||
}); | ||
return ret; | ||
} | ||
else if (typeof result === 'object' && result) { | ||
const columns = _queryContext?.columns; | ||
if (!columns) { | ||
const ret = genSnakeKeysFrom(result); | ||
return ret; | ||
} | ||
const resultNotConvertKeys = {}; | ||
const resultNeedConvertKeys = {}; | ||
Object.entries(result).forEach(([key, value]) => { | ||
// do not convert if value is add by builder.columns(columns) | ||
if (isIdentifierInColumns(key, columns)) { | ||
Object.defineProperty(resultNotConvertKeys, key, { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value, | ||
}); | ||
} | ||
else { | ||
Object.defineProperty(resultNeedConvertKeys, key, { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value, | ||
}); | ||
} | ||
}); | ||
const reulst2 = genSnakeKeysFrom(resultNeedConvertKeys); | ||
const ret = Object.assign(resultNotConvertKeys, reulst2); | ||
const ret = _elementKeyToSnake(result, _queryContext); | ||
return ret; | ||
@@ -192,2 +160,42 @@ } | ||
} | ||
function _elementKeyToSnake(row, _queryContext) { | ||
assert(typeof row === 'object' && row, 'row should be object'); | ||
const columns = _queryContext?.columns; | ||
if (!columns) { | ||
const ret = genSnakeKeysFrom(row); | ||
return ret; | ||
} | ||
const { resultNotConvertKeys, resultNeedConvertKeys } = genResultKeysData(row, columns); | ||
const reulst2 = genSnakeKeysFrom(resultNeedConvertKeys); | ||
const ret = Object.assign(resultNotConvertKeys, reulst2); | ||
return ret; | ||
} | ||
function genResultKeysData(row, columns) { | ||
assert(typeof row === 'object' && row, 'row should be object'); | ||
const resultNotConvertKeys = {}; | ||
const resultNeedConvertKeys = {}; | ||
Object.entries(row).forEach(([key, value]) => { | ||
// do not convert if value is add by builder.columns(columns) | ||
if (isIdentifierInColumns(key, columns)) { | ||
Object.defineProperty(resultNotConvertKeys, key, { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value, | ||
}); | ||
} | ||
else { | ||
Object.defineProperty(resultNeedConvertKeys, key, { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value, | ||
}); | ||
} | ||
}); | ||
return { | ||
resultNotConvertKeys, | ||
resultNeedConvertKeys, | ||
}; | ||
} | ||
export function genCamelKeysFrom(input) { | ||
@@ -232,3 +240,3 @@ return camelKeys(input); | ||
function isIdentifierInColumns(value, columns) { | ||
if (!columns || !columns.length) { | ||
if (!columns?.length) { | ||
return false; | ||
@@ -235,0 +243,0 @@ } |
@@ -81,3 +81,3 @@ /* eslint-disable max-lines-per-function */ | ||
}; | ||
config.pool = { ...initialConfig.pool, ...options.config?.pool }; | ||
config.pool = { ...initialConfig.pool, ...options.config.pool }; | ||
this.config = config; | ||
@@ -217,4 +217,6 @@ // assert(options.dict, 'options.dict must be defined') | ||
postProcessResponse(result, queryContext) { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment | ||
let ret = result; | ||
for (const fn of this.postProcessResponseSet) { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment | ||
ret = fn(ret, queryContext); | ||
@@ -221,0 +223,0 @@ } |
@@ -8,3 +8,3 @@ import assert from 'node:assert'; | ||
const [trx] = args; | ||
assert(trx?.isTransaction === true, 'trx must be a transaction'); | ||
assert(trx.isTransaction === true, 'trx must be a transaction'); | ||
const { kmoreTrxId } = trx; | ||
@@ -11,0 +11,0 @@ assert(kmoreTrxId, 'trx.kmoreTrxId must be provided when .transacting(trx)'); |
@@ -20,2 +20,3 @@ import { defaultPropDescriptor } from './config.js'; | ||
default: | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return | ||
return Reflect.get(target, propKey, receiver); | ||
@@ -22,0 +23,0 @@ } |
@@ -18,2 +18,3 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
const { kmoreQueryId } = builder; | ||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition | ||
if (!kmoreQueryId) { | ||
@@ -31,2 +32,3 @@ const errMsg = 'kmoreQueryId should be defined, builder may not be a KmoreQueryBuilder'; | ||
// @ts-ignore | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
&& builder[KmorePageKey.PagingOptions]?.enable === true | ||
@@ -33,0 +35,0 @@ && !Object.hasOwn(builder, KmorePageKey.PagingProcessed)) { |
@@ -15,2 +15,3 @@ import assert from 'node:assert'; | ||
} | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return | ||
return Reflect.apply(target, ctx, args); | ||
@@ -32,2 +33,3 @@ }, | ||
} | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return | ||
return Reflect.apply(target, ctx, args); | ||
@@ -34,0 +36,0 @@ }, |
@@ -0,1 +1,3 @@ | ||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */ | ||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */ | ||
import assert from 'assert'; | ||
@@ -7,2 +9,3 @@ import { snakeToCamel } from '@waiting/shared-core'; | ||
// @ts-ignore | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment | ||
const scopedCols = dbDict.scoped[tableName]; | ||
@@ -9,0 +12,0 @@ if (typeof scopedCols === 'object') { |
@@ -10,2 +10,3 @@ import assert from 'assert'; | ||
const { dbDict } = builder; | ||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition | ||
if (!dbDict || Object.keys(dbDict).length < 2) { | ||
@@ -12,0 +13,0 @@ return builder; |
{ | ||
"name": "kmore", | ||
"author": "waiting", | ||
"version": "55.2.1", | ||
"version": "55.2.3", | ||
"description": "A SQL query builder based on knex with powerful TypeScript type support", | ||
@@ -43,3 +43,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@mwcp/otel": "5 - 7", | ||
"@mwcp/otel": "6 - 9", | ||
"cross-env": "7", | ||
@@ -81,3 +81,3 @@ "kmore-cli": "^55.2.1", | ||
}, | ||
"gitHead": "169846aa356ebf57addfa63b900f67ada49e63e6" | ||
"gitHead": "766f938d730bc916c58c8b7c437d3086d1b271e8" | ||
} |
@@ -95,13 +95,11 @@ import assert from 'node:assert' | ||
if (outputMaping) { | ||
Object.entries(outputMaping).forEach(([key, key2]) => { | ||
if (! Object.hasOwn(props, key)) { return } | ||
// @ts-ignore | ||
const value = props[key] as unknown | ||
Object.defineProperty(data, key2, { | ||
...defaultPropDescriptor, | ||
value, | ||
}) | ||
Object.entries(outputMaping).forEach(([key, key2]) => { | ||
if (! Object.hasOwn(props, key)) { return } | ||
// @ts-ignore | ||
const value = props[key] as unknown | ||
Object.defineProperty(data, key2, { | ||
...defaultPropDescriptor, | ||
value, | ||
}) | ||
} | ||
}) | ||
@@ -119,3 +117,3 @@ return data | ||
if (input) { | ||
if (input.length) { | ||
if (props.page === 1 && props.total < props.pageSize && input.length < props.total) { | ||
@@ -133,2 +131,3 @@ props.total = input.length | ||
enumerable: false, | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment | ||
value, | ||
@@ -164,2 +163,3 @@ }) | ||
// @ts-ignore | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment | ||
const pagingOptions: _PagingOptions = builder[KmorePageKey.PagingOptions] | ||
@@ -166,0 +166,0 @@ assert(pagingOptions, 'pagingOptions should be set') |
@@ -40,3 +40,3 @@ /* eslint-disable max-params */ | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument | ||
if (! kmore?.dict?.tables || ! Object.keys(kmore.dict?.tables)?.length) { | ||
if (! kmore.dict?.tables || ! Object.keys(kmore.dict.tables).length) { | ||
console.info('Kmore:createRefTables() kmore.dict or kmore.dict.tables empty') | ||
@@ -43,0 +43,0 @@ return rb |
@@ -0,1 +1,4 @@ | ||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */ | ||
import assert from 'node:assert' | ||
import { | ||
@@ -54,2 +57,3 @@ camelToSnake, | ||
function parseRespMysql2(res: RespMysql2): string { | ||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, @typescript-eslint/prefer-optional-chain | ||
return res && res[0] && res[0][0] && res[0][0].currenttime | ||
@@ -120,2 +124,3 @@ ? res[0][0].currenttime | ||
const caseConvert = queryContext.postProcessResponseCaseConvert | ||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition | ||
if (! caseConvert) { return result } | ||
@@ -166,41 +171,34 @@ | ||
if (Array.isArray(result)) { | ||
const ret = result.map(row => postProcessResponseToCamel(row, _queryContext)) | ||
const ret = result.map((row: PostProcessPlain | PostProcessRecord) => { | ||
const data = postProcessResponseToCamel(row, _queryContext) | ||
return data | ||
}) | ||
return ret as PostProcessRespRet<T, CaseType.camel> | ||
} | ||
else if (typeof result === 'object' && result) { | ||
const columns = _queryContext?.columns | ||
if (! columns) { | ||
const ret = genCamelKeysFrom(result) | ||
return ret as PostProcessRespRet<T, CaseType.camel> | ||
} | ||
const ret = _elementKeyToCamel(result, _queryContext) | ||
return ret | ||
} | ||
const resultNotConvertKeys = {} | ||
const resultNeedConvertKeys = {} | ||
return result as PostProcessRespRet<T, CaseType.camel> | ||
} | ||
Object.entries(result).forEach(([key, value]) => { | ||
// do not convert if value is add by builder.columns(columns) | ||
if (isIdentifierInColumns(key, columns)) { | ||
Object.defineProperty(resultNotConvertKeys, key, { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value, | ||
}) | ||
} | ||
else { | ||
Object.defineProperty(resultNeedConvertKeys, key, { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value, | ||
}) | ||
} | ||
}) | ||
function _elementKeyToCamel<T extends PostProcessRecord>( | ||
row: T, | ||
_queryContext?: QueryContext, | ||
): PostProcessRespRet<T, CaseType.camel> { | ||
const reulst2 = genCamelKeysFrom(resultNeedConvertKeys) | ||
const ret = Object.assign(resultNotConvertKeys, reulst2) | ||
assert(typeof row === 'object' && row, 'row should be object') | ||
const columns = _queryContext?.columns | ||
if (! columns) { | ||
const ret = genCamelKeysFrom(row) | ||
return ret as PostProcessRespRet<T, CaseType.camel> | ||
} | ||
return result as PostProcessRespRet<T, CaseType.camel> | ||
const { resultNotConvertKeys, resultNeedConvertKeys } = genResultKeysData(row, columns) | ||
const reulst2 = genCamelKeysFrom(resultNeedConvertKeys) | ||
const ret = Object.assign(resultNotConvertKeys, reulst2) | ||
return ret as PostProcessRespRet<T, CaseType.camel> | ||
} | ||
@@ -237,45 +235,77 @@ | ||
if (Array.isArray(result)) { | ||
const ret = result.map(row => postProcessResponseToSnake(row, _queryContext)) | ||
const ret = result.map((row: PostProcessPlain | PostProcessRecord) => { | ||
const data = postProcessResponseToSnake(row, _queryContext) | ||
return data | ||
}) | ||
return ret as PostProcessRespRet<T, CaseType.snake> | ||
} | ||
else if (typeof result === 'object' && result) { | ||
const ret = _elementKeyToSnake(result, _queryContext) | ||
return ret | ||
} | ||
const columns = _queryContext?.columns | ||
if (! columns) { | ||
const ret = genSnakeKeysFrom(result) | ||
return ret as PostProcessRespRet<T, CaseType.snake> | ||
} | ||
return result as PostProcessRespRet<T, CaseType.snake> | ||
} | ||
const resultNotConvertKeys = {} | ||
const resultNeedConvertKeys = {} | ||
function _elementKeyToSnake<T extends PostProcessRecord>( | ||
row: T, | ||
_queryContext?: QueryContext, | ||
): PostProcessRespRet<T, CaseType.snake> { | ||
Object.entries(result).forEach(([key, value]) => { | ||
// do not convert if value is add by builder.columns(columns) | ||
if (isIdentifierInColumns(key, columns)) { | ||
Object.defineProperty(resultNotConvertKeys, key, { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value, | ||
}) | ||
} | ||
else { | ||
Object.defineProperty(resultNeedConvertKeys, key, { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value, | ||
}) | ||
} | ||
}) | ||
assert(typeof row === 'object' && row, 'row should be object') | ||
const reulst2 = genSnakeKeysFrom(resultNeedConvertKeys) | ||
const ret = Object.assign(resultNotConvertKeys, reulst2) | ||
const columns = _queryContext?.columns | ||
if (! columns) { | ||
const ret = genSnakeKeysFrom(row) | ||
return ret as PostProcessRespRet<T, CaseType.snake> | ||
} | ||
return result as PostProcessRespRet<T, CaseType.snake> | ||
const { resultNotConvertKeys, resultNeedConvertKeys } = genResultKeysData(row, columns) | ||
const reulst2 = genSnakeKeysFrom(resultNeedConvertKeys) | ||
const ret = Object.assign(resultNotConvertKeys, reulst2) | ||
return ret as PostProcessRespRet<T, CaseType.snake> | ||
} | ||
function genResultKeysData<T extends PostProcessRecord>( | ||
row: T, | ||
columns: Record<string, string>[], | ||
): { | ||
resultNotConvertKeys: Record<string, unknown>, | ||
resultNeedConvertKeys: Record<string, unknown>, | ||
} { | ||
assert(typeof row === 'object' && row, 'row should be object') | ||
const resultNotConvertKeys = {} | ||
const resultNeedConvertKeys = {} | ||
Object.entries(row).forEach(([key, value]) => { | ||
// do not convert if value is add by builder.columns(columns) | ||
if (isIdentifierInColumns(key, columns)) { | ||
Object.defineProperty(resultNotConvertKeys, key, { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value, | ||
}) | ||
} | ||
else { | ||
Object.defineProperty(resultNeedConvertKeys, key, { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value, | ||
}) | ||
} | ||
}) | ||
return { | ||
resultNotConvertKeys, | ||
resultNeedConvertKeys, | ||
} | ||
} | ||
export function genCamelKeysFrom<From extends PostProcessRecord>( | ||
@@ -336,3 +366,3 @@ input: From, | ||
function isIdentifierInColumns(value: string, columns: Record<string, string>[] | undefined): boolean { | ||
if (! columns || ! columns.length) { | ||
if (! columns?.length) { | ||
return false | ||
@@ -339,0 +369,0 @@ } |
@@ -107,3 +107,3 @@ /* eslint-disable max-lines-per-function */ | ||
} | ||
config.pool = { ...initialConfig.pool, ...options.config?.pool } | ||
config.pool = { ...initialConfig.pool, ...options.config.pool } | ||
this.config = config | ||
@@ -281,4 +281,6 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment | ||
let ret = result | ||
for (const fn of this.postProcessResponseSet) { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment | ||
ret = fn(ret, queryContext) | ||
@@ -285,0 +287,0 @@ } |
@@ -24,3 +24,3 @@ import assert from 'node:assert' | ||
const [trx] = args | ||
assert(trx?.isTransaction === true, 'trx must be a transaction') | ||
assert(trx.isTransaction === true, 'trx must be a transaction') | ||
const { kmoreTrxId } = trx | ||
@@ -27,0 +27,0 @@ assert(kmoreTrxId, 'trx.kmoreTrxId must be provided when .transacting(trx)') |
@@ -40,2 +40,3 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
const { kmoreQueryId } = builder | ||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition | ||
if (! kmoreQueryId) { | ||
@@ -55,2 +56,3 @@ const errMsg = 'kmoreQueryId should be defined, builder may not be a KmoreQueryBuilder' | ||
// @ts-ignore | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
&& builder[KmorePageKey.PagingOptions]?.enable === true | ||
@@ -57,0 +59,0 @@ && ! Object.hasOwn(builder, KmorePageKey.PagingProcessed) |
@@ -35,2 +35,3 @@ import type { CreateQueryBuilderGetProxyOptions } from './base.js' | ||
default: | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return | ||
return Reflect.get(target, propKey, receiver) | ||
@@ -37,0 +38,0 @@ } |
@@ -23,2 +23,3 @@ import assert from 'node:assert' | ||
if (ctx.isCompleted()) { return } | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return | ||
return Reflect.apply(target, ctx, args) | ||
@@ -39,2 +40,3 @@ }, | ||
if (ctx.isCompleted()) { return } | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return | ||
return Reflect.apply(target, ctx, args) | ||
@@ -41,0 +43,0 @@ }, |
@@ -0,1 +1,3 @@ | ||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */ | ||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */ | ||
import assert from 'assert' | ||
@@ -18,2 +20,3 @@ | ||
// @ts-ignore | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment | ||
const scopedCols = dbDict.scoped[tableName] | ||
@@ -20,0 +23,0 @@ if (typeof scopedCols === 'object') { |
@@ -18,2 +18,3 @@ import assert from 'assert' | ||
const { dbDict } = builder | ||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition | ||
if (! dbDict || Object.keys(dbDict).length < 2) { | ||
@@ -20,0 +21,0 @@ return builder |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
462864
7248