packages/sql-semantics-mysql/resources/models/Choice/ViewAlgorithmChoice_7c294a36.php
1<?php
2
3declare(strict_types=1);
4
5namespace SqlSemantics\Statement\Model\MySql\Choice;
6
7/**
8 * The view_algorithm 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\ViewAlgorithmChoice_7c294a36 $value): string => \SqlSemantics\Statement\Writer::render($value);
13 * $write instanceof \Closure // => true
14 */
15enum ViewAlgorithmChoice_7c294a36: string implements \SqlSemantics\Statement\Model\MySql\Role\ViewAlgorithmForm, \SqlSemantics\Statement\Model\MySql\Role\ViewReplaceOrAlgorithmForm
16{
17 case UseAlgorithmUndefined_647e35e1 = 'ALGORITHM = UNDEFINED';
18 case UseAlgorithmMerge_5911336c = 'ALGORITHM = MERGE';
19 case UseAlgorithmTemptable_c36ebe23 = 'ALGORITHM = TEMPTABLE';
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