Documentation
    Preparing search index...

    Class Db2QueryGenerator

    Temporary class to ease the TypeScript migration

    Hierarchy (View Summary)

    Index
    • get sequelize(): Sequelize<Dialect>

      Returns Sequelize<Dialect>

    • Parameters

      • database: string

      Returns string

    • Escapes a value (e.g. a string, number or date) as an SQL value (as opposed to an identifier).

      Parameters

      • value: unknown

        The value to escape

      • Optionaloptions: EscapeOptions

        The options to use when escaping the value

      Returns string

    • Escapes an array of values (e.g. strings, numbers or dates) as an SQL List of values.

      Parameters

      • values: unknown[]

        The list of values to escape

      • Optionaloptions: EscapeOptions

      Returns string

      const values = [1, 2, 3];
      queryGenerator.escapeList([1, 2, 3]);
    • The goal of this method is to execute the equivalent of json_unquote for the current dialect.

      Parameters

      Returns string

    • Generates an SQL query that returns all foreign keys of a table or the foreign key constraint of a given column.

      Parameters

      • _tableName: TableOrModel

        The table or associated model.

      • Optional_columnName: string

        The name of the column. Not supported by SQLite.

      Returns Error

      The generated SQL query.

      Use showConstraintsQuery instead.

    • Parameters

      • _sqlExpression: string

        ⚠️ This is not an identifier, it's a raw SQL expression. It will be inlined in the query.

      • _path: readonly (string | number)[]

        The JSON path, where each item is one level of the path

      • _unquote: boolean

        Whether the result should be unquoted (depending on dialect: ->> and #>> operators, json_unquote function). Defaults to false.

      Returns string

    • Adds quotes to identifier

      Parameters

      • identifier: string
      • Optional_force: boolean

      Returns string

    • Returns a query that rollbacks a savepoint.

      Parameters

      • savepointName: string

      Returns string