Commit 9484100a authored by Stefan Vercillo's avatar Stefan Vercillo
Browse files
parents 6f9f3ca6 2ff1bf06
def courseInfo_attributes():
return []
\ No newline at end of file
......@@ -5,11 +5,13 @@ from utils import *
if __name__ == "__main__":
while True:
command = input("Command: ").split()
command = input("Command: ").split()
if handle_errors(command):
continue
if handle_errors(command):
continue
if command[0] == "exit":
print("exiting...")
break
\ No newline at end of file
if command[0] == "exit":
print("exiting...")
break
\ No newline at end of file
from client_jubs.getattributes import courseInfo_attributes
from parser import *
options = [
"insert-entry",
"modify-table",
"modify-row",
"delete-row",
"get-courses",
"get-assessments",
......@@ -47,22 +48,125 @@ def insert_entry(command):
insert_entry_args = insert_entry_parser.parse_args(command[1:])
# branch based on the table
if insert_entry.table == "studentInfo":
student_id = input("what is the student ID (required): ")
course_id = input("what is the course ID? (not required): ")
if insert_entry_args.table == "courseInfo":
pass
elif insert_entry_args.table == "assessments":
pass
elif insert_entry_args.table == "studentAssessment":
pass
elif insert_entry_args.table == "courseOfferings":
pass
elif insert_entry_args.table == "studentInfo":
student_id = input("student ID (primary key): ")
highest_education = input("highest education: ")
num_prev_attempts = input("")
elif insert_entry_args.table == "region":
pass
elif insert_entry_args.table == "educationLevel":
pass
elif insert_entry_args.table == "vle":
pass
elif insert_entry_args.table == "studentVle":
pass
elif insert_entry_args.table == "studentRegistration":
pass
elif insert_entry_args.table == "studentUnregistration":
pass
def modify_table(command):
modify_table_args = modify_table_parser.parse_args(command[1:])
# branch based on the table
if modify_table_args.table == "courseInfo":
attr = courseInfo_attributes()
course_id = input("course_id (PK): ")
course_code = input("new course_code: ")
course_description = input("new course_description: ")
elif modify_table_args.table == "assessments":
elif modify_table_args.table == "studentAssessment":
pass
elif modify_table_args.table == "courseOfferings":
pass
elif modify_table_args.table == "studentInfo":
student_id = input("student ID (primary key): ")
highest_education = input("highest education: ")
num_prev_attempts = input("")
elif modify_table_args.table == "region":
pass
elif modify_table_args.table == "educationLevel":
pass
elif modify_table_args.table == "vle":
pass
elif modify_table_args.table == "studentVle":
pass
elif modify_table_args.table == "studentRegistration":
pass
elif modify_table_args.table == "studentUnregistration":
pass
def delete_row(command):
delete_row_args = delete_row_parser.parse_args(command[1:])
# branch based on the table
if delete_row_args.table == "courseInfo":
pass
elif delete_row_args.table == "assessments":
pass
elif delete_row_args.table == "studentAssessment":
pass
elif delete_row_args.table == "courseOfferings":
pass
elif delete_row_args.table == "studentInfo":
student_id = input("student ID (primary key): ")
highest_education = input("highest education: ")
num_prev_attempts = input("")
elif delete_row_args.table == "region":
pass
elif delete_row_args.table == "educationLevel":
pass
elif delete_row_args.table == "vle":
pass
elif delete_row_args.table == "studentVle":
pass
elif delete_row_args.table == "studentRegistration":
pass
elif delete_row_args.table == "studentUnregistration":
pass
def get_courses(command):
get_courses_args = get_courses_parser.parse_args(command[1:])
......
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