------------------------------------------------------------------------------
| 235 | |
| 236 | //------------------------------------------------------------------------------ |
| 237 | int vtkSQLDatabaseSchema::AddOptionToTable( |
| 238 | int tblHandle, const char* optText, const char* optBackend) |
| 239 | { |
| 240 | if (!optText) |
| 241 | { |
| 242 | vtkErrorMacro("Cannot add nullptr option to table " << tblHandle); |
| 243 | return -1; |
| 244 | } |
| 245 | |
| 246 | if (tblHandle < 0 || tblHandle >= this->GetNumberOfTables()) |
| 247 | { |
| 248 | vtkErrorMacro("Cannot add option to non-existent table " << tblHandle); |
| 249 | return -1; |
| 250 | } |
| 251 | |
| 252 | int optHandle = static_cast<int>(this->Internals->Tables[tblHandle].Options.size()); |
| 253 | this->Internals->Tables[tblHandle].Options.resize(optHandle + 1); |
| 254 | vtkSQLDatabaseSchemaInternals::Option* optn = |
| 255 | &this->Internals->Tables[tblHandle].Options[optHandle]; |
| 256 | optn->Text = optText; |
| 257 | optn->Backend = optBackend ? optBackend : VTK_SQL_ALLBACKENDS; |
| 258 | return optHandle; |
| 259 | } |
| 260 | |
| 261 | //------------------------------------------------------------------------------ |
| 262 | int vtkSQLDatabaseSchema::GetPreambleHandleFromName(const char* preName) |
no test coverage detected