-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #149: PostgresRangePartitioningStrategy should derive from Postgr…
…esPartitioningStrategy
- Loading branch information
Showing
1 changed file
with
2 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |