def update(tname): condition = reader.single_input(tname, 'Enter requirement of row to be changed:') query = reader.multiple_input(tname, 'Enter new fields values:') model.update(tname, condition, query) show_table_menu(tname, 'Update was made successfully')
def delete(tname): query = reader.multiple_input(tname, 'Enter requirement of row to be deleted:') model.delete(tname, query) show_table_menu(tname, 'Deletion was made successfully')
def insert(tname): data = reader.multiple_input(tname, 'Enter new fields values:') model.insert(tname, data) show_table_menu(tname, 'Insertion was made successfully')
def get(tname): query = reader.multiple_input(tname, 'Enter requested fields:', empty=True) data = model.get(tname, query) view.print_entities(tname, data) reader.press_enter() show_table_menu(tname)