Skip to content

Commit

Permalink
Fix #149: PostgresRangePartitioningStrategy should derive from Postgr…
Browse files Browse the repository at this point in the history
…esPartitioningStrategy
  • Loading branch information
Photonios committed Nov 4, 2021
1 parent 1f7701b commit 98b9e32
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions psqlextra/partitioning/range_strategy.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,10 @@
from abc import abstractmethod
from typing import Generator

from .range_partition import PostgresRangePartition
from .strategy import PostgresPartitioningStrategy


class PostgresRangePartitioningStrategy:
class PostgresRangePartitioningStrategy(PostgresPartitioningStrategy):
"""Base class for implementing a partitioning strategy for a range
partitioned table."""

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

@abstractmethod
def to_delete(
self,
) -> Generator[PostgresRangePartition, None, None]:
"""Generates a list of partitions to be deleted."""


__all__ = ["PostgresRangePartitioningStrategy"]

0 comments on commit 98b9e32

Please sign in to comment.