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

Method GetIndexHandleFromName

IO/SQL/vtkSQLDatabaseSchema.cxx:342–361  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

340
341//------------------------------------------------------------------------------
342int vtkSQLDatabaseSchema::GetIndexHandleFromName(const char* tblName, const char* idxName)
343{
344 int tblHandle = this->GetTableHandleFromName(tblName);
345 if (tblHandle < 0)
346 {
347 return -1;
348 }
349
350 int i;
351 int nidx = static_cast<int>(this->Internals->Tables[tblHandle].Indices.size());
352 std::string idxNameStr(idxName);
353 for (i = 0; i < nidx; ++i)
354 {
355 if (this->Internals->Tables[tblHandle].Indices[i].Name == idxNameStr)
356 {
357 return i;
358 }
359 }
360 return -1;
361}
362
363//------------------------------------------------------------------------------
364const char* vtkSQLDatabaseSchema::GetIndexNameFromHandle(int tblHandle, int idxHandle)

Callers 1

AddColumnToIndexFunction · 0.80

Calls 2

sizeMethod · 0.45

Tested by

no test coverage detected