Skip to content

Commit 8977365

Browse files
gerwinbrunnerGerwin Brunner
andauthored
fix: 'in' clause case for ORACLE (#5345)
* fixing 'in' clause case for ORACLE * fix == to === Co-authored-by: Gerwin Brunner <gerwin.brunner@vilango.com>
1 parent a9bdb37 commit 8977365

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/find-options/FindOperator.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {FindOperatorType} from "./FindOperatorType";
22
import {Connection} from "../";
3+
import {OracleDriver} from "../driver/oracle/OracleDriver";
34

45
/**
56
* Find Operator used in Find Conditions.
@@ -107,6 +108,9 @@ export class FindOperator<T> {
107108
case "between":
108109
return `${aliasPath} BETWEEN ${parameters[0]} AND ${parameters[1]}`;
109110
case "in":
111+
if (connection.driver instanceof OracleDriver && parameters.length === 0) {
112+
return `${aliasPath} IN (null)`;
113+
}
110114
return `${aliasPath} IN (${parameters.join(", ")})`;
111115
case "any":
112116
return `${aliasPath} = ANY(${parameters[0]})`;

0 commit comments

Comments
 (0)