Documentation
    Preparing search index...

    Binary storage. BLOB is the "TEXT" of binary data: it allows data of arbitrary size.

    Fallback policy: If this type is not supported, an error will be raised.

    const User = sequelize.define('User', {
    profilePicture: {
    type: DataTypes.BLOB,
    },
    });

    Hierarchy (View Summary)

    Index
    options: BlobOptions
    usageContext: DataTypeUseContext | undefined

    Where this DataType is being used.

    • Escapes a value for the purposes of inlining it in a SQL query. The resulting value will be inlined as-is with no further escaping.

      Parameters

      • value: string | Buffer<ArrayBufferLike>

        The value to escape.

      Returns string

    • Called when a value is retrieved from the Database, and its DataType is specified. Used to normalize values from the database.

      Note: It is also possible to do an initial parsing of a Database value using AbstractDialect#registerDataTypeParser. That normalization uses the type ID from the database instead of a Sequelize Data Type to determine which parser to use, and is called before this method.

      Parameters

      • value: unknown

        The value to parse.

      Returns unknown