def __init__(self, conn: DBConnection, table_name: str, primary_key_name: str): self.conn_obj = conn self.conn = conn.get_conn() self.cursor = conn.get_cursor() self.conn.autocommit = True self.table_name = table_name self.primary_key_name = primary_key_name
def __init__( self, conn: DBConnection, table_name: str = TABLE_NAME_ITEMS, column_name: str = PRIMARY_KEY_NAME_ITEMS, ): self.conn_obj = conn self.conn = conn.get_conn() self.cursor = conn.get_cursor() self.table_name = table_name self.col_name_id = column_name
def __init__( self, conn: DBConnection, table_name: str = TABLE_NAME_ITEMS, primary_key_name: str = PRIMARY_KEY_NAME_ITEMS, ): self.conn_obj = conn self.conn = conn.get_conn() self.cursor = conn.get_cursor() self.conn.autocommit = True self.table_name = table_name self.primary_key_name = primary_key_name