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

Method fieldIndex

src/database/cppsqlite3.cpp:417–435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

415}
416
417int CppSQLite3Query::fieldIndex(const CString& szField)
418{
419 checkVM();
420
421 if (szField)
422 {
423 for (int nField = 0; nField < mnCols; nField++)
424 {
425 const char* szTemp = sqlite3_column_name(mpVM, nField);
426
427 if (szField.compareNoCase(szTemp) == 0)
428 {
429 return nField;
430 }
431 }
432 }
433
434 throw CppSQLite3Exception(CPPSQLITE_ERROR, "Invalid field name requested");
435}
436
437
438CString CppSQLite3Query::fieldName(int nCol)

Callers 1

columnExistsMethod · 0.80

Calls 2

CppSQLite3ExceptionClass · 0.85
compareNoCaseMethod · 0.80

Tested by

no test coverage detected