packages/sql-semantics-mysql/resources/models/Choice/HandlerRkeyFunctionChoice_792b25a8.php

1<?php
2
3declare(strict_types=1);
4
5namespace SqlSemantics\Statement\Model\MySql\Choice;
6
7/**
8 * The handler_rkey_function 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\HandlerRkeyFunctionChoice_792b25a8 $value): string => \SqlSemantics\Statement\Writer::render($value);
13 *     $write instanceof \Closure // => true
14 */
15enum HandlerRkeyFunctionChoice_792b25a8: string implements \SqlSemantics\Statement\Model\MySql\Role\HandlerRkeyFunctionForm
16{
17    case UseFirst_267d3b81 = 'FIRST';
18    case UseNext_7a66eabf = 'NEXT';
19    case UsePrev_39a40026 = 'PREV';
20    case UseLast_7e86aeec = 'LAST';
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