class documentation

class PGInspector(reflection.Inspector):

View In Hierarchy

Undocumented

Method get​_enums Return a list of ENUM objects.
Method get​_foreign​_table​_names Return a list of FOREIGN TABLE names.
Method get​_table​_oid Return the OID for the given table name.
Method get​_view​_names Return all view names in schema.

Inherited from Inspector:

Class Method from​_engine Construct a new dialect-specific Inspector object from the given engine or connection.
Method __init__ Initialize a new _reflection.Inspector.
Method get​_check​_constraints Return information about check constraints in table_name.
Method get​_columns Return information about columns in table_name.
Method get​_foreign​_keys Return information about foreign_keys in table_name.
Method get​_indexes Return information about indexes in table_name.
Method get​_pk​_constraint Return information about primary key constraint on table_name.
Method get​_schema​_names Return all schema names.
Method get​_sequence​_names Return all sequence names in schema.
Method get​_sorted​_table​_and​_fkc​_names Return dependency-sorted table and foreign key constraint names in referred to within a particular schema.
Method get​_table​_comment Return information about the table comment for table_name.
Method get​_table​_names Return all table names in referred to within a particular schema.
Method get​_table​_options Return a dictionary of options specified when the table of the given name was created.
Method get​_temp​_table​_names Return a list of temporary table names for the current bind.
Method get​_temp​_view​_names Return a list of temporary view names for the current bind.
Method get​_unique​_constraints Return information about unique constraints in table_name.
Method get​_view​_definition Return definition for view_name.
Method has​_sequence Return True if the backend has a table of the given name.
Method has​_table Return True if the backend has a table of the given name.
Method reflect​_table Given a _schema.Table object, load its internal constructs based on introspection.
Method reflecttable See reflect_table. This method name is deprecated
Class Method ​_construct Undocumented
Method ​_connectable​_insp Undocumented
Method ​_connection​_insp Undocumented
Method ​_engine​_insp Undocumented
Method ​_init​_connection Undocumented
Method ​_init​_engine Undocumented
Method ​_init​_legacy Undocumented
Method ​_inspection​_context Return an _reflection.Inspector from this one that will run all operations on a single connection.
Method ​_operation​_context Return a context that optimizes for multiple operations on a single transaction.
Method ​_reflect​_check​_constraints Undocumented
Method ​_reflect​_col​_sequence Undocumented
Method ​_reflect​_column Undocumented
Method ​_reflect​_fk Undocumented
Method ​_reflect​_indexes Undocumented
Method ​_reflect​_pk Undocumented
Method ​_reflect​_table​_comment Undocumented
Method ​_reflect​_unique​_constraints Undocumented
Class Variable ​_index​_sort​_exprs Undocumented
Instance Variable ​_op​_context​_requires​_connect Undocumented
Instance Variable bind Undocumented
Instance Variable dialect Undocumented
Instance Variable engine Undocumented
Instance Variable info​_cache Undocumented
Property default​_schema​_name Return the default schema name presented by the dialect for the current engine's database user.
def get_enums(self, schema=None):

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.
  • labels - a list of string labels that apply to the enum.
New in version 1.0.0.
Parameters
schemaschema name. If None, the default schema (typically 'public') is used. May also be set to '*' to indicate load enums for all schemas.
def get_foreign_table_names(self, schema=None):

Return a list of FOREIGN TABLE names.

Behavior is similar to that of _reflection.Inspector.get_table_names, except that the list is limited to those tables that report a relkind value of f.

New in version 1.0.0.
def get_table_oid(self, table_name, schema=None):
Return the OID for the given table name.
def get_view_names(self, schema=None, include=('plain', 'materialized')):
Return all view names in schema.
Parameters
schemaOptional, retrieve names from a non-default schema. For special quoting, use .quoted_name.
include

specify which types of views to return. Passed as a string value (for a single type) or a tuple (for any number of types). Defaults to ('plain', 'materialized').

New in version 1.1.