Postgresql 是否使用多个Sequelize.fn?

Postgresql 是否使用多个Sequelize.fn?,postgresql,sequelize.js,Postgresql,Sequelize.js,我看到很多例子,例如: Model.findAll({ attributes: [[sequelize.fn('COUNT', sequelize.col('hats')), 'no_hats']] }); 但是假设您需要使用除“COUNT”之外的另一个函数,例如sequelize.fn('LOWERCASE')…或sequelize.fn('UNIQUE')…。是否有一种方法可以一次使用多个sequelize.fn 更新 我正在寻找一种语法,它可以让我在一个findAll()中使用两个函

我看到很多例子,例如:

Model.findAll({
  attributes: [[sequelize.fn('COUNT', sequelize.col('hats')), 'no_hats']]
});
但是假设您需要使用除“COUNT”之外的另一个函数,例如
sequelize.fn('LOWERCASE')…
sequelize.fn('UNIQUE')…
。是否有一种方法可以一次使用多个
sequelize.fn

更新

我正在寻找一种语法,它可以让我在一个
findAll()
中使用两个函数……可能类似于:

Model.findAll({
  attributes: [[sequelize.fn(['LOWERCASE','UNIQUE'], sequelize.col('hats'))]
});

我想你可以这样做

Model.findAll({
   attributes: [
            [sequelize.fn('COUNT', sequelize.col('hats')), 'no_hats'],
            [sequelize.fn('LOWERCASE', sequelize.col('name')), 'name'],
            [Sequelize.literal('COUNT(DISTINCT(hats))'), 'no_hats']
        ]
});

但是,如果我想在同一列上使用,比如说,UNIQUE和小写字母,例如,
Model.findAll({attributes:[[sequelize.fn(['COUNT',UNIQUE],sequelize.col('hats')),'no_hats']});
?对于UNIQUE COUNT,可以像这样使用[[sequelize.literal('COUNT(DISTINCT(hats)),'no_hats']]