| 96 | // ---------------------------------------------------------------------------------------- |
| 97 | |
| 98 | inline double query_double ( |
| 99 | database& db, |
| 100 | const std::string& query |
| 101 | ) |
| 102 | { |
| 103 | statement st(db, query); |
| 104 | st.exec(); |
| 105 | if (st.move_next() && st.get_num_columns() == 1) |
| 106 | { |
| 107 | double temp = st.get_column_as_double(0); |
| 108 | if (st.move_next()) |
| 109 | throw sqlite_error("query doesn't result in exactly 1 element"); |
| 110 | return temp; |
| 111 | } |
| 112 | else |
| 113 | { |
| 114 | throw sqlite_error("query doesn't result in exactly 1 element"); |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | // ---------------------------------------------------------------------------------------- |
| 119 |
nothing calls this directly
no test coverage detected