Function fn

  • Creates a object representing a database function. This can be used in search queries, both in where and order parts, and as default values in column definitions. If you want to refer to columns in your function, you should use sequelize.col, so that the columns are properly interpreted as columns and not a strings.

    Convert a user's username to upper case

    instance.update({
    username: self.sequelize.fn('upper', self.sequelize.col('username'))
    })

    Parameters

    • sqlFunction: string

      The function you want to call

    • Rest ...args: any

      All further arguments will be passed as arguments to the function

    Returns Fn

Generated using TypeDoc