Exemple #1
0
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')
Exemple #2
0
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')
Exemple #3
0
def insert(tname):
    data = reader.multiple_input(tname, 'Enter new fields values:')
    model.insert(tname, data)
    show_table_menu(tname, 'Insertion was made successfully')
Exemple #4
0
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)