classSpIfWithExprThenSymSpProcStmts1SpElseifs_106dd387
final class SpIfWithExprThenSymSpProcStmts1SpElseifs_106dd387
implements SpIfForm
uses Assertion
Public API: explicitly declared with
@visibility public.The sp_if SQL value; generated by bin/build-models.php.
$write = static fn (\SqlSemantics\Statement\Model\MySql\Value\SpIfWithExprThenSymSpProcStmts1SpElseifs_106dd387 $value): string => \SqlSemantics\Statement\Writer::render($value);
$write instanceof \Closure // => trueProperties§
public ExprForm $exprpublic SpProcStmts1Form $spProcStmts1public SpElseifsForm $spElseifspublic Comments $comments = new \SqlSemantics\Statement\Comments()Methods§
public function __construct(
public ExprForm $expr,
public SpProcStmts1Form $spProcStmts1,
public SpElseifsForm $spElseifs,
public Comments $comments = new \SqlSemantics\Statement\Comments(),
)Supplies the SQL values of this form; comments are kept by the position of the symbol each precedes.
Parameters
$expr | ExprForm | |
$spProcStmts1 | SpProcStmts1Form | |
$spElseifs | SpElseifsForm | |
$comments | Comments |
Calls 3
- new Comments line 26
- method-call SpIfWithExprThenSymSpProcStmts1SpElseifs_106dd387::assert() line 28
- static-call Contracts::contains() line 28
public function write(Writer $writer): voidWrites SQL entirely from this value's fields.
Parameters
$writer | Writer |
Calls 5
- method-call Writer::comments() line 38
- method-call ExprForm::write() line 39
- method-call Writer::append() line 41
- method-call SpProcStmts1Form::write() line 43
- method-call SpElseifsForm::write() line 45
public function withExpr(ExprForm $expr): selfpublic function withSpProcStmts1(SpProcStmts1Form $spProcStmts1): selfReturns a copy with a new spProcStmts1, preserving every other field.
Parameters
$spProcStmts1 | SpProcStmts1Form |
Returns
selfCalls 1
- new
selfline 61
public function withSpElseifs(SpElseifsForm $spElseifs): selfReturns a copy with a new spElseifs, preserving every other field.
Parameters
$spElseifs | SpElseifsForm |
Returns
selfCalls 1
- new
selfline 69