MCPcopy Create free account
hub / github.com/ndleah/python-mini-project / run_query

Method run_query

Sqlite-crud/main.py:67–72  ·  view source on GitHub ↗
(self, query, parameters = ())

Source from the content-addressed store, hash-verified

65
66 # Function to Execute Database Querys
67 def run_query(self, query, parameters = ()):
68 with sqlite3.connect(self.db_name) as conn:
69 cursor = conn.cursor()
70 result = cursor.execute(query, parameters)
71 conn.commit()
72 return result
73
74 # Get Products from Database
75 def get_products(self):

Callers 5

exits_db_fileMethod · 0.95
get_productsMethod · 0.95
add_productMethod · 0.95
delete_productMethod · 0.95
edit_recordsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected