CulverLab / CulverLab/sparcd-web

Add hash to collections table to minimize updating the DB unnecessarily

Open
#29 0 comments 0 reactions 0 assignees View on GitHub
Database enhancement
Dominant language
Python
Stars
4
Forks
2
PR merge metrics
No merged PRs in 30d

Description

This impacts _sparcd_db.py_ **save_collections** and **get_collections** function, the _create_db.py_ file, and the **collections** table in the DB.

By adding a hash (generated by python) on the JSON stored a comparison could be made before updating the DB to see if a change is really needed.

The **get_collections**() function needs to fetch and store the hash value
The **save_collections**() function will need to:
1. generate a hash value for the JSON
2. compare it to the existing hash value if there is one
3. if the hash value is missing, or is not matching, save the JSON in the DB

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.