Skip to content

Commit

Permalink
fix: 'in' clause case for ORACLE (#5345)
Browse files Browse the repository at this point in the history
* fixing 'in' clause case for ORACLE

* fix == to ===

Co-authored-by: Gerwin Brunner <gerwin.brunner@vilango.com>
  • Loading branch information
gerwinbrunner and Gerwin Brunner committed May 18, 2020
1 parent a9bdb37 commit 8977365
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/find-options/FindOperator.ts
@@ -1,5 +1,6 @@
import {FindOperatorType} from "./FindOperatorType";
import {Connection} from "../";
import {OracleDriver} from "../driver/oracle/OracleDriver";

/**
* Find Operator used in Find Conditions.
Expand Down Expand Up @@ -107,6 +108,9 @@ export class FindOperator<T> {
case "between":
return `${aliasPath} BETWEEN ${parameters[0]} AND ${parameters[1]}`;
case "in":
if (connection.driver instanceof OracleDriver && parameters.length === 0) {
return `${aliasPath} IN (null)`;
}
return `${aliasPath} IN (${parameters.join(", ")})`;
case "any":
return `${aliasPath} = ANY(${parameters[0]})`;
Expand Down

0 comments on commit 8977365

Please sign in to comment.