Working towards getting first SQS test passing.

This commit is contained in:
Sam Rose 2024-04-09 15:55:44 +01:00
parent c5580b4767
commit 2d36cf6c6a
No known key found for this signature in database
4 changed files with 10 additions and 10 deletions

View File

@ -32,7 +32,7 @@ export async function updateRelationshipColumns(
row: Row,
rows: { [key: string]: Row },
relationships: RelationshipsJson[],
opts?: { internal?: boolean }
opts?: { sqs?: boolean }
) {
const columns: { [key: string]: any } = {}
for (let relationship of relationships) {
@ -55,7 +55,7 @@ export async function updateRelationshipColumns(
row,
table: linkedTable,
isLinked: true,
internal: opts?.internal,
internal: opts?.sqs,
})
if (!linked._id) {
continue

View File

@ -117,7 +117,7 @@ export async function sqlOutputProcessing(
table: Table,
tables: Record<string, Table>,
relationships: RelationshipsJson[],
opts?: { internal?: boolean }
opts?: { sqs?: boolean }
): Promise<Row[]> {
if (!Array.isArray(rows) || rows.length === 0 || rows[0].read === true) {
return []
@ -146,7 +146,7 @@ export async function sqlOutputProcessing(
row,
table,
isLinked: false,
internal: opts?.internal,
internal: opts?.sqs,
}),
table
)

View File

@ -7,12 +7,12 @@ import { Datasource, FieldType, Table } from "@budibase/types"
jest.unmock("mssql")
describe.each([
["internal", undefined],
// ["internal", undefined],
["internal-sqs", undefined],
[DatabaseName.POSTGRES, getDatasource(DatabaseName.POSTGRES)],
[DatabaseName.MYSQL, getDatasource(DatabaseName.MYSQL)],
[DatabaseName.SQL_SERVER, getDatasource(DatabaseName.SQL_SERVER)],
[DatabaseName.MARIADB, getDatasource(DatabaseName.MARIADB)],
//[DatabaseName.POSTGRES, getDatasource(DatabaseName.POSTGRES)],
//[DatabaseName.MYSQL, getDatasource(DatabaseName.MYSQL)],
//[DatabaseName.SQL_SERVER, getDatasource(DatabaseName.SQL_SERVER)],
//[DatabaseName.MARIADB, getDatasource(DatabaseName.MARIADB)],
])("/api/:sourceId/search (%s)", (name, dsProvider) => {
const isSqs = name === "internal-sqs"
const config = setup.getConfig()

View File

@ -179,7 +179,7 @@ export async function search(
allTablesMap,
relationships,
{
internal: true,
sqs: true,
}
),
}