Return the schema name for the given schema item taking into account current schema translate map.
(self, obj: HasSchemaAttr)
| 207 | return schema_translate_map |
| 208 | |
| 209 | def schema_for_object(self, obj: HasSchemaAttr) -> Optional[str]: |
| 210 | """Return the schema name for the given schema item taking into |
| 211 | account current schema translate map. |
| 212 | |
| 213 | """ |
| 214 | |
| 215 | name = obj.schema |
| 216 | schema_translate_map: Optional[SchemaTranslateMapType] = ( |
| 217 | self._execution_options.get("schema_translate_map", None) |
| 218 | ) |
| 219 | |
| 220 | if ( |
| 221 | schema_translate_map |
| 222 | and name in schema_translate_map |
| 223 | and obj._use_schema_map |
| 224 | ): |
| 225 | return schema_translate_map[name] |
| 226 | else: |
| 227 | return name |
| 228 | |
| 229 | def __enter__(self) -> Connection: |
| 230 | return self |
no test coverage detected