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

add test for notequal

This commit is contained in:
Martin McKeaveney 2024-07-22 21:28:44 +01:00
parent 9035674f00
commit 12b5fc2a2b

View file

@ -285,4 +285,21 @@ describe("SQL query builder", () => {
sql: `select * from (select * from (select * from (select * from "test" where "test"."name" = :1 order by "test"."id" asc) where rownum <= :2) "test" order by "test"."id" asc) where rownum <= :3`,
})
})
it("should use a direct equality query for oracle when using the not equals filter", () => {
let query = new Sql(SqlClient.ORACLE, limit)._query(
generateReadJson({
filters: {
notEqual: {
name: "John",
},
},
})
)
expect(query).toEqual({
bindings: ["John", limit, 5000],
sql: `select * from (select * from (select * from (select * from "test" where "test"."name" != :1 order by "test"."id" asc) where rownum <= :2) "test" order by "test"."id" asc) where rownum <= :3`,
})
})
})