Skip to content

Conversation

@pauldreik
Copy link
Contributor

This gives the possibility to let the compiler generate the index argument in Statement::bind() automatically at compile time, instead of manually invoking bind.
Instead of
SQLite::Statement stmt("SELECT * FROM MyTable WHERE colA>? && colB=? && colC<?"); stmt.bind(1,a); stmt.bind(2,b); stmt.bind(3,c);
one can write
SQLite::bind(stmt,a,b,c);

Note that this is implemented as a free function. It could be provided as a member function of SQLite::Statement instead, under a different name than bind in order not to clash with the existing SQLite::Statement::bind() overloads.

This requires c++14. Tested on gcc 5.3.1 on GNU/Linux.

@coveralls
Copy link

coveralls commented Jun 15, 2016

Coverage Status

Coverage remained the same at 0.0% when pulling 356c50a on pauldreik:master into bf61578 on SRombauts:master.

@SRombauts SRombauts merged commit 0e81f4a into SRombauts:master Jun 16, 2016
@SRombauts
Copy link
Owner

Thanks a lot for this high quality work!

SRombauts added a commit that referenced this pull request Jul 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants