MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / sqlToStyleDataArray

Method sqlToStyleDataArray

src/database/WizIndexBase.cpp:361–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359}
360
361bool WizIndexBase::sqlToStyleDataArray(const CString& strSQL, CWizStyleDataArray& arrayStyle)
362{
363 try
364 {
365 CppSQLite3Query query = m_db.execQuery(strSQL);
366 while (!query.eof())
367 {
368 WIZSTYLEDATA data;
369 data.strKbGUID = kbGUID();
370 data.strGUID = query.getStringField(styleSTYLE_GUID);
371 data.strName = query.getStringField(styleSTYLE_NAME);
372 data.strDescription = query.getStringField(styleSTYLE_DESCRIPTION);
373 data.crTextColor = query.getColorField2(styleSTYLE_TEXT_COLOR);
374 data.crBackColor = query.getColorField2(styleSTYLE_BACK_COLOR);
375 data.bTextBold = query.getBoolField(styleSTYLE_TEXT_BOLD);
376 data.nFlagIndex = query.getIntField(styleSTYLE_FLAG_INDEX);
377 data.tModified = query.getTimeField(styleDT_MODIFIED);
378 data.nVersion = query.getInt64Field(styleVersion);
379
380 arrayStyle.push_back(data);
381 query.nextRow();
382 }
383
384 std::sort(arrayStyle.begin(), arrayStyle.end());
385 return true;
386 }
387 catch (const CppSQLite3Exception& e)
388 {
389 return logSQLException(e, strSQL);
390 }
391}
392
393bool WizIndexBase::sqlToMetaDataArray(const CString& strSQL, CWizMetaDataArray& arrayMeta)
394{

Callers

nothing calls this directly

Calls 11

execQueryMethod · 0.80
eofMethod · 0.80
getStringFieldMethod · 0.80
getColorField2Method · 0.80
getBoolFieldMethod · 0.80
getIntFieldMethod · 0.80
getTimeFieldMethod · 0.80
getInt64FieldMethod · 0.80
nextRowMethod · 0.80
beginMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected