(self, model)
| 179 | connection.enable_constraint_checking() |
| 180 | |
| 181 | def column_classes(self, model): |
| 182 | with connection.cursor() as cursor: |
| 183 | columns = { |
| 184 | d[0]: (connection.introspection.get_field_type(d[1], d), d) |
| 185 | for d in connection.introspection.get_table_description( |
| 186 | cursor, |
| 187 | model._meta.db_table, |
| 188 | ) |
| 189 | } |
| 190 | # SQLite has a different format for field_type |
| 191 | for name, (type, desc) in columns.items(): |
| 192 | if isinstance(type, tuple): |
| 193 | columns[name] = (type[0], desc) |
| 194 | return columns |
| 195 | |
| 196 | def get_primary_key(self, table): |
| 197 | with connection.cursor() as cursor: |
no test coverage detected