<s> from django . db . backends import BaseDatabaseIntrospection <EOL> class DatabaseIntrospection ( BaseDatabaseIntrospection ) : <EOL> data_types_reverse = { <EOL> <NUM_LIT:16> : '<STR_LIT>' , <EOL> <NUM_LIT:20> : '<STR_LIT>' , <EOL> <NUM_LIT> : '<STR_LIT>' , <EOL> <NUM_LIT> : '<STR_LIT>' , <EOL> <NUM_LIT> : '<STR_LIT>' , <EOL> <NUM_LIT> : '<STR_LIT>' , <EOL> <NUM_LIT> : '<STR_LIT>' , <EOL> <NUM_LIT> : '<STR_LIT>' , <EOL> <NUM_LIT> : '<STR_LIT>' , <EOL> <NUM_LIT> : '<STR_LIT>' , <EOL> <NUM_LIT> : '<STR_LIT>' , <EOL> <NUM_LIT> : '<STR_LIT>' , <EOL> <NUM_LIT> : '<STR_LIT>' , <EOL> <NUM_LIT> : '<STR_LIT>' , <EOL> <NUM_LIT> : '<STR_LIT>' , <EOL> } <EOL> def get_table_list ( self , cursor ) : <EOL> "<STR_LIT>" <EOL> cursor . execute ( """<STR_LIT>""" ) <EOL> return [ row [ <NUM_LIT:0> ] for row in cursor . fetchall ( ) ] <EOL> def get_table_description ( self , cursor , table_name ) : <EOL> "<STR_LIT>" <EOL> cursor . execute ( "<STR_LIT>" % self . connection . ops . quote_name ( table_name ) ) <EOL> return cursor . description <EOL> def get_relations ( self , cursor , table_name ) : <EOL> """<STR_LIT>""" <EOL> cursor . execute ( """<STR_LIT>""" , [ table_name ] ) <EOL> relations = { } <EOL> for row in cursor . fetchall ( ) : <EOL> try : <EOL> relations [ int ( row [ <NUM_LIT:0> ] [ <NUM_LIT:1> : - <NUM_LIT:1> ] ) - <NUM_LIT:1> ] = ( int ( row [ <NUM_LIT:1> ] [ <NUM_LIT:1> : - <NUM_LIT:1> ] ) - <NUM_LIT:1> , row [ <NUM_LIT:2> ] ) <EOL> except ValueError : <EOL> continue <EOL> return relations <EOL> def get_indexes ( self , cursor , table_name ) : <EOL> """<STR_LIT>""" <EOL> cursor . execute ( """<STR_LIT>""" , [ table_name ] ) <EOL> indexes = { } <EOL> for row in cursor . fetchall ( ) : <EOL> if '<STR_LIT:U+0020>' in row [ <NUM_LIT:1> ] : <EOL> continue <EOL> indexes [ row [ <NUM_LIT:0> ] ] = { '<STR_LIT:primary_key>' : row [ <NUM_LIT:3> ] , '<STR_LIT>' : row [ <NUM_LIT:2> ] } <EOL> return indexes </s>
