MCPcopy Create free account
hub / github.com/Mrinank-Bhowmick/python-beginner-projects / drop

Function drop

projects/CRUD-with-postgresql/main.py:166–177  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

164
165 # Drop the table
166 def drop():
167 console.print(
168 "Are you sure you want to Drop the database? This will delete the whole table"
169 )
170 confirmation = Confirm.ask("Are you sure")
171 if confirmation:
172 cursor.execute("DROP table dbview;")
173 console.print(
174 "Dropped Table dbview: Restart the application to start a new main table"
175 )
176 else:
177 console.print("Skipped the drop operation")
178
179 # Search the table for a entry
180 # We provide a lot of options to search

Callers 1

main.pyFile · 0.85

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected