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

Method getDocumentsNoTagCount

src/database/WizIndex.cpp:3145–3159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3143}
3144
3145bool WizIndex::getDocumentsNoTagCount(int& nSize, bool includeTrash /* = false */)
3146{
3147 CString strWhere;
3148 if (includeTrash) {
3149 strWhere = "DOCUMENT_GUID not in (select distinct DOCUMENT_GUID from WIZ_DOCUMENT_TAG)";
3150 } else {
3151 strWhere.format("DOCUMENT_GUID not in (select distinct DOCUMENT_GUID from WIZ_DOCUMENT_TAG) and DOCUMENT_LOCATION not like %s",
3152 STR2SQL(m_strDeletedItemsLocation + "%").utf16()
3153 );
3154 }
3155
3156 QString strSQL = formatQuerySQL(TABLE_NAME_WIZ_DOCUMENT, "COUNT(*)", strWhere);
3157
3158 return sqlToSize(strSQL, nSize);
3159}
3160
3161
3162bool WizIndex::getAllTagsDocumentCount(std::map<CString, int>& mapTagDocumentCount)

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected