(self, schema, has_filter_names, scope, kind)
| 5156 | |
| 5157 | @lru_cache() |
| 5158 | def _comment_query(self, schema, has_filter_names, scope, kind): |
| 5159 | relkinds = self._kind_to_relkinds(kind) |
| 5160 | query = ( |
| 5161 | select( |
| 5162 | pg_catalog.pg_class.c.relname, |
| 5163 | pg_catalog.pg_description.c.description, |
| 5164 | ) |
| 5165 | .select_from(pg_catalog.pg_class) |
| 5166 | .outerjoin( |
| 5167 | pg_catalog.pg_description, |
| 5168 | sql.and_( |
| 5169 | pg_catalog.pg_class.c.oid |
| 5170 | == pg_catalog.pg_description.c.objoid, |
| 5171 | pg_catalog.pg_description.c.objsubid == 0, |
| 5172 | pg_catalog.pg_description.c.classoid |
| 5173 | == sql.func.cast("pg_catalog.pg_class", REGCLASS), |
| 5174 | ), |
| 5175 | ) |
| 5176 | .where(self._pg_class_relkind_condition(relkinds)) |
| 5177 | ) |
| 5178 | query = self._pg_class_filter_scope_schema(query, schema, scope) |
| 5179 | if has_filter_names: |
| 5180 | query = query.where( |
| 5181 | pg_catalog.pg_class.c.relname.in_(bindparam("filter_names")) |
| 5182 | ) |
| 5183 | return query |
| 5184 | |
| 5185 | def get_multi_table_comment( |
| 5186 | self, connection, schema, filter_names, scope, kind, **kw |
no test coverage detected