Exemple #1
0
def update(table):
    condition = view.single_input(
        table, 'Enter requirement of row to be changed:')
    query = view.multiple_input(table, 'Enter new fields values:')

    model.update(table, condition, query)
    display_secondary_menu(table, 'Update was made successfully')
Exemple #2
0
def delete(table):
    query = view.multiple_input(
        table, 'Enter requirement of row to be deleted:')

    model.delete(table, query)
    display_secondary_menu(table, 'Deletion was made successfully')
Exemple #3
0
def insert(table):
    data = view.multiple_input(table, 'Enter new fields values:')
    model.insert(table, data)
    display_secondary_menu(table, 'Insertion was made successfully')
Exemple #4
0
def select(table):
    query = view.multiple_input(table, 'Enter requested fields:')
    data = model.get(table, query)
    view.print_entities(table, data)
    view.press_enter()
    display_secondary_menu(table)