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.

Comparing how two names sounddoctest
$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 $operand
public Scalar $pattern

Methods§

public function __construct(public Scalar $operand, public Scalar $pattern)

Parameters

$operandScalarThe left operand
$patternScalarThe right operand
Calls 6
public function deriveScalar(Derivation $derivation, Environment $environment): ScalarFact

Derives both operands and combines their NULL facts.

Parameters

$derivationDerivation
$environmentEnvironment

Returns

Calls 4
public function render(Output $out): void

Writes the operands around SOUNDS LIKE.

Parameters

$outOutput
Test cases 1
Calls 1

Test cases 4§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 3
Other tests reaching this symbol 1

Relations§

Instantiated in 1
Type checks 1