# Path: psqlextra/partitioning/partition.py
# class PostgresPartition:
#     """Base class for a PostgreSQL table partition."""
# 
#     @abstractmethod
#     def name(self) -> str:
#         """Generates/computes the name for this partition."""
# 
#     @abstractmethod
#     def create(
#         self,
#         model: PostgresPartitionedModel,
#         schema_editor: PostgresSchemaEditor,
#         comment: Optional[str] = None,
#     ) -> None:
#         """Creates this partition in the database."""
# 
#     @abstractmethod
#     def delete(
#         self,
#         model: PostgresPartitionedModel,
#         schema_editor: PostgresSchemaEditor,
#     ) -> None:
#         """Deletes this partition from the database."""
# 
#     def deconstruct(self) -> dict:
#         """Deconstructs this partition into a dict of attributes/fields."""
# 
#         return {"name": self.name()}


from abc import abstractmethod
from typing import Generator
from .partition import PostgresPartition



class PostgresPartitioningStrategy:
    """Base class for implementing a partitioning strategy for a partitioned
    table."""

    @abstractmethod
    def to_create(
        self,
    ) -> Generator[PostgresPartition, None, None]:
        """Generates a list of partitions to be created."""

    @abstractmethod
    def to_delete(
        self,

# Path: psqlextra/partitioning/partition.py
# class PostgresPartition:
#     """Base class for a PostgreSQL table partition."""
# 
#     @abstractmethod
#     def name(self) -> str:
#         """Generates/computes the name for this partition."""
# 
#     @abstractmethod
#     def create(
#         self,
#         model: PostgresPartitionedModel,
#         schema_editor: PostgresSchemaEditor,
#         comment: Optional[str] = None,
#     ) -> None:
#         """Creates this partition in the database."""
# 
#     @abstractmethod
#     def delete(
#         self,
#         model: PostgresPartitionedModel,
#         schema_editor: PostgresSchemaEditor,
#     ) -> None:
#         """Deletes this partition from the database."""
# 
#     def deconstruct(self) -> dict:
#         """Deconstructs this partition into a dict of attributes/fields."""
# 
#         return {"name": self.name()}


# Path: psqlextra/partitioning/strategy.py
from abc import abstractmethod
from typing import Generator
from .partition import PostgresPartition




class PostgresPartitioningStrategy:
    """Base class for implementing a partitioning strategy for a partitioned
    table."""

    @abstractmethod
    def to_create(
        self,
    ) -> Generator[PostgresPartition, None, None]:
        """Generates a list of partitions to be created."""

    @abstractmethod
    def to_delete(
        self,

    ) -> Generator[PostgresPartition, None, None]: