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

Function FileTypeArrayToSQL

src/database/WizIndex.cpp:2401–2427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2399}
2400
2401CString FileTypeArrayToSQL(const CWizStdStringArray& arrayFileType)
2402{
2403 CWizStdStringArray arrayWhere;
2404 //
2405 for (CWizStdStringArray::const_iterator it = arrayFileType.begin();
2406 it != arrayFileType.end();
2407 it++)
2408 {
2409 CString strWhere = WizFormatString1("DOCUMENT_FILE_TYPE like %1", STR2SQL_LIKE_BOTH(*it));
2410 arrayWhere.push_back(strWhere);
2411 }
2412 //
2413 if (arrayWhere.empty())
2414 return CString();
2415 //
2416 if (arrayWhere.size() == 1)
2417 {
2418 return arrayWhere[0];
2419 }
2420 else
2421 {
2422 CString strWhere;
2423 ::WizStringArrayToText(arrayWhere, strWhere, " or ");
2424 strWhere = WizFormatString1("( %1 )", strWhere);
2425 return strWhere;
2426 }
2427}
2428
2429CString LocationToSQL(const CString& strLocation, bool bIncludeSubFolders)
2430{

Callers 2

TitleToSQLFunction · 0.85
searchMethod · 0.85

Calls 7

WizFormatString1Function · 0.85
WizStringArrayToTextFunction · 0.85
beginMethod · 0.80
endMethod · 0.80
sizeMethod · 0.80
CStringClass · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected