classReplaceTextSearchDictionary
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.
$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> $tokenspublic DottedName $configurationpublic DottedName $replacedpublic DottedName $replacementMethods§
public function __construct(
public DottedName $configuration,
list<Name> $tokens,
public DottedName $replaced,
public DottedName $replacement,
)Parameters
$configuration | DottedName | The configuration name |
$tokens | list<Name> | The token types whose mappings change; empty for every mapping |
$replaced | DottedName | The dictionary replaced |
$replacement | DottedName | The dictionary put in its place |
Calls 2
- static-call Check::listOf() line 45
- class-const Name::class() line 45
public function deriveStatement(Derivation $derivation): voidDerives nothing: configurations and dictionaries are not part of a declaration context.
Parameters
$derivation | Derivation |
public function render(Output $out): voidWrites the request.
Parameters
$out | Output |
Calls 4
- method-call Output::keyword() line 60
- method-call Output::symbol() line 65
- method-call Output::name() line 67
- class-const NameUse::Column() line 67
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
- new SqlSemantics\Platform\PostgreSql\Lowering\Catalog\TextSearchRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/TextSearchRule.php:60
- new SqlSemantics\Platform\PostgreSql\Lowering\Catalog\TextSearchRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/TextSearchRule.php:61