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

A request to map token types of a text search configuration to dictionaries: ADD MAPPING or ALTER MAPPING FOR … WITH.

Rule: PG-TS-CONFIG-001. Mirrors AlterTSConfigurationStmt of kind ADD_MAPPING or ALTER_MAPPING_FOR_TOKEN: token types and dictionaries in order. Source: https://www.postgresql.org/docs/17/sql-altertsconfig.html. Status: Implemented.

Adding a mappingdoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER TEXT SEARCH CONFIGURATION c ADD MAPPING FOR word, asciiword WITH simple');
    [count($operation->statement->tokens), $operation->toString()] // => [2, 'ALTER TEXT SEARCH CONFIGURATION c ADD MAPPING FOR word, asciiword WITH simple']

Properties§

public non-empty-list<Name> $tokens
public non-empty-list<DottedName> $dictionaries
public DottedName $configuration
public MappingChange $change

Methods§

public function __construct(
    public DottedName $configuration,
    public MappingChange $change,
    list<Name> $tokens,
    list<DottedName> $dictionaries,
)

Parameters

$configurationDottedNameThe configuration name
$changeMappingChangeWhether mappings are added or replaced
$tokenslist<Name>The token types; at least one
$dictionarieslist<DottedName>The dictionaries; at least one
Calls 3
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