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

Method exits_db_file

Sqlite-crud/main.py:56–64  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

54 # Function to verify if already exist the table in database
55 # Else create the table
56 def exits_db_file(self):
57 if not Path(self.db_name).exists():
58 sql ='''CREATE TABLE product(
59 id INTEGER PRIMARY KEY,
60 name CHAR(60) NOT NULL,
61 price FLOAT
62 )'''
63
64 self.run_query(sql)
65
66 # Function to Execute Database Querys
67 def run_query(self, query, parameters = ()):

Callers 1

__init__Method · 0.95

Calls 1

run_queryMethod · 0.95

Tested by

no test coverage detected