Documentation
    Preparing search index...

    Function fn

    • Creates an 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/core!sql.attribute (recommended), @sequelize/core!sql.identifier, or @sequelize/core!sql.col (discouraged) otherwise the value will be interpreted as a string.

      ℹ️ This method is usually verbose and we recommend using the @sequelize/core!sql template string tag instead.

      Parameters

      • fnName: string

        The SQL function you want to call

      • ...args: readonly unknown[]

        All further arguments will be passed as arguments to the function

      Returns Fn

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