(dataValues, fields, Model)
| 221 | |
| 222 | /* Used to map field names in values */ |
| 223 | function mapValueFieldNames(dataValues, fields, Model) { |
| 224 | const values = {}; |
| 225 | |
| 226 | for (const attr of fields) { |
| 227 | if (dataValues[attr] !== undefined && !Model._virtualAttributes.has(attr)) { |
| 228 | // Field name mapping |
| 229 | if (Model.rawAttributes[attr] && Model.rawAttributes[attr].field && Model.rawAttributes[attr].field !== attr) { |
| 230 | values[Model.rawAttributes[attr].field] = dataValues[attr]; |
| 231 | } else { |
| 232 | values[attr] = dataValues[attr]; |
| 233 | } |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | return values; |
| 238 | } |
| 239 | exports.mapValueFieldNames = mapValueFieldNames; |
| 240 | |
| 241 | function isColString(value) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…