3 ms·
Can you give some examples of horribly clumsy prepared statement APIs? Every DB API I've ever used has looked like query("INSERT INTO table VALUES (?1, ?2
by Sean1708 10y ago
Can you give some examples of horribly clumsy prepared statement APIs?
Every DB API I've ever used has looked like
query("INSERT INTO table VALUES (?1, ?2, ?3)", "a", "b", "c")
or something more like
insert_into("table").values("a", "b", "c")
neither if which seem horrible or clumsy to me.
- Pxtl 10y agoIt gets painful when the SQL gets complicated, like if you're assembling the query dynamically, or if you need to pass in an array-like object. For example, imagine if you're using a multi-select GUI object as a filter. How do you load in the selected items to filter the result set?