A default unique universal identifier generated following the UUID v1 standard. Cannot be used as a type, must be used as a default value instead.

Deprecated

use DataTypes.UUID.V1 (data type) & sql.uuidV1 (default value) instead

Hierarchy (view full)

Constructors

Properties

#dialect: undefined | AbstractDialect
usageContext: undefined | DataTypeUseContext

Where this DataType is being used.

Methods

  • This method is called when AbstractQueryGenerator needs to add a bind parameter to a query it is building. This method allows for customizing both the SQL to add to the query, and convert the bind parameter value to a DB-compatible value.

    If you only need to prepare the bind param value, implement toBindableValue instead.

    This method must return the SQL to add to the query. You can obtain a bind parameter ID by calling BindParamOptions#bindParam with the value associated to that bind parameter.

    An example of a data type that requires customizing the SQL is the GEOMETRY data type.

    Parameters

    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

Generated using TypeDoc