Commit b0c2a642 authored by Stefan Vercillo's avatar Stefan Vercillo
Browse files

gitignore

parent 2c837088
DB_USER=snvercil
DB_PASSWORD=pass
DB_HOST=127.0.0.1
DB_NAME=education
import argparse
import sys
sys.path.insert(0, "..") # import parent folde
from controller import Controller
from error_handler import ErrorHandler
class CliTool:
actions = ["get", 'modify', "insert", "delete"]
def __init__(self) -> None:
self.controller = Controller()
self.__parser__init__()
def __parser__init__(self):
self.parser = argparse.ArgumentParser(description="Process some integers.")
self.parser.add_argument(
"action", help="select an action item from [get, modify, insert, delete]"
)
self.parser.add_argument(
"--relation",
choices=self.controller.relations_list(),
help=f"specify the table to perform action on",
required=True,
)
args = self.parser.parse_args()
print(args)
def run(self):
while True:
self.process_line()
def process_line(self):
line = input()
print("Starting CLI .... ")
CliTool().run()
......@@ -140,7 +140,7 @@ def delete_base_func(command):
handle_filtering_on_table(
attributes=get_attributes_from_tablename[delete_rows_args.table],
filters=filters
)
) == -1: return
conditions = []
for f in filters:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment