Updating function name.
This commit is contained in:
parent
e0d8a66fd8
commit
cf75a8a1f3
|
@ -30,7 +30,7 @@ import {
|
||||||
buildExternalRelationships,
|
buildExternalRelationships,
|
||||||
buildSqlFieldList,
|
buildSqlFieldList,
|
||||||
generateIdForRow,
|
generateIdForRow,
|
||||||
isKnexNoRowReadResponse,
|
isKnexEmptyReadResponse,
|
||||||
isManyToMany,
|
isManyToMany,
|
||||||
sqlOutputProcessing,
|
sqlOutputProcessing,
|
||||||
} from "./utils"
|
} from "./utils"
|
||||||
|
@ -434,7 +434,7 @@ export class ExternalRequest<T extends Operation> {
|
||||||
})
|
})
|
||||||
// this is the response from knex if no rows found
|
// this is the response from knex if no rows found
|
||||||
const rows: Row[] =
|
const rows: Row[] =
|
||||||
!Array.isArray(response) || isKnexNoRowReadResponse(response)
|
!Array.isArray(response) || isKnexEmptyReadResponse(response)
|
||||||
? []
|
? []
|
||||||
: response
|
: response
|
||||||
const storeTo = isManyToMany(field)
|
const storeTo = isManyToMany(field)
|
||||||
|
|
|
@ -195,7 +195,7 @@ export function buildSqlFieldList(
|
||||||
return fields
|
return fields
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isKnexNoRowReadResponse(resp: DatasourcePlusQueryResponse) {
|
export function isKnexEmptyReadResponse(resp: DatasourcePlusQueryResponse) {
|
||||||
return (
|
return (
|
||||||
!Array.isArray(resp) ||
|
!Array.isArray(resp) ||
|
||||||
resp.length === 0 ||
|
resp.length === 0 ||
|
||||||
|
|
|
@ -14,7 +14,7 @@ import {
|
||||||
processDates,
|
processDates,
|
||||||
processFormulas,
|
processFormulas,
|
||||||
} from "../../../../utilities/rowProcessor"
|
} from "../../../../utilities/rowProcessor"
|
||||||
import { isKnexNoRowReadResponse, updateRelationshipColumns } from "./sqlUtils"
|
import { isKnexEmptyReadResponse, updateRelationshipColumns } from "./sqlUtils"
|
||||||
import {
|
import {
|
||||||
basicProcessing,
|
basicProcessing,
|
||||||
generateIdForRow,
|
generateIdForRow,
|
||||||
|
@ -137,7 +137,7 @@ export async function sqlOutputProcessing(
|
||||||
relationships: RelationshipsJson[],
|
relationships: RelationshipsJson[],
|
||||||
opts?: { sqs?: boolean }
|
opts?: { sqs?: boolean }
|
||||||
): Promise<Row[]> {
|
): Promise<Row[]> {
|
||||||
if (isKnexNoRowReadResponse(rows)) {
|
if (isKnexEmptyReadResponse(rows)) {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
let finalRows: { [key: string]: Row } = {}
|
let finalRows: { [key: string]: Row } = {}
|
||||||
|
|
Loading…
Reference in New Issue