classMapTextSearchTokens
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.
$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> $tokenspublic non-empty-list<DottedName> $dictionariespublic DottedName $configurationpublic MappingChange $changeMethods§
public function __construct(
public DottedName $configuration,
public MappingChange $change,
list<Name> $tokens,
list<DottedName> $dictionaries,
)Parameters
$configuration | DottedName | The configuration name |
$change | MappingChange | Whether mappings are added or replaced |
$tokens | list<Name> | The token types; at least one |
$dictionaries | list<DottedName> | The dictionaries; at least one |
Calls 3
- static-call Check::listOf() line 50
- class-const Name::class() line 50
- class-const DottedName::class() line 51
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 66
- method-call Output::symbol() line 69
- method-call Output::name() line 71
- class-const NameUse::Column() line 71
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
MapTextSearchTokensTestcalls
Relations§
Instantiated in 2
- new SqlSemantics\Platform\PostgreSql\Lowering\Catalog\TextSearchRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/TextSearchRule.php:58
- new SqlSemantics\Platform\PostgreSql\Lowering\Catalog\TextSearchRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/TextSearchRule.php:59