Documentation
    Preparing search index...

    Class SnowflakeQueryGenerator

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

    • 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