Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database Modularity #12

Open
ineshbose opened this issue Jul 9, 2020 · 2 comments
Open

Database Modularity #12

ineshbose opened this issue Jul 9, 2020 · 2 comments
Labels
good first issue Good for newcomers

Comments

@ineshbose
Copy link
Owner

The class Database implemented in services.py isn't as modular as it's intended to be.
As of release 1.10.0, this project uses pymongo which is a NoSQL DB that easily stores dictionary / key-values in the database.
However, there may be difficulties to alter the class for say, redis. Therefore, the class needs refactoring.

Each tuple has 3 attributes - _id (primary key), uni_id and uni_pw. However, in-registration users will rather have _id and reg_id.

@ineshbose ineshbose added help wanted Extra attention is needed good first issue Good for newcomers labels Jul 10, 2020
@ineshbose
Copy link
Owner Author

Change primary key for in-registration users to reg_id.
Redis uses hset() for key-value. Using this also may mean to use decode_responses=True.

@ineshbose
Copy link
Owner Author

ineshbose commented Jul 27, 2020

Created a sanitize function for database that would turn dataset into a dictionary and also took advantage of kwargs.

Modularity yet to be tested by shifting to redis.

@ineshbose ineshbose removed the help wanted Extra attention is needed label Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant