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