config.py 512 B

123456789101112131415161718192021
  1. from typing import Type
  2. from psqlextra.models import PostgresPartitionedModel
  3. from .strategy import PostgresPartitioningStrategy
  4. class PostgresPartitioningConfig:
  5. """Configuration for partitioning a specific model according to the
  6. specified strategy."""
  7. def __init__(
  8. self,
  9. model: Type[PostgresPartitionedModel],
  10. strategy: PostgresPartitioningStrategy,
  11. ) -> None:
  12. self.model = model
  13. self.strategy = strategy
  14. __all__ = ["PostgresPartitioningConfig"]