MCPcopy Create free account
hub / github.com/audacity/audacity / DoGet

Method DoGet

libraries/lib-sqlite-helpers/sqlite/Statement.cpp:349–372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347
348template <typename Reader>
349bool Row::DoGet(Reader reader, int columnIndex) const
350{
351 if (mStatement == nullptr)
352 {
353 if (mErrors != nullptr)
354 mErrors->emplace_back(Error(SQLITE_MISUSE));
355 return false;
356 }
357
358 if (columnIndex < 0 || columnIndex >= mColumnsCount)
359 {
360 if (mErrors != nullptr)
361 mErrors->emplace_back(Error(SQLITE_RANGE));
362 return false;
363 }
364
365 if constexpr (std::is_void_v<decltype(reader())>)
366 {
367 reader();
368 return true;
369 }
370 else
371 return reader();
372}
373
374bool Row::Get(int columnIndex, bool& value) const
375{

Callers

nothing calls this directly

Calls 1

ErrorFunction · 0.70

Tested by

no test coverage detected