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