ontodev/sqlrest.rs

Consider supporting named binding parameters in SQL strings

Closed this issue · 0 comments

Parameterized query strings in SQLite look like SELECT ? FROM ?. Postgres ones look like SELECT \1 FROM \2. As the query gets more complicated, these are increasingly difficult to read. #2 will help with debugging, but it would be nice to be able to use named parameters SELECT {column} FROM {table} or SELECT ?column FROM ?table and provide bindings as a map from names to values. A named parameter could potentially be used more than once in the query.

This is a nice-to-have feature, not a top priority. I'm not sure how hard it would be to implement.