Documentation
    Preparing search index...

    Interface FormatWhereOptions

    interface FormatWhereOptions {
        bindParam?: (value: unknown) => string;
        mainAlias?: string;
        model?: ModelDefinition<Model<any, any>> | ModelStatic | null;
        parameterStyle?: "BIND" | "REPLACEMENT" | ParameterStyle;
        replacements?: BindOrReplacements;
    }

    Hierarchy (View Summary)

    Index
    bindParam?: (value: unknown) => string
    mainAlias?: string

    The alias of the main table corresponding to FormatWhereOptions.model. Used as the prefix for attributes that do not reference an association, e.g.

    const where = { name: 'foo' };
    

    will produce

    WHERE "<mainAlias>"."name" = 'foo'
    
    model?: ModelDefinition<Model<any, any>> | ModelStatic | null

    The model of the main alias. Used to determine the type & column name of attributes referenced in the where clause.

    parameterStyle?: "BIND" | "REPLACEMENT" | ParameterStyle

    The style of parameter to use.

    replacements?: BindOrReplacements

    These are used to inline replacements into the query, when one is found inside of a @sequelize/core!sql.literal.