| 140 | // ---------------------------------------------------------------------------------------- |
| 141 | |
| 142 | inline int64 query_int64 ( |
| 143 | database& db, |
| 144 | const std::string& query |
| 145 | ) |
| 146 | { |
| 147 | statement st(db, query); |
| 148 | st.exec(); |
| 149 | if (st.move_next() && st.get_num_columns() == 1) |
| 150 | { |
| 151 | int64 temp = st.get_column_as_int64(0); |
| 152 | if (st.move_next()) |
| 153 | throw sqlite_error("query doesn't result in exactly 1 element"); |
| 154 | return temp; |
| 155 | } |
| 156 | else |
| 157 | { |
| 158 | throw sqlite_error("query doesn't result in exactly 1 element"); |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | // ---------------------------------------------------------------------------------------- |
| 163 |
nothing calls this directly
no test coverage detected