Feature Request
Description:
Create a plugin API that allows developers to define their own custom refresh strategies beyond the default REFRESH MATERIALIZED VIEW command.
Use Case:
This would enable support for other database systems (e.g., Redshift, BigQuery) or custom refresh logic (e.g., incremental updates via INSERT/DELETE) by allowing users to extend the gem's functionality.
Proposed Solution:
- Define a base strategy class with a simple interface (e.g., a
refresh method).
- Allow a
MatViewDefinition to specify a custom strategy class.
MatViewRefreshJob would then instantiate and call the specified strategy class instead of its default logic.
RSpec Tests:
- Create a dummy custom refresh strategy class in the test suite.
- Configure a view definition to use this custom strategy.
- Trigger a refresh and verify that the custom strategy's
refresh method was called, not the default one.
Checklist:
Feature Request
Description:
Create a plugin API that allows developers to define their own custom refresh strategies beyond the default
REFRESH MATERIALIZED VIEWcommand.Use Case:
This would enable support for other database systems (e.g., Redshift, BigQuery) or custom refresh logic (e.g., incremental updates via
INSERT/DELETE) by allowing users to extend the gem's functionality.Proposed Solution:
refreshmethod).MatViewDefinitionto specify a custom strategy class.MatViewRefreshJobwould then instantiate and call the specified strategy class instead of its default logic.RSpec Tests:
refreshmethod was called, not the default one.Checklist: