#NEWLINE# def _FetchPrimaryKey( self ) : #NEWLINE# #INDENT# "Return the list of column names that comprise a table's PRIMARY KEY." #NEWLINE# sql = 'SELECT column_name FROM information_schema.statistics WHERE index_name = "PRIMARY" AND table_schema = %(db)s AND table_name = %(table)s ORDER BY SEQ_IN_INDEX' #NEWLINE# db_name = self . _database . GetDbName ( ) #NEWLINE# table_name = self . _dbh . Escape ( self . _name ) #NEWLINE# sql = ( sql % { #NEWLINE# #INDENT# 'db' : db_name , #NEWLINE# 'table' : self , #NEWLINE# #UNINDENT# } ) #NEWLINE# res = self . _dbh . ExecuteWithRetry ( sql ) #NEWLINE# self . _primary_key = [ row [ 'column_name' ] for row in res ]