18 lines
557 B
Python
18 lines
557 B
Python
|
#!/usr/bin/env python3
|
||
|
|
||
|
from nxc.nxcdb import DatabaseNavigator, print_help
|
||
|
|
||
|
|
||
|
class navigator(DatabaseNavigator):
|
||
|
def do_clear_database(self, line):
|
||
|
if input("This will destroy all data in the current database, are you SURE you want to run this? (y/n): ") == "y":
|
||
|
self.db.clear_database()
|
||
|
|
||
|
def help_clear_database(self):
|
||
|
help_string = """
|
||
|
clear_database
|
||
|
THIS COMPLETELY DESTROYS ALL DATA IN THE CURRENTLY CONNECTED DATABASE
|
||
|
YOU CANNOT UNDO THIS COMMAND
|
||
|
"""
|
||
|
print_help(help_string)
|