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

Method GetIndexNameFromHandle

IO/SQL/vtkSQLDatabaseSchema.cxx:364–381  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

362
363//------------------------------------------------------------------------------
364const char* vtkSQLDatabaseSchema::GetIndexNameFromHandle(int tblHandle, int idxHandle)
365{
366 if (tblHandle < 0 || tblHandle >= this->GetNumberOfTables())
367 {
368 vtkErrorMacro("Cannot get name of an index in non-existent table " << tblHandle);
369 return nullptr;
370 }
371
372 if (idxHandle < 0 ||
373 idxHandle >= static_cast<int>(this->Internals->Tables[tblHandle].Indices.size()))
374 {
375 vtkErrorMacro(
376 "Cannot get name of non-existent index " << idxHandle << " in table " << tblHandle);
377 return nullptr;
378 }
379
380 return this->Internals->Tables[tblHandle].Indices[idxHandle].Name.c_str();
381}
382
383//------------------------------------------------------------------------------
384int vtkSQLDatabaseSchema::GetIndexTypeFromHandle(int tblHandle, int idxHandle)

Callers 4

GetIndexSpecificationMethod · 0.80
GetIndexSpecificationMethod · 0.80
GetIndexSpecificationMethod · 0.80
TestSQLDatabaseSchemaFunction · 0.80

Calls 3

GetNumberOfTablesMethod · 0.95
sizeMethod · 0.45
c_strMethod · 0.45

Tested by 1

TestSQLDatabaseSchemaFunction · 0.64