adTensorFromDb(db, id) {
        return new Promise((resolve, reject) => {
            if (db == null) {
                resolve(null);
            }
            
            const transaction = db.transaction(['tensors'], 'readonly');
            const store = transaction.objectStore('tensors');
            const request = store.get(id);

            transaction.onabort = (event) => {
                console.log("Transaction error while reading tensor: " + event.target.error);
                resolve(null)