Forum Stats

  • 3,741,756 Users
  • 2,248,473 Discussions
  • 7,861,976 Comments

Discussions

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

3394745
3394745 Member Posts: 1
edited Feb 9, 2017 1:14PM in Node.js

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.

Answers

Sign In or Register to comment.