packages/sql-semantics-mysql/resources/models/Choice/StartTransactionOptionChoice_39ab0f54.php
1<?php
2
3declare(strict_types=1);
4
5namespace SqlSemantics\Statement\Model\MySql\Choice;
6
7/**
8 * The start_transaction_option 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\MySql\Choice\StartTransactionOptionChoice_39ab0f54 $value): string => \SqlSemantics\Statement\Writer::render($value);
13 * $write instanceof \Closure // => true
14 */
15enum StartTransactionOptionChoice_39ab0f54: string implements \SqlSemantics\Statement\Model\MySql\Role\OptStartTransactionOptionListForm, \SqlSemantics\Statement\Model\MySql\Role\StartTransactionOptionForm, \SqlSemantics\Statement\Model\MySql\Role\StartTransactionOptionListForm
16{
17 case UseWithConsistentSnapshot_4d167c75 = 'WITH CONSISTENT SNAPSHOT';
18 case UseReadOnly_6628aa89 = 'READ ONLY';
19 case UseReadWrite_4c96461f = 'READ WRITE';
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