MCPcopy Create free account
hub / github.com/davisking/dlib / get_column_as_object

Method get_column_as_object

dlib/sqlite/sqlite.h:275–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273
274 template <typename T>
275 void get_column_as_object (
276 unsigned long idx,
277 T& item
278 ) const
279 {
280 // make sure requires clause is not broken
281 DLIB_ASSERT(idx < get_num_columns(),
282 "\t void statement::get_column_as_object()"
283 << "\n\t Invalid column index."
284 << "\n\t idx: " << idx
285 << "\n\t this: " << this
286 );
287
288 const char* data = static_cast<const char*>(sqlite3_column_blob(stmt, idx));
289 const int size = sqlite3_column_bytes(stmt, idx);
290 std::istringstream sin(std::string(data,size));
291 deserialize(item, sin);
292 }
293
294 const std::string get_column_as_text (
295 unsigned long idx

Callers 1

query_objectFunction · 0.80

Calls 1

deserializeFunction · 0.50

Tested by

no test coverage detected