packages/sql-semantics-postgres/resources/models/Choice/ForLockingStrengthChoice_851c5b82.php
1<?php
2
3declare(strict_types=1);
4
5namespace SqlSemantics\Statement\Model\PostgreSql\Choice;
6
7/**
8 * The for_locking_strength 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\ForLockingStrengthChoice_851c5b82 $value): string => \SqlSemantics\Statement\Writer::render($value);
13 * $write instanceof \Closure // => true
14 */
15enum ForLockingStrengthChoice_851c5b82: string implements \SqlSemantics\Statement\Model\PostgreSql\Role\ForLockingStrengthForm
16{
17 case UseForUpdate_fc448151 = 'FOR UPDATE';
18 case UseForNoKeyUpdate_e4938495 = 'FOR NO KEY UPDATE';
19 case UseForShare_e27bfdcd = 'FOR SHARE';
20 case UseForKeyShare_a54d6181 = 'FOR KEY SHARE';
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