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

Function query_blob

dlib/sqlite/sqlite_tools.h:164–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162// ----------------------------------------------------------------------------------------
163
164 inline const std::vector<char> query_blob (
165 database& db,
166 const std::string& query
167 )
168 {
169 statement st(db, query);
170 st.exec();
171 if (st.move_next() && st.get_num_columns() == 1)
172 {
173 const std::vector<char>& temp = st.get_column_as_blob(0);
174 if (st.move_next())
175 throw sqlite_error("query doesn't result in exactly 1 element");
176 return temp;
177 }
178 else
179 {
180 throw sqlite_error("query doesn't result in exactly 1 element");
181 }
182 }
183
184// ----------------------------------------------------------------------------------------
185

Callers

nothing calls this directly

Calls 5

execMethod · 0.80
get_num_columnsMethod · 0.80
get_column_as_blobMethod · 0.80
sqlite_errorClass · 0.70
move_nextMethod · 0.45

Tested by

no test coverage detected