packages/sql-semantics-postgres/resources/models/Choice/OptWindowExclusionClauseChoice_422b3afa.php

1<?php
2
3declare(strict_types=1);
4
5namespace SqlSemantics\Statement\Model\PostgreSql\Choice;
6
7/**
8 * The opt_window_exclusion_clause SQL value; generated by bin/build-models.php.
9 *
10 * @visibility public
11 * @example Accept a structured SQL value
12 *     $write = static fn (\SqlSemantics\Statement\Model\PostgreSql\Choice\OptWindowExclusionClauseChoice_422b3afa $value): string => \SqlSemantics\Statement\Writer::render($value);
13 *     $write instanceof \Closure // => true
14 */
15enum OptWindowExclusionClauseChoice_422b3afa: string implements \SqlSemantics\Statement\Model\PostgreSql\Role\OptWindowExclusionClauseForm
16{
17    case UseExcludeCurrentRow_b1f83261 = 'EXCLUDE CURRENT ROW';
18    case UseExcludeGroup_1e1e3216 = 'EXCLUDE GROUP';
19    case UseExcludeTies_a062fa84 = 'EXCLUDE TIES';
20    case UseExcludeNoOthers_b122de28 = 'EXCLUDE NO OTHERS';
21    case Use_e3b0c442 = '';
22
23    /**
24     * Writes the selected SQL option.
25     */
26    public function write(\SqlSemantics\Statement\Writer $writer): void
27    {
28        foreach (explode(' ', $this->value) as $word) {
29            $writer->append($word);
30        }
31    }
32}
33