# Copyright (C) 2026 BoundWare LLC. All rights reserved.
# SnacTrac is licensed under the Apache License, Version 2.0
# See Licenses/LICENSE.txt for details.


import sqlite3


# Set database table entry value.
def set_value_table(table, column, identifier, property, value):

    conn = sqlite3.connect("Data/Database.db")

    cur = conn.cursor()

    cur.execute(
        f'UPDATE {table} SET "{property}" = ? WHERE "{column}" = ?', (value, identifier)
    )

    conn.commit()

    cur.close()

    conn.close()
