(dbMetadata *model.DatabaseMetadata, resource base.SchemaResource)
| 357 | } |
| 358 | |
| 359 | func resourceExists(dbMetadata *model.DatabaseMetadata, resource base.SchemaResource) bool { |
| 360 | schema := dbMetadata.GetSchemaMetadata(resource.Schema) |
| 361 | if schema == nil { |
| 362 | return false |
| 363 | } |
| 364 | if schema.GetTable(resource.Table) != nil { |
| 365 | return true |
| 366 | } |
| 367 | if schema.GetView(resource.Table) != nil { |
| 368 | return true |
| 369 | } |
| 370 | if schema.GetMaterializedView(resource.Table) != nil { |
| 371 | return true |
| 372 | } |
| 373 | return false |
| 374 | } |
no test coverage detected