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

1<?php
2
3declare(strict_types=1);
4
5namespace SqlSemantics\Statement\Model\PostgreSql\Choice;
6
7/**
8 * The ConstraintAttr 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\ConstraintAttrChoice_689d0bfa $value): string => \SqlSemantics\Statement\Writer::render($value);
13 *     $write instanceof \Closure // => true
14 */
15enum ConstraintAttrChoice_689d0bfa: string implements \SqlSemantics\Statement\Model\PostgreSql\Role\ColConstraintForm, \SqlSemantics\Statement\Model\PostgreSql\Role\ConstraintAttrForm
16{
17    case UseDeferrable_98c41ab5 = 'DEFERRABLE';
18    case UseNotDeferrable_22785b31 = 'NOT DEFERRABLE';
19    case UseInitiallyDeferred_6e9191be = 'INITIALLY DEFERRED';
20    case UseInitiallyImmediate_0e67cf0a = 'INITIALLY IMMEDIATE';
21
22    /**
23     * Writes the selected SQL option.
24     */
25    public function write(\SqlSemantics\Statement\Writer $writer): void
26    {
27        foreach (explode(' ', $this->value) as $word) {
28            $writer->append($word);
29        }
30    }
31}
32