(self, wrapper=None)
| 1295 | ] |
| 1296 | |
| 1297 | def get_group_by_cols(self, wrapper=None): |
| 1298 | # If wrapper is referenced by an alias for an explicit GROUP BY through |
| 1299 | # values() a reference to this expression and not the self must be |
| 1300 | # returned to ensure external column references are not grouped against |
| 1301 | # as well. |
| 1302 | external_cols = self.get_external_cols() |
| 1303 | if any(col.possibly_multivalued for col in external_cols): |
| 1304 | return [wrapper or self] |
| 1305 | return external_cols |
| 1306 | |
| 1307 | def as_sql(self, compiler, connection): |
| 1308 | # Some backends (e.g. Oracle) raise an error when a subquery contains |
no test coverage detected