Return if the database has the specified type in the provided schema. :param type_name: the type to check. :param schema: schema name. If None, the default schema (typically 'public') is used. May also be set to ``'*'`` to check in all schemas. .
(
self, type_name: str, schema: Optional[str] = None, **kw: Any
)
| 3335 | ) |
| 3336 | |
| 3337 | def has_type( |
| 3338 | self, type_name: str, schema: Optional[str] = None, **kw: Any |
| 3339 | ) -> bool: |
| 3340 | """Return if the database has the specified type in the provided |
| 3341 | schema. |
| 3342 | |
| 3343 | :param type_name: the type to check. |
| 3344 | :param schema: schema name. If None, the default schema |
| 3345 | (typically 'public') is used. May also be set to ``'*'`` to |
| 3346 | check in all schemas. |
| 3347 | |
| 3348 | .. versionadded:: 2.0 |
| 3349 | |
| 3350 | """ |
| 3351 | with self._operation_context() as conn: |
| 3352 | return self.dialect.has_type( |
| 3353 | conn, type_name, schema, info_cache=self.info_cache |
| 3354 | ) |
| 3355 | |
| 3356 | |
| 3357 | class PGExecutionContext(default.DefaultExecutionContext): |
nothing calls this directly
no test coverage detected