"""PostgreSQL storage implementation (optional). Requires asyncpg."""
from __future__ import annotations

from typing import Optional

from .base import BaseStorage


class PostgresStorage(BaseStorage):
    """PostgreSQL storage — stub for future implementation.

    Install with: pip install mcp-youtube-intelligence[postgres]
    """

    def __init__(self, dsn: str):
        self.dsn = dsn
        raise NotImplementedError(
            "PostgreSQL storage is not yet implemented. Use SQLite (default) for now."
        )

    async def initialize(self) -> None: ...
    async def close(self) -> None: ...
    async def get_video(self, video_id: str) -> Optional[dict]: ...
    async def upsert_video(self, data: dict) -> None: ...
    async def search_transcripts(self, query: str, limit: int = 10) -> list[dict]: ...
    async def get_channel(self, channel_id: str) -> Optional[dict]: ...
    async def upsert_channel(self, data: dict) -> None: ...
    async def list_channels(self) -> list[dict]: ...
    async def update_channel_checked(self, channel_id: str) -> None: ...
    async def save_comments(self, video_id: str, comments: list[dict]) -> None: ...
    async def get_comments(self, video_id: str, limit: int = 20) -> list[dict]: ...
