Inpsyde\MultilingualPress\Database\WPDBTableInstaller::get_keys PHP Method

get_keys() private method

Returns the according SQL string for the keys of the given table.
private get_keys ( Inpsyde\MultilingualPress\Database\Table $table ) : string
$table Inpsyde\MultilingualPress\Database\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";
    }