Functions after @frappe.whitelist()

Suggetion,

Frappe provides Database connection no need to create new connect. Use frappe.db.sql(yout_query)

which js method calling edit_table?