primary_key() public method

Returns the primary key.
Since: 3.0.0
public primary_key ( ) : string
return string The primary key.
 /**
  * Returns the according SQL string for the keys of the given table.
  *
  * @param Table $table Table object.
  *
  * @return string The SQL string for the keys of the given table.
  */
 private function get_keys(Table $table)
 {
     $keys = '';
     $primary_key = $table->primary_key();
     if ($primary_key) {
         // Due to dbDelta: two spaces after PRIMARY KEY!
         $keys .= ",\n\tPRIMARY KEY  ({$primary_key})";
     }
     $keys_sql = $table->keys_sql();
     if ($keys_sql) {
         $keys .= ",\n\t{$keys_sql}";
     }
     return "{$keys}\n";
 }