from ....types.he import He
from .. import Database


class Connection(He):
    @property
    def __u__(self)-> Database: ...

    def is_connected(self, recheck: bool = False)-> bool: ...
    @property
    def queried_sqls(self)-> list[str]: ...
    @property
    def last_queried_sql(self)-> str | None: ...
    @property
    def queried_times(self)-> int: ...

    def query(self, sql: str): ...

    def search_tables(self, keyword: str = None, startwith: bool = None, endwith: bool = None)-> list[str]: ...

    def is_table_exists(self, table: str)-> bool: ...

    def create_table(self, table)-> bool: ...
    def delete_table(self, table)-> bool: ...
    def update_table_auto_increment(self, table, start=0)-> bool: ...

    def search_table_column_structures(self, table: str, keyword: str = None, startwith: bool = None, endwith: bool = None)-> list[dict]: ...
    def search_table_columns(self, table: str, keyword: str = None, startwith: bool = None, endwith: bool = None)-> list[str]: ...
    def create_table_column(self, table: str, column: str, datatype: str = None, length: int = 0, unique: bool = False, nullable: bool = False)-> bool: ...
    def set_table_column_quniue(self, table: str, column: str)-> bool: ...

    def search_table_data_multiple(self, sql: str)-> list[dict]: ...
