django_evolution.mutators.sql_mutator

Mutator that applies arbitrary SQL to the database.

New in version 2.2.

Classes

SQLMutator(mutation, sql)

A mutator that applies arbitrary SQL to the database.

class django_evolution.mutators.sql_mutator.SQLMutator(mutation, sql)

Bases: BaseMutator

A mutator that applies arbitrary SQL to the database.

This is instantiated by AppMutator, and should not be created manually.

Changed in version 2.2: Moved into the django_evolution.mutators.sql_mutator module.

__init__(mutation, sql)

Initialize the mutator.

Parameters:
to_sql()

Return SQL passed to this mutator.

Returns:

The list of SQL statements.

Each item may be one of the following:

  1. A Unicode string representing an SQL statement

  2. A tuple in the form of (sql_statement, sql_params)

  3. An instance of django_evolution.db.sql_result. SQLResult.

Return type:

list