You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've completely dropped the previous RFC. See edits if you're interested in its history.
Here is the new draft:
Sequelize.attr
Like Sequelize.col but where Sequelize.col is used to reference a column name, Sequelize.attr is used to reference an attribute name.
Because sometimes you need to be able to reference another attribute, and having to specify that other attribute's column name instead is inconsistent as column names are abstracted away almost everywhere else.
// instead of having to writeUser.findOne({where: {birthDate: {[Op.gt]: Sequelize.col('register_date')},},})// you'd writeUser.findOne({where: {birthDate: {[Op.gt]: Sequelize.attr('registerDate')},},})
Sequelize.attr would follow the same syntax as plain attribute references. Meaning it would support:
Activity
ephys commentedon Dec 15, 2021
fzn0x commentedon Dec 15, 2021
ephys commentedon Dec 15, 2021
fzn0x commentedon Dec 15, 2021
[-]RFC: [V7] Changes to `Sequelize.col`[/-][+][RFC] Add `Sequelize.attr`, `Model.attr`[/+]ephys commentedon Dec 23, 2021
[-][RFC] Add `Sequelize.attr`, `Model.attr`[/-][+][RFC] Add `Sequelize.attr`[/+][-][RFC] Add `Sequelize.attr`[/-][+]Add `Sequelize.attr`[/+]