def primary_key(table_name)
      table_name = table_name.to_s

      @primary_keys ||= {}
      @primary_keys[table_name] ||= if @registration[:primary_key].present?
                                      @registration[:primary_key].call(@connection, table_name)
                                    else
                                      @connection.primary_key(table_name)
                                    end
    end
def primary_key(table_name)
      table_name = table_name.to_s

      @primary_keys ||= {}
      @primary_keys[table_name] ||= if @registration[:primary_key].present?
                                      @registration[:primary_key].call(@connection, table_name)
                                    else
                                      @connection.primary_key(table_name)
                                    end
    end
Returns the primary key for the given table.

 If a matching Automodel::SchemaInspector registration is found for the connection's adapter,
 and that registration specified a `:primary_key` Proc, the Proc is called. Otherwise, the
 standard connection `#primary_key` is returned.


 @param table_name [String]
   The table whose primary key should be fetched.


 @return [String, Array<String>]