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

Method GetIndexTypeFromHandle

IO/SQL/vtkSQLDatabaseSchema.cxx:384–401  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

382
383//------------------------------------------------------------------------------
384int vtkSQLDatabaseSchema::GetIndexTypeFromHandle(int tblHandle, int idxHandle)
385{
386 if (tblHandle < 0 || tblHandle >= this->GetNumberOfTables())
387 {
388 vtkErrorMacro("Cannot get type of an index in non-existent table " << tblHandle);
389 return -1;
390 }
391
392 if (idxHandle < 0 ||
393 idxHandle >= static_cast<int>(this->Internals->Tables[tblHandle].Indices.size()))
394 {
395 vtkErrorMacro(
396 "Cannot get type of non-existent index " << idxHandle << " in table " << tblHandle);
397 return -1;
398 }
399
400 return static_cast<int>(this->Internals->Tables[tblHandle].Indices[idxHandle].Type);
401}
402
403//------------------------------------------------------------------------------
404const char* vtkSQLDatabaseSchema::GetIndexColumnNameFromHandle(

Callers 4

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

Calls 2

GetNumberOfTablesMethod · 0.95
sizeMethod · 0.45

Tested by 1

TestSQLDatabaseSchemaFunction · 0.64