classWeightStringParameters
final class WeightStringParameters
implements Scalar
uses Snapshot
Public API: explicitly declared with
@visibility public.The internal form WEIGHT_STRING(string, length, weights, flags) the server writes into view definitions.
Rule: MYSQL-WEIGHT-STRING-002. The three numbers are the result length, the number of weights and the flags of Item_func_weight_string. The result is a binary string; it is NULL when the argument is NULL. Terminates: the operand is a strict part. Source: https://github.com/mysql/mysql-server/blob/8.4/sql/item_strfunc.cc (Item_func_weight_string::print). Status: Implemented.
$query = (new \SqlSemantics\Platform\MySql\Semantics())->analyze("SELECT WEIGHT_STRING('ab', 0, 4, 64)");
$query->field(0)->type->descriptor->name() // => 'VARBINARY'Properties§
public Scalar $subjectpublic Numeral $lengthpublic Numeral $weightspublic Numeral $flagsMethods§
public function deriveScalar(Derivation $derivation, Environment $environment): ScalarFactDerives the operand; the result is a binary string.
Parameters
$derivation | Derivation | |
$environment | Environment |
Returns
Calls 4
- method-call ResultTyping::fact() line 51
- new ResultTyping line 51
- method-call Arguments::one() line 51
- new Arguments line 51
public function render(Output $out): voidTest cases 3§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.