Documentation
    Preparing search index...

    An unlimited length case-insensitive text column. Original case is preserved but acts case-insensitive when comparing values (such as when finding or unique constraints). Only available in Postgres and SQLite.

    Fallback policy:

    • If this DataType is not supported, and no case-insensitive text alternative exists, an error will be raised.
    DataTypes.CITEXT
    

    Hierarchy (View Summary)

    Index
    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

        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

    • Converts a JS value to a value compatible with the connector library for this Data Type. Unlike escape, this value does not need to be escaped. It is passed separately to the database, which will handle escaping.

      Parameters

      • value: string

        The value to convert.

      Returns unknown

    • Checks whether the JS value is compatible with (or can be converted to) the SQL data type. Throws if that is not the case.

      Parameters

      • value: any

      Returns asserts value is string