Class: MatViews::Services::CheckMatviewExists
- Inherits:
-
BaseService
- Object
- BaseService
- MatViews::Services::CheckMatviewExists
- Defined in:
- lib/mat_views/services/check_matview_exists.rb
Overview
MatViews::Services::CheckMatviewExists
Service object that checks whether the underlying PostgreSQL **materialised view** for a given MatViewDefinition currently exists.
### Contract
-
Inherits from BaseService.
-
Uses BaseService helpers such as ‘definition`, `view_exists?`, `ok`, `raise_err`, and the `request`/`response` accessors.
-
The public entrypoint is ‘#call` (defined in BaseService), which will call the private lifecycle hooks here: #prepare, #assign_request, and #_run.
### Result
-
On success: status ‘:ok`, with `response: { exists: true|false }`.
-
On validation failure (bad view name): raises via BaseService#raise_err.
Constant Summary
Constants inherited from BaseService
BaseService::ALLOWED_ROW_STRATEGIES, BaseService::DEFAULT_NIL_STRATEGY, BaseService::DEFAULT_ROW_STRATEGY, BaseService::UNKNOWN_ROW_COUNT
Instance Attribute Summary
Attributes inherited from BaseService
#definition, #request, #response, #row_count_strategy, #use_transaction
Method Summary
Methods inherited from BaseService
Constructor Details
This class inherits a constructor from MatViews::Services::BaseService