1
0
Fork 0
mirror of synced 2024-09-20 19:33:10 +12:00

row.spec.ts passing in full

This commit is contained in:
Sam Rose 2024-08-02 17:17:33 +01:00
parent 2671b9d5ef
commit bc797238aa
No known key found for this signature in database
2 changed files with 16 additions and 7 deletions

View file

@ -478,7 +478,15 @@ class InternalBuilder {
} }
}, },
(key: string[], array) => { (key: string[], array) => {
query = query[fnc](key, Array.isArray(array) ? array : [array]) if (this.client === SqlClient.ORACLE) {
const keyStr = `(${key.map(k => this.convertClobs(k)).join(",")})`
const binding = `(${array
.map((a: any) => `(${new Array(a.length).fill("?").join(",")})`)
.join(",")})`
query = query.whereRaw(`${keyStr} IN ${binding}`, array.flat())
} else {
query = query[fnc](key, Array.isArray(array) ? array : [array])
}
} }
) )
} }

View file

@ -67,11 +67,11 @@ async function waitForEvent(
} }
describe.each([ describe.each([
// ["internal", undefined], ["internal", 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)],
[DatabaseName.ORACLE, getDatasource(DatabaseName.ORACLE)], [DatabaseName.ORACLE, getDatasource(DatabaseName.ORACLE)],
])("/rows (%s)", (providerType, dsProvider) => { ])("/rows (%s)", (providerType, dsProvider) => {
const isInternal = dsProvider === undefined const isInternal = dsProvider === undefined
@ -1409,9 +1409,10 @@ describe.each([
await assertRowUsage(rowUsage + 3) await assertRowUsage(rowUsage + 3)
}) })
// Upserting isn't yet supported in MSSQL, see: // Upserting isn't yet supported in MSSQL / Oracle, see:
// https://github.com/knex/knex/pull/6050 // https://github.com/knex/knex/pull/6050
!isMSSQL && !isMSSQL &&
!isOracle &&
it("should be able to update existing rows with bulkImport", async () => { it("should be able to update existing rows with bulkImport", async () => {
const table = await config.api.table.save( const table = await config.api.table.save(
saveTableRequest({ saveTableRequest({