# Imports
import sqlite3

# Database class
class Database:
    def __init__(self, db_name='db.sqlite'):
        self.connection = sqlite3.connect(db_name, check_same_thread=False)
        self.cursor = self.connection.cursor()

    def execute(self, query, params=None):
        if params is None:
            params = []
        self.cursor.execute(query, params)
        self.connection.commit()
        return self.cursor
    
    def close(self):
        self.connection.close()