| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function getBody() : string |
||
| 20 | { |
||
| 21 | return <<<LUA |
||
| 22 | if box.sequence[space] == nil then |
||
| 23 | local last = 0 |
||
| 24 | local tuple = box.space[space].index[primary_index]:max() |
||
| 25 | if tuple ~= nil then |
||
| 26 | last = tuple[primary_field] |
||
| 27 | end |
||
| 28 | box.schema.sequence.create(space, { start = last + 1 }) |
||
| 29 | end |
||
| 30 | LUA; |
||
| 31 | } |
||
| 32 | |||
| 43 |