------------------------------------------------------------------------------
| 208 | |
| 209 | //------------------------------------------------------------------------------ |
| 210 | int vtkSQLDatabaseSchema::AddTriggerToTable( |
| 211 | int tblHandle, int trgType, const char* trgName, const char* trgAction, const char* trgBackend) |
| 212 | { |
| 213 | if (!trgName) |
| 214 | { |
| 215 | vtkErrorMacro("Cannot add trigger with empty name to table " << tblHandle); |
| 216 | return -1; |
| 217 | } |
| 218 | |
| 219 | if (tblHandle < 0 || tblHandle >= this->GetNumberOfTables()) |
| 220 | { |
| 221 | vtkErrorMacro("Cannot add trigger to non-existent table " << tblHandle); |
| 222 | return -1; |
| 223 | } |
| 224 | |
| 225 | int trgHandle = static_cast<int>(this->Internals->Tables[tblHandle].Triggers.size()); |
| 226 | this->Internals->Tables[tblHandle].Triggers.resize(trgHandle + 1); |
| 227 | vtkSQLDatabaseSchemaInternals::Trigger* trigger = |
| 228 | &this->Internals->Tables[tblHandle].Triggers[trgHandle]; |
| 229 | trigger->Type = static_cast<DatabaseTriggerType>(trgType); |
| 230 | trigger->Name = trgName; |
| 231 | trigger->Action = trgAction; |
| 232 | trigger->Backend = trgBackend; |
| 233 | return trgHandle; |
| 234 | } |
| 235 | |
| 236 | //------------------------------------------------------------------------------ |
| 237 | int vtkSQLDatabaseSchema::AddOptionToTable( |
no test coverage detected