(self, atomic: bool = True, collect_sql: bool = False)
| 135 | progress(event, key.app_label, key.name) |
| 136 | |
| 137 | def _schema_editor(self, atomic: bool = True, collect_sql: bool = False) -> BaseSchemaEditor: |
| 138 | module = self.connection.__class__.__module__ |
| 139 | dialect = self.connection.capabilities.dialect |
| 140 | if "sqlite" in module: |
| 141 | return SqliteSchemaEditor(self.connection, atomic=atomic, collect_sql=collect_sql) |
| 142 | if "asyncpg" in module: |
| 143 | return AsyncpgSchemaEditor(self.connection, atomic=atomic, collect_sql=collect_sql) |
| 144 | if "psycopg" in module: |
| 145 | return PsycopgSchemaEditor(self.connection, atomic=atomic, collect_sql=collect_sql) |
| 146 | if "mysql" in module: |
| 147 | return MySQLSchemaEditor(self.connection, atomic=atomic, collect_sql=collect_sql) |
| 148 | if "mssql" in module or "odbc" in module: |
| 149 | return MSSQLSchemaEditor(self.connection, atomic=atomic, collect_sql=collect_sql) |
| 150 | if "oracle" in module: |
| 151 | return OracleSchemaEditor(self.connection, atomic=atomic, collect_sql=collect_sql) |
| 152 | if dialect == "postgres": |
| 153 | return BasePostgresSchemaEditor(self.connection, atomic=atomic, collect_sql=collect_sql) |
| 154 | return BaseSchemaEditor(self.connection, atomic=atomic, collect_sql=collect_sql) |
| 155 | |
| 156 | async def collect_sql( |
| 157 | self, |
no test coverage detected