row.spec.ts passing in full
This commit is contained in:
parent
2671b9d5ef
commit
bc797238aa
|
@ -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])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -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({
|
||||||
|
|
Loading…
Reference in New Issue