Documentation
    Preparing search index...

    Class MariaDbQueryGenerator

    Temporary class to ease the TypeScript migration

    Hierarchy (View Summary)

    Index
    • get sequelize(): Sequelize<Dialect>

      Returns Sequelize<Dialect>

    • Returns a query that creates a savepoint.

      Parameters

      • savepointName: 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]);
    • 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.

    • Called for each column of attributesToSql before it is generated. Dialects that reject more than one cascading constraint to the same table use this to drop the referential actions of the references they cannot accept.

      Parameters

      • _attribute: AttributeToSqlColumn

        the column about to be generated. Mutate it to change what is emitted

      • _referencedTables: string[]

        the quoted tables referenced by the columns generated so far. Push to record one

      Returns void

    • Adds quotes to identifier

      Parameters

      • identifier: string
      • Optional_force: boolean

      Returns string

    • Returns a query that rollbacks a savepoint.

      Parameters

      • savepointName: string

      Returns string