SpiderNitt/Document-Request-Portal

A wrapper for database field retreival out of the sequelize object

Offen

#11 geöffnet am 26.09.2020

 (0 Kommentare) (0 Reaktionen) (1 zugewiesene Person)JavaScript (3 Forks)auto 404
backendenhancementgood first issue

Repository-Metriken

Stars
 (2 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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.

Contributor Guide