| 74 | // ---------------------------------------------------------------------------------------- |
| 75 | |
| 76 | inline std::string query_text ( |
| 77 | database& db, |
| 78 | const std::string& query |
| 79 | ) |
| 80 | { |
| 81 | statement st(db, query); |
| 82 | st.exec(); |
| 83 | if (st.move_next() && st.get_num_columns() == 1) |
| 84 | { |
| 85 | const std::string& temp = st.get_column_as_text(0); |
| 86 | if (st.move_next()) |
| 87 | throw sqlite_error("query doesn't result in exactly 1 element"); |
| 88 | return temp; |
| 89 | } |
| 90 | else |
| 91 | { |
| 92 | throw sqlite_error("query doesn't result in exactly 1 element"); |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | // ---------------------------------------------------------------------------------------- |
| 97 |
nothing calls this directly
no test coverage detected