MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / get_enums

Method get_enums

lib/sqlalchemy/dialects/postgresql/base.py:3300–3319  ·  view source on GitHub ↗

Return a list of ENUM objects. Each member is a dictionary containing these fields: * name - name of the enum * schema - the schema name for the enum. * visible - boolean, whether or not this enum is visible in the default search path.

(self, schema: Optional[str] = None)

Source from the content-addressed store, hash-verified

3298 )
3299
3300 def get_enums(self, schema: Optional[str] = None) -> List[ReflectedEnum]:
3301 """Return a list of ENUM objects.
3302
3303 Each member is a dictionary containing these fields:
3304
3305 * name - name of the enum
3306 * schema - the schema name for the enum.
3307 * visible - boolean, whether or not this enum is visible
3308 in the default search path.
3309 * labels - a list of string labels that apply to the enum.
3310
3311 :param schema: schema name. If None, the default schema
3312 (typically 'public') is used. May also be set to ``'*'`` to
3313 indicate load enums for all schemas.
3314
3315 """
3316 with self._operation_context() as conn:
3317 return self.dialect._load_enums(
3318 conn, schema, info_cache=self.info_cache
3319 )
3320
3321 def get_foreign_table_names(
3322 self, schema: Optional[str] = None

Calls 2

_operation_contextMethod · 0.80
_load_enumsMethod · 0.80