classRoutineEstimate
final class RoutineEstimate
implements RoutineOption
uses Snapshot
Public API: explicitly declared with
@visibility public.COST number or ROWS number: a planner estimate for the routine.
Source: https://www.postgresql.org/docs/17/sql-createfunction.html.
$estimate = new \SqlSemantics\Platform\PostgreSql\Statement\Routine\Option\RoutineEstimate(\SqlSemantics\Platform\PostgreSql\Statement\Routine\Option\EstimateKind::Cost, new \SqlSemantics\Platform\PostgreSql\Statement\Literal\SignedNumber(false, new \SqlSemantics\Platform\PostgreSql\Statement\Literal\IntegerConstant('100')));
[$estimate->setting(), $estimate->value->magnitude->digits] // => ['cost', '100']Properties§
public EstimateKind $kindpublic SignedNumber $valueMethods§
public function __construct(public EstimateKind $kind, public SignedNumber $value)Parameters
$kind | EstimateKind | What the estimate states |
$value | SignedNumber | The estimate |
public function alterable(): boolTells that ALTER accepts the option.
Returns
boolTest cases 1
public function setting(): stringpublic function deriveClause(Derivation $derivation, Environment $environment): voidDerives nothing: a number holds no expression.
Parameters
$derivation | Derivation | |
$environment | Environment |
Test cases 1
public function render(Output $out): voidWrites the keyword and the number.
Parameters
$out | Output |
Test cases 1
Calls 1
- method-call Output::keyword() line 63
Test cases 4§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.