packages/sql-semantics-postgres/resources/models/Choice/JsonKeyUniquenessConstraintOptChoice_5ec10130.php
1<?php
2
3declare(strict_types=1);
4
5namespace SqlSemantics\Statement\Model\PostgreSql\Choice;
6
7/**
8 * The json_key_uniqueness_constraint_opt 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\JsonKeyUniquenessConstraintOptChoice_5ec10130 $value): string => \SqlSemantics\Statement\Writer::render($value);
13 * $write instanceof \Closure // => true
14 */
15enum JsonKeyUniquenessConstraintOptChoice_5ec10130: string implements \SqlSemantics\Statement\Model\PostgreSql\Role\JsonKeyUniquenessConstraintOptForm
16{
17 case UseWithUniqueKeys_39674647 = 'WITH UNIQUE KEYS';
18 case UseWithUnique_bddb0509 = 'WITH UNIQUE';
19 case UseWithoutUniqueKeys_6e781d3e = 'WITHOUT UNIQUE KEYS';
20 case UseWithoutUnique_b7aceef4 = 'WITHOUT UNIQUE';
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