MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / GetColumnIndex

Method GetColumnIndex

Engine/source/sqlite/SQLiteObject.cpp:477–501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

475}
476
477S32 SQLiteObject::GetColumnIndex(S32 iResult, const char* columnName)
478{
479 S32 iIndex;
480 VectorPtr<char*>::iterator i;
481 sqlite_resultset* pResultSet;
482 sqlite_resultrow* pRow;
483
484 pResultSet = GetResultSet(iResult);
485 if (!pResultSet)
486 return 0;
487
488 pRow = pResultSet->vRows[0];
489 if (!pRow)
490 return 0;
491
492 iIndex = 0;
493 for (i = pRow->vColumnNames.begin(); i != pRow->vColumnNames.end(); i++)
494 {
495 if (dStricmp((*i), columnName) == 0)
496 return iIndex + 1;
497 iIndex++;
498 }
499
500 return 0;
501}
502
503S32 SQLiteObject::numResultSets()
504{

Callers 1

SQLiteObject.cppFile · 0.80

Calls 3

dStricmpFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected