| 391 | } |
| 392 | |
| 393 | std::string sqlite3_statement_backend::get_parameter_name(int index) const |
| 394 | { |
| 395 | // Notice that SQLite host parameters are counted from 1, not 0. |
| 396 | char const* name = sqlite3_bind_parameter_name(stmt_, index + 1); |
| 397 | if (!name) |
| 398 | return std::string(); |
| 399 | |
| 400 | // SQLite returns parameters with the leading colon which is inconsistent |
| 401 | // with the other backends, so get rid of it as well several other |
| 402 | // characters which can be used for named parameters with SQLite. |
| 403 | switch (*name) |
| 404 | { |
| 405 | case ':': |
| 406 | case '?': |
| 407 | case '@': |
| 408 | case '$': |
| 409 | name++; |
| 410 | break; |
| 411 | } |
| 412 | |
| 413 | return name; |
| 414 | } |
| 415 | |
| 416 | std::string sqlite3_statement_backend::rewrite_for_procedure_call( |
| 417 | std::string const &query) |
nothing calls this directly
no outgoing calls
no test coverage detected