

def get_primary_keys(self, table, schema='public'):
    query = '\n            SELECT kc.column_name\n            FROM information_schema.table_constraints AS tc\n            INNER JOIN information_schema.key_column_usage AS kc ON (\n                tc.table_name = kc.table_name AND\n                tc.table_schema = kc.table_schema AND\n                tc.constraint_name = kc.constraint_name)\n            WHERE\n                tc.constraint_type = %s AND\n                tc.table_name = %s AND\n                tc.table_schema = %s'
    cursor = self.execute_sql(query, ('PRIMARY KEY', table, schema))
    return [self for (row,) in cursor.fetchall()]

dataset/ETHPy150Open coleifer/peewee/peewee.py PostgresqlDatabase.get_primary_keys/VarMisuse@39/208 `row`->`self`