Documentation
    Preparing search index...

    Class DialectAwareFnAbstract

    Unlike @sequelize/core!sql.fn, this class does not accept a function name. It must instead be extended by a class that implements the applyForDialect method, in which the function name is provided.

    The goal of this class is to allow dialect-specific functions to be used in a cross-dialect way. For instance, an extension of this class could be used to represent the LOWER function in a cross-dialect way, by generating the correct SQL function name based on which dialect is used.

    Index
    • Parameters

      • ...args: readonly unknown[]

      Returns DialectAwareFn

    "[SQL_IDENTIFIER]": string
    args: readonly unknown[]
    • get asJavaScript(): () => unknown

      This getter is designed to be used as an attribute's default value. This is useful when the SQL version must be bypassed due to a limitation of the dialect that Sequelize cannot detect, such as a missing extension.

      const User = sequelize.define('User', {
      uuid: {
      type: DataTypes.UUID,
      defaultValue: sql.uuidV4.asJavaScript,
      },
      });

      Returns () => unknown

    • get maxArgCount(): number

      Returns number

    • get minArgCount(): number

      Returns number

    • Returns unknown

    • Parameters

      Returns boolean

    • Returns boolean

    • Type Parameters

      Parameters

      • this: Class<M>
      • ...args: readonly unknown[]

      Returns M