------------------------------------------------------------------------------
| 454 | |
| 455 | //------------------------------------------------------------------------------ |
| 456 | const 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 | //------------------------------------------------------------------------------ |
| 476 | int vtkSQLDatabaseSchema::GetColumnTypeFromHandle(int tblHandle, int colHandle) |