Fix boolean searching for external datasources.
This commit is contained in:
parent
1777f1f8fe
commit
1edc525d9b
|
@ -175,11 +175,7 @@ export async function sqlOutputProcessing(
|
||||||
throw new Error("Unable to generate row ID for SQL rows")
|
throw new Error("Unable to generate row ID for SQL rows")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opts?.sqs) {
|
finalRows[thisRow._id] = fixBooleanFields({ row: thisRow, table })
|
||||||
finalRows[thisRow._id] = fixBooleanFields({ row: thisRow, table })
|
|
||||||
} else {
|
|
||||||
finalRows[thisRow._id] = thisRow
|
|
||||||
}
|
|
||||||
|
|
||||||
// do this at end once its been added to the final rows
|
// do this at end once its been added to the final rows
|
||||||
finalRows = await updateRelationshipColumns(
|
finalRows = await updateRelationshipColumns(
|
||||||
|
|
|
@ -15,17 +15,16 @@ import {
|
||||||
TableSchema,
|
TableSchema,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
import _ from "lodash"
|
import _ from "lodash"
|
||||||
import exp from "constants"
|
|
||||||
|
|
||||||
jest.unmock("mssql")
|
jest.unmock("mssql")
|
||||||
|
|
||||||
describe.each([
|
describe.each([
|
||||||
// ["lucene", undefined],
|
["lucene", undefined],
|
||||||
["sqs", undefined],
|
["sqs", undefined],
|
||||||
// [DatabaseName.POSTGRES, getDatasource(DatabaseName.POSTGRES)],
|
[DatabaseName.POSTGRES, getDatasource(DatabaseName.POSTGRES)],
|
||||||
// [DatabaseName.MYSQL, getDatasource(DatabaseName.MYSQL)],
|
[DatabaseName.MYSQL, getDatasource(DatabaseName.MYSQL)],
|
||||||
// [DatabaseName.SQL_SERVER, getDatasource(DatabaseName.SQL_SERVER)],
|
[DatabaseName.SQL_SERVER, getDatasource(DatabaseName.SQL_SERVER)],
|
||||||
// [DatabaseName.MARIADB, getDatasource(DatabaseName.MARIADB)],
|
[DatabaseName.MARIADB, getDatasource(DatabaseName.MARIADB)],
|
||||||
])("/api/:sourceId/search (%s)", (name, dsProvider) => {
|
])("/api/:sourceId/search (%s)", (name, dsProvider) => {
|
||||||
const isSqs = name === "sqs"
|
const isSqs = name === "sqs"
|
||||||
const isLucene = name === "lucene"
|
const isLucene = name === "lucene"
|
||||||
|
@ -167,7 +166,7 @@ describe.each([
|
||||||
return expectSearch({ query })
|
return expectSearch({ query })
|
||||||
}
|
}
|
||||||
|
|
||||||
describe.only("boolean", () => {
|
describe("boolean", () => {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
await createTable({
|
await createTable({
|
||||||
isTrue: { name: "isTrue", type: FieldType.BOOLEAN },
|
isTrue: { name: "isTrue", type: FieldType.BOOLEAN },
|
||||||
|
|
Loading…
Reference in New Issue