Skip to Main Content

Node-Oracledb - Query with dynamic filtering without needing to specify bind parameters

3394745Feb 8 2017 — edited Feb 9 2017

Hello, Is there a way in Node-OracleDB driver by which we can pass dynamic filter conditions without specifying bind parameters in query string?

Something like:

var queryStr = "Select * from Employee e";

var bindVars = { name: "John",  age: "23" };

connection.execute(queryStr, bindVars);

So, here filter conditions would still get applied during query execution, but without explicitly specifying them into query string.

The use case we have here is, where we have one standard query, which we can use with frequently changing filter conditions which would be accepted as user input dynamically.

Comments
Post Details
Added on Feb 8 2017
1 comment
2,548 views