from ..ncommon.nout import *
from .dstatus import *
import pymysql
from dataclasses import dataclass

@dataclass
class n_mysql:
    host = ...
    port = ...
    user = ...
    password = ...
    charset = ...
    connection: pymysql.connections.Connection | None = ...
    def __init__(self, host: str | None = None, port: int | None = None, user: str | None = None, password: str | None = None, charset: str = 'utf8') -> None: ...
    @classmethod
    def getInstance(cls, connect: pymysql.connections.Connection | None = None, *, host: str = None, port: int = None, user: str = None, password: str = None, charset: str = 'utf8') -> n_mysql | None: ...
    def connect_mysql_server(self, commit_status: Commit_Status = ...): ...
    def setup(self, db_name: str, is_start_transaction: bool = False) -> None: ...
    def connect_database(self, db_name: str) -> None: ...
    def disconnect_mysql_server(self) -> None: ...
    def excuse_command(self, cmd: str) -> None: ...
    @property
    def Commit_status(self) -> Commit_Status: ...
    def data_to_list(self, data: str) -> list[str]: ...
    def data_to_list2(self, data: str) -> list[str]: ...
    def set_Commit_Status(self, Commit_status) -> None: ...
    def startTransAction(self) -> None: ...
    def Commit(self) -> None: ...
    def rollback(self) -> None: ...
    def execute_sql_language(self, sql_language: str) -> tuple[tuple[any, ...], ...]: ...
    @property
    def connect_status(self) -> Sql_Status: ...
    def is_database_exists(self, database_name: str) -> bool: ...
    def create_database(self, database_name: str) -> None: ...
    def is_has_Table(self, tb_name: str) -> bool: ...
    def showTables(self) -> list[str]: ...
    def is_has_View(self, view_name: str) -> bool: ...
    def __del__(self) -> None: ...
