Comparing version 26.0.0 to 27.0.0
@@ -5,3 +5,3 @@ /** | ||
* | ||
* @version 25.1.6 | ||
* @version 26.0.0 | ||
* @author waiting | ||
@@ -69,3 +69,3 @@ * @license MIT | ||
*/ | ||
function postProcessResponse(result, _queryContext) { | ||
function postProcessResponseToCamel(result, _queryContext) { | ||
if (Array.isArray(result)) { | ||
@@ -318,4 +318,4 @@ return result.map(row => genCamelKeysFrom(row)); | ||
exports.mergeDoWithInitData = mergeDoWithInitData; | ||
exports.postProcessResponse = postProcessResponse; | ||
exports.postProcessResponseToCamel = postProcessResponseToCamel; | ||
exports.wrapIdentifier = wrapIdentifier; | ||
//# sourceMappingURL=index.cjs.js.map |
@@ -1,2 +0,2 @@ | ||
import { RecordCamelKeys } from '@waiting/shared-types'; | ||
import { RecordCamelKeys, RecusiveSnakeKeys } from '@waiting/shared-types'; | ||
import { Knex } from 'knex'; | ||
@@ -8,3 +8,3 @@ import { KnexConfig } from './types'; | ||
*/ | ||
export declare function postProcessResponse(result: unknown, _queryContext: unknown): unknown; | ||
export declare function postProcessResponseToCamel<T = unknown>(result: T, _queryContext: unknown): RecordCamelKeys<T, '_'>[] | RecordCamelKeys<T, '_'>; | ||
/** | ||
@@ -14,3 +14,3 @@ * Convert identifier (field) to snakecase | ||
export declare function wrapIdentifier(value: string, origImpl: (input: string) => string, _queryContext: unknown): string; | ||
export declare function genCamelKeysFrom<Target = unknown, From = unknown>(input: From): unknown extends Target ? RecordCamelKeys<From> : Target; | ||
export declare function genSnakeKeysFrom<Target = unknown, From = unknown>(input: From): Target; | ||
export declare function genCamelKeysFrom<Target = unknown, From = unknown>(input: From): unknown extends Target ? RecordCamelKeys<From, '_'> : Target; | ||
export declare function genSnakeKeysFrom<Target = unknown, From = unknown>(input: From): unknown extends Target ? RecusiveSnakeKeys<From> : Target; |
@@ -36,3 +36,3 @@ import { camelToSnakeCase } from '@waiting/shared-core'; | ||
*/ | ||
export function postProcessResponse(result, _queryContext) { | ||
export function postProcessResponseToCamel(result, _queryContext) { | ||
if (Array.isArray(result)) { | ||
@@ -39,0 +39,0 @@ return result.map(row => genCamelKeysFrom(row)); |
{ | ||
"name": "kmore", | ||
"author": "waiting", | ||
"version": "26.0.0", | ||
"version": "27.0.0", | ||
"description": "A SQL query builder based on knex with powerful TypeScript type support", | ||
@@ -42,4 +42,4 @@ "keywords": [ | ||
"cross-env": "7", | ||
"kmore-types": "^26.0.0", | ||
"knex": "^2.0.0", | ||
"kmore-types": "^27.0.0", | ||
"knex": "^2.1.0", | ||
"pg": "^8.7.3" | ||
@@ -76,3 +76,3 @@ }, | ||
}, | ||
"gitHead": "6af7e4bb915f71b300a81bb758b69ae9154676bb" | ||
"gitHead": "e64d95e1b721a4107f49b5df585f3bcd1028ed4c" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
65712