MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / nextRow

Function nextRow

src/openms/source/FORMAT/SqliteConnector.cpp:218–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216 }
217
218 SqlState nextRow(sqlite3_stmt* stmt, SqlState current)
219 {
220 if (current != SqlState::SQL_ROW)
221 { // querying a new row after the last invocation gave 'SQL_DONE' might loop around
222 // to the first entry and give an infinite loop!!!
223 throw Exception::SqlOperationFailed(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION, "Sql operation requested on SQL_DONE/SQL_ERROR state. This should never happen. Please file a bug report!");
224 }
225 int rc = sqlite3_step(stmt);
226 if (rc == SQLITE_ROW)
227 {
228 return SqlState::SQL_ROW;
229 }
230 if (rc == SQLITE_DONE)
231 {
232 return SqlState::SQL_DONE;
233 }
234 if (rc == SQLITE_ERROR)
235 {
236 throw Exception::SqlOperationFailed(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION, "Sql operation failed with SQLITE_ERROR!");
237 }
238 if (rc == SQLITE_BUSY)
239 {
240 throw Exception::SqlOperationFailed(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION, "Sql operation failed with SQLITE_BUSY!");
241 }
242 if (rc == SQLITE_MISUSE)
243 {
244 throw Exception::SqlOperationFailed(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION, "Sql operation failed with SQLITE_MISUSE!");
245 }
246 throw Exception::SqlOperationFailed(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION, "Sql operation failed with unexpected error code!");
247 }
248
249 /// Special case: store integer in a string data value
250 bool extractValueIntStr(String* dst, sqlite3_stmt* stmt, int pos)

Callers 6

readMinimalMethod · 0.85
nextProteinFunction · 0.85
getFullProteins_Method · 0.85
getRunIDMethod · 0.85
readTransitions_Method · 0.85
getRunIDMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected