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

Method GetColumnNameFromHandle

IO/SQL/vtkSQLDatabaseSchema.cxx:456–473  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

454
455//------------------------------------------------------------------------------
456const char* vtkSQLDatabaseSchema::GetColumnNameFromHandle(int tblHandle, int colHandle)
457{
458 if (tblHandle < 0 || tblHandle >= this->GetNumberOfTables())
459 {
460 vtkErrorMacro("Cannot get name of a column in non-existent table " << tblHandle);
461 return nullptr;
462 }
463
464 if (colHandle < 0 ||
465 colHandle >= static_cast<int>(this->Internals->Tables[tblHandle].Columns.size()))
466 {
467 vtkErrorMacro(
468 "Cannot get name of non-existent column " << colHandle << " in table " << tblHandle);
469 return nullptr;
470 }
471
472 return this->Internals->Tables[tblHandle].Columns[colHandle].Name.c_str();
473}
474
475//------------------------------------------------------------------------------
476int vtkSQLDatabaseSchema::GetColumnTypeFromHandle(int tblHandle, int colHandle)

Callers 8

TestMySQLDatabaseFunction · 0.80
TestSQLDatabaseSchemaFunction · 0.80
TestPostgreSQLDatabaseFunction · 0.80

Calls 3

GetNumberOfTablesMethod · 0.95
sizeMethod · 0.45
c_strMethod · 0.45

Tested by 3

TestMySQLDatabaseFunction · 0.64
TestSQLDatabaseSchemaFunction · 0.64
TestPostgreSQLDatabaseFunction · 0.64