Is it possible to pass parameters of different types in Ellipses(…)? I am writing a function to make the SQL query, where I want to add values to the Insert statement through Ellipse and my values are of different type.
Is it possible to pass parameters of different types in Ellipses(…)? I am writing
Share
As a word of warning, don’t be too clever with this. Not that I’ve suffered greatly for similar endeavors. :))
Sqlite has built in query builders, check those first. What they wont let you do is specify a table name, which is probably what your problem is.
boost::format is a good option for this. It’s type safe and less likely to segfault on you like C’s variadic arguments.
EDIT:
Sqlite handles parameter binding on its own, you shouldn’t need any variadic aruments for that.
The sqlite3_bind_* functions provide access.
You might use something like this:
These bind functions have return values which you must check, I’ll leave that to you.