django_evolution.mutators.sql_mutator
Mutator that applies arbitrary SQL to the database.
Added in version 2.2.
Classes
|
A mutator that applies arbitrary SQL to the database. |
- class django_evolution.mutators.sql_mutator.SQLMutator(mutation, sql)
Bases:
BaseMutatorA 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_mutatormodule.- __init__(mutation, sql)
Initialize the mutator.
- Parameters:
mutation (
django_evolution.mutations.base.BaseMutation) – The mutation that generated this SQL.sql (
list) – The list of SQL statements. See the return type into_sql()for possible values.
- to_sql()
Return SQL passed to this mutator.
- Returns:
The list of SQL statements.
Each item may be one of the following:
A Unicode string representing an SQL statement
A tuple in the form of
(sql_statement, sql_params)An instance of
django_evolution.db.sql_result. SQLResult.
- Return type:
- __annotations__ = {}