MCPcopy Create free account
hub / github.com/Kitware/VTK / GetColumnHandleFromName

Method GetColumnHandleFromName

IO/SQL/vtkSQLDatabaseSchema.cxx:434–453  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

432
433//------------------------------------------------------------------------------
434int vtkSQLDatabaseSchema::GetColumnHandleFromName(const char* tblName, const char* colName)
435{
436 int tblHandle = this->GetTableHandleFromName(tblName);
437 if (tblHandle < 0)
438 {
439 return -1;
440 }
441
442 int i;
443 int ncol = static_cast<int>(this->Internals->Tables[tblHandle].Columns.size());
444 std::string colNameStr(colName);
445 for (i = 0; i < ncol; ++i)
446 {
447 if (this->Internals->Tables[tblHandle].Columns[i].Name == colNameStr)
448 {
449 return i;
450 }
451 }
452 return -1;
453}
454
455//------------------------------------------------------------------------------
456const char* vtkSQLDatabaseSchema::GetColumnNameFromHandle(int tblHandle, int colHandle)

Callers 2

AddColumnToIndexFunction · 0.80

Calls 2

sizeMethod · 0.45

Tested by

no test coverage detected