Beispiel #1
0
def delete_todo(id):
    delete_id = lib.delete_todo_by_id(id)
    logger.debug(
        "Requested operation to delete the data successfully accomplished")
    return jsonify(id="data successfully deleted")
Beispiel #2
0
def delete_todo(id):
    logger.debug("Run invoked to delete data for certain id from the database")
    delete_id = lib.delete_todo_by_id(id)
    logger.debug(
        "Requested operation to delete the data successfully accomplished")
    return jsonify(id="Data successfully deleted")
Beispiel #3
0
import lib

chairs = "italian"
tables = "french"

designated_id = lib.insert_furniture(chairs, tables)
print(designated_id)

everything_data = lib.get_everything()
print(everything_data)

identification = lib.get_furniture_by_id(designated_id)
print(identification)

# updated = lib.update_todo_by_id(designated_id, "Spanish", "Russian")
# print(updated)

response = lib.delete_todo_by_id(designated_id - 1)
print(response)
Beispiel #4
0
import lib

lib.init_db()

new_id = lib.insert_todo("elephant")
print(new_id)

all_data = lib.get_all()
print(all_data)

new_id_data = lib.get_todo_by_id(new_id)
print(new_id)

updated = lib.update_todo_by_id(new_id, "monkey", 100)
print(updated)

delete_previousid = lib.delete_todo_by_id(new_id - 1)
print(delete_previousid)
Beispiel #5
0
import lib

new_id = lib.insert_todo("jopa")
print(new_id)

# all_data = lib.get_all()
# print(all_data)

# one = lib.get_todo_by_id(new_id)
# print(one)

updated = lib.update_todo_by_id(new_id, "FFF", 1)
print(updated)

delete_id = lib.delete_todo_by_id(new_id - 1)
print(delete_id)