# 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


# Return all data from a database table.
def get_data_table(table):

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

    cur = conn.cursor()

    cur.execute(f"SELECT * FROM {table}")

    data_table = [list(row) for row in cur.fetchall()]

    cur.close()

    conn.close()

    return data_table
