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

A wrapper for database field retreival out of the sequelize object #11

Open
gigatesseract opened this issue Sep 26, 2020 · 0 comments
Open
Assignees
Labels
backend Fixes apply to the backend branch enhancement New feature or request good first issue Good for newcomers

Comments

@gigatesseract
Copy link
Member

gigatesseract commented Sep 26, 2020

Is your feature request related to a problem? Please describe.
After getting the row object from sequelize, it is painful to type row.getDataValue('') everytime. Have a wrapper instead of that.

Describe the solution you'd like

const row = await database.Certificate.findOne({.....})
{applier_roll, name, type, status} = your_custom_wrapper(row)

Have any number of row.getDataValue inside your custom wrapper. It should return an object with the fields expected.

@gigatesseract gigatesseract added enhancement New feature or request good first issue Good for newcomers backend Fixes apply to the backend branch labels Sep 26, 2020
@gigatesseract gigatesseract linked a pull request Oct 2, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Fixes apply to the backend branch enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants