from typing import Any

from scyllapy._internal import (
    Consistency,
    InlineBatch,
    QueryResult,
    Scylla,
    SerialConsistency,
)

class Select:
    def __init__(self, table: str) -> None: ...
    def only(self, *columns: str) -> Select: ...
    def where(self, clause: str, params: list[Any] | None = None) -> Select: ...
    def group_by(self, group: str) -> Select: ...
    def order_by(self, order: str, desc: bool = False) -> Select: ...
    def per_partition_limit(self, per_partition_limit: int) -> Select: ...
    def limit(self, limit: int) -> Select: ...
    def allow_filtering(self) -> Select: ...
    def distinct(self) -> Select: ...
    def timeout(self, timeout: int | str) -> Select: ...
    def request_params(
        self,
        consistency: Consistency | None = None,
        serial_consistency: SerialConsistency | None = None,
        request_timeout: int | None = None,
        timestamp: int | None = None,
        is_idempotent: bool | None = None,
        tracing: bool | None = None,
    ) -> Select: ...
    def add_to_batch(self, batch: InlineBatch) -> None: ...
    async def execute(self, scylla: Scylla) -> QueryResult: ...

class Insert:
    def __init__(self, table: str) -> None: ...
    def if_not_exists(self) -> Insert: ...
    def set(self, name: str, value: Any) -> Insert: ...
    def timeout(self, timeout: int | str) -> Insert: ...
    def timestamp(self, timestamp: int) -> Insert: ...
    def ttl(self, ttl: int) -> Insert: ...
    def request_params(
        self,
        consistency: Consistency | None = None,
        serial_consistency: SerialConsistency | None = None,
        request_timeout: int | None = None,
        timestamp: int | None = None,
        is_idempotent: bool | None = None,
        tracing: bool | None = None,
    ) -> Insert: ...
    def add_to_batch(self, batch: InlineBatch) -> None: ...
    async def execute(self, scylla: Scylla) -> QueryResult: ...

class Delete:
    def __init__(self, table: str) -> None: ...
    def cols(self, *cols: str) -> Delete: ...
    def where(self, clause: str, values: list[Any] | None = None) -> Delete: ...
    def timeout(self, timeout: int | str) -> Delete: ...
    def timestamp(self, timestamp: int) -> Delete: ...
    def if_exists(self) -> Delete: ...
    def if_(self, clause: str, values: list[Any] | None = None) -> Delete: ...
    def request_params(
        self,
        consistency: Consistency | None = None,
        serial_consistency: SerialConsistency | None = None,
        request_timeout: int | None = None,
        timestamp: int | None = None,
        is_idempotent: bool | None = None,
        tracing: bool | None = None,
    ) -> Delete: ...
    def add_to_batch(self, batch: InlineBatch) -> None: ...
    async def execute(self, scylla: Scylla) -> QueryResult: ...

class Update:
    def __init__(self, table: str) -> None: ...
    def set(self, name: str, value: Any) -> Update: ...
    def inc(self, column: str, value: Any) -> Update: ...
    def dec(self, column: str, value: Any) -> Update: ...
    def where(self, clause: str, values: list[Any] | None = None) -> Update: ...
    def timeout(self, timeout: int | str) -> Update: ...
    def timestamp(self, timestamp: int) -> Update: ...
    def ttl(self, ttl: int) -> Update: ...
    def request_params(
        self,
        consistency: Consistency | None = None,
        serial_consistency: SerialConsistency | None = None,
        request_timeout: int | None = None,
        timestamp: int | None = None,
        is_idempotent: bool | None = None,
        tracing: bool | None = None,
    ) -> Update: ...
    def if_exists(self) -> Update: ...
    def if_(self, clause: str, values: list[Any] | None = None) -> Update: ...
    def add_to_batch(self, batch: InlineBatch) -> None: ...
    async def execute(self, scylla: Scylla) -> QueryResult: ...
