Skip to content

Commit

Permalink
fix: 'in' clause case for ORACLE (typeorm#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
2 people authored and Svetlozar committed Jan 12, 2021
1 parent 35a3b5f commit 15b1ce1
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 15b1ce1

Please sign in to comment.