final class ReplaceTextSearchDictionary
    implements Statement
    uses Snapshot
Public API: explicitly declared with @visibility public.

A request to substitute one dictionary for another in the mappings of a text search configuration.

Rule: PG-TS-CONFIG-002. Mirrors AlterTSConfigurationStmt of kind REPLACE_DICT (no token types: every mapping) or REPLACE_DICT_FOR_TOKEN. Source: https://www.postgresql.org/docs/17/sql-altertsconfig.html. Status: Implemented.

Replacing a dictionary everywheredoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER TEXT SEARCH CONFIGURATION c ALTER MAPPING REPLACE english WITH swedish');
    [$operation->statement->tokens, $operation->statement->replacement->last()->value] // => [[], 'swedish']

Properties§

public list<Name> $tokens
public DottedName $configuration
public DottedName $replaced
public DottedName $replacement

Methods§

public function __construct(
    public DottedName $configuration,
    list<Name> $tokens,
    public DottedName $replaced,
    public DottedName $replacement,
)

Parameters

$configurationDottedNameThe configuration name
$tokenslist<Name>The token types whose mappings change; empty for every mapping
$replacedDottedNameThe dictionary replaced
$replacementDottedNameThe dictionary put in its place
Calls 2
public function deriveStatement(Derivation $derivation): void

Derives nothing: configurations and dictionaries are not part of a declaration context.

Parameters

$derivationDerivation
public function render(Output $out): void

Writes the request.

Parameters

$outOutput
Calls 4

Test cases 1§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1

Relations§

Instantiated in 2