classSoundsLike
final class SoundsLike
implements Scalar
uses Snapshot
Public API: explicitly declared with
@visibility public.A comparison of the SOUNDEX strings of two operands: x SOUNDS LIKE y, which the server reads as SOUNDEX(x) = SOUNDEX(y).
Both operands are bit_expr (MYSQL-PRECEDENCE-001); there is no negated form.
Rule: MYSQL-SOUNDS-LIKE-001. Facts: 1, 0 or NULL, an integer; it can be NULL when an operand can. Both operands take a single value. Terminates: the operands are strict parts. Source: https://dev.mysql.com/doc/refman/8.4/en/string-functions.html#operator_sounds-like. Status: Implemented.
$query = (new \SqlSemantics\Platform\MySql\Semantics())->analyze("SELECT a FROM t WHERE a SOUNDS LIKE 'Smith'");
$query->statement->where->pattern->value() // => 'Smith'Properties§
public Scalar $operandpublic Scalar $patternMethods§
public function __construct(public Scalar $operand, public Scalar $pattern)Parameters
$operand | Scalar | The left operand |
$pattern | Scalar | The right operand |
Calls 6
- new Precedence line 43
- static-call Check::input() line 44
- method-call Precedence::fits() line 44
- class-const Precedence::PREDICATE() line 44
- class-const Precedence::BIT_EXPR() line 44
- method-call Precedence::admits() line 45
public function deriveScalar(Derivation $derivation, Environment $environment): ScalarFactDerives both operands and combines their NULL facts.
Parameters
$derivation | Derivation | |
$environment | Environment |
Returns
Calls 4
- new Operands line 53
- method-call Operands::single() line 54
- method-call Derivation::scalar() line 54
- method-call Operands::truth() line 57
public function render(Output $out): voidWrites the operands around SOUNDS LIKE.
Parameters
$out | Output |
Test cases 1
Calls 1
- method-call Output::node() line 65
Test cases 4§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.