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

Method columnExists

src/database/cppsqlite3.cpp:816–828  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

814}
815
816bool CppSQLite3DB::columnExists(const CString& strTable, const CString& strColumn)
817{
818 try
819 {
820 CString strSQL = WizFormatString1("select * from %1 limit 0, 1", strTable);
821 CppSQLite3Query query = execQuery(strSQL);
822 return query.fieldIndex(strColumn) != -1;
823 }
824 catch (const CppSQLite3Exception& )
825 {
826 return false;
827 }
828}
829
830int CppSQLite3DB::execDML(const CString& strSQL)
831{

Callers 1

updateTableStructureMethod · 0.80

Calls 2

WizFormatString1Function · 0.85
fieldIndexMethod · 0.80

Tested by

no test coverage detected