class documentation

class DatabaseIntrospection(BaseDatabaseIntrospection):

Known subclasses: django.contrib.gis.db.backends.spatialite.introspection.SpatiaLiteIntrospection

View In Hierarchy

Undocumented

Method ​_get​_column​_collations Undocumented
Method ​_get​_foreign​_key​_constraints Undocumented
Method ​_get​_index​_columns​_orders Undocumented
Method ​_parse​_column​_or​_constraint​_definition Undocumented
Method ​_parse​_table​_constraints Undocumented
Method get​_constraints Retrieve any constraints or keys (unique, pk, fk, check, index) across one or more columns.
Method get​_field​_type Hook for a database backend to use the cursor description to match a Django field type to a database column.
Method get​_key​_columns Return a list of (column_name, referenced_table_name, referenced_column_name) for all key columns in given table.
Method get​_primary​_key​_column Return the column name of the primary key for the given table.
Method get​_relations Return a dictionary of {field_name: (field_name_other_table, other_table)} representing all relationships to the given table.
Method get​_sequences Return a list of introspected sequences for table_name. Each sequence is a dict: {'table': <table_name>, 'column': <column_name>}. An optional 'name' key can be added if the backend supports named sequences.
Method get​_table​_description Return a description of the table with the DB-API cursor.description interface.
Method get​_table​_list Return a list of table and view names in the current database.
Class Variable data​_types​_reverse Undocumented

Inherited from BaseDatabaseIntrospection:

Method __init__ Undocumented
Method django​_table​_names Return a list of all table names that have associated Django models and are in INSTALLED_APPS.
Method get​_migratable​_models Undocumented
Method identifier​_converter Apply a conversion to the identifier for the purposes of comparison.
Method installed​_models Return a set of all models represented by the provided list of table names.
Method sequence​_list Return a list of information about all DB sequences for all models in all apps.
Method table​_names No summary
Instance Variable connection Undocumented
def _get_column_collations(self, cursor, table_name):

Undocumented

def _get_foreign_key_constraints(self, cursor, table_name):

Undocumented

def _get_index_columns_orders(self, sql):

Undocumented

def _parse_column_or_constraint_definition(self, tokens, columns):

Undocumented

def _parse_table_constraints(self, sql, columns):

Undocumented

def get_constraints(self, cursor, table_name):
Retrieve any constraints or keys (unique, pk, fk, check, index) across one or more columns.
def get_field_type(self, data_type, description):

Hook for a database backend to use the cursor description to match a Django field type to a database column.

For Oracle, the column data_type on its own is insufficient to distinguish between a FloatField and IntegerField, for example.

def get_key_columns(self, cursor, table_name):
Return a list of (column_name, referenced_table_name, referenced_column_name) for all key columns in given table.
def get_primary_key_column(self, cursor, table_name):
Return the column name of the primary key for the given table.
def get_relations(self, cursor, table_name):
Return a dictionary of {field_name: (field_name_other_table, other_table)} representing all relationships to the given table.
def get_sequences(self, cursor, table_name, table_fields=()):
Return a list of introspected sequences for table_name. Each sequence is a dict: {'table': <table_name>, 'column': <column_name>}. An optional 'name' key can be added if the backend supports named sequences.
def get_table_description(self, cursor, table_name):
Return a description of the table with the DB-API cursor.description interface.
def get_table_list(self, cursor):
Return a list of table and view names in the current database.