wankdanker / node-odbc

ODBC bindings for node
MIT License
174 stars 79 forks source link

Support for quoted bindings #38

Open philippefutureboy opened 6 years ago

philippefutureboy commented 6 years ago

Hi!

I'd like to request a feature to have quoted bindings, with the option of choosing the character used for quoting (", "`"). This feature allows to quote bindings to use them as table names, schema names, etc, while keeping the benefits of escape provided by bindings.

Is this a feature or a bug? Feature

What is the expected behaviour?

SELECT * FROM ??.??;

with bindings

['MySchema', 'MyTableName']

should produce

SELECT * FROM `MySchema`.`MyTableName`;

Why is this pertinent for this module?

As said above, this can enable to build dynamic queries with table names, column names, etc. as bindings.

Any existing implementation in similar modules?

Thanks for your great work :)

Cheers! 🎉

Phil