packages/sql-semantics-sqlite/resources/models/Choice/WqasChoice_5d67ccbe.php

1<?php
2
3declare(strict_types=1);
4
5namespace SqlSemantics\Statement\Model\Sqlite\Choice;
6
7/**
8 * The wqas 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\Sqlite\Choice\WqasChoice_5d67ccbe $value): string => \SqlSemantics\Statement\Writer::render($value);
13 *     $write instanceof \Closure // => true
14 */
15enum WqasChoice_5d67ccbe: string implements \SqlSemantics\Statement\Model\Sqlite\Role\WqasForm
16{
17    case UseAs_de148153 = 'AS';
18    case UseAsMaterialized_64837926 = 'AS MATERIALIZED';
19    case UseAsNotMaterialized_6050d450 = 'AS NOT MATERIALIZED';
20
21    /**
22     * Writes the selected SQL option.
23     */
24    public function write(\SqlSemantics\Statement\Writer $writer): void
25    {
26        foreach (explode(' ', $this->value) as $word) {
27            $writer->append($word);
28        }
29    }
30}
31