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

1<?php
2
3declare(strict_types=1);
4
5namespace SqlSemantics\Statement\Model\PostgreSql\Choice;
6
7/**
8 * The json_wrapper_behavior 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\JsonWrapperBehaviorChoice_4db543bf $value): string => \SqlSemantics\Statement\Writer::render($value);
13 *     $write instanceof \Closure // => true
14 */
15enum JsonWrapperBehaviorChoice_4db543bf: string implements \SqlSemantics\Statement\Model\PostgreSql\Role\JsonWrapperBehaviorForm
16{
17    case UseWithoutWrapper_ee428691 = 'WITHOUT WRAPPER';
18    case UseWithoutArrayWrapper_1202ddd5 = 'WITHOUT ARRAY WRAPPER';
19    case UseWithWrapper_c52c4995 = 'WITH WRAPPER';
20    case UseWithArrayWrapper_9f8a18a5 = 'WITH ARRAY WRAPPER';
21    case UseWithConditionalArrayWrapper_da8c084c = 'WITH CONDITIONAL ARRAY WRAPPER';
22    case UseWithUnconditionalArrayWrapper_87063d6e = 'WITH UNCONDITIONAL ARRAY WRAPPER';
23    case UseWithConditionalWrapper_998db96a = 'WITH CONDITIONAL WRAPPER';
24    case UseWithUnconditionalWrapper_264e25dc = 'WITH UNCONDITIONAL WRAPPER';
25    case Use_e3b0c442 = '';
26
27    /**
28     * Writes the selected SQL option.
29     */
30    public function write(\SqlSemantics\Statement\Writer $writer): void
31    {
32        foreach (explode(' ', $this->value) as $word) {
33            $writer->append($word);
34        }
35    }
36}
37