classMagnitudes
final class Magnitudes
Reads the value the server takes from a number written at an option position.
Rule: MYSQL-REPLICATION-NUMBER-001. The rule ulong_num takes the integer prefix of a decimal or floating number (my_strtoll10 stops at the first character that is not a digit) and the value of a hexadecimal literal. The rules real_ulong_num and real_ulonglong_num refuse a decimal or floating number (dec_num_error, ER_ONLY_INTEGERS_ALLOWED). An integer beyond the PHP integer range is reported as beyond every bound the checks use. Terminates: constant work over the digits. Source: sql/sql_yacc.yy (ulong_num, real_ulong_num, dec_num_error), https://dev.mysql.com/doc/refman/8.4/en/number-literals.html. Status: Implemented.
Methods§
public function integer(Numeral $number): ?intAnswers the integer value of a number, or null when it exceeds the PHP integer range.
Parameters
$number | Numeral |
Returns
?intTest cases 1
Called from 3
- method-call SqlSemantics\Platform\MySql\Rules\Replication\Magnitudes::exceeds() packages/sql-semantics-mysql/src/Rules/Replication/Magnitudes.php:47
- method-call SqlSemantics\Platform\MySql\Rules\Replication\Magnitudes::flag() packages/sql-semantics-mysql/src/Rules/Replication/Magnitudes.php:57
- method-call SqlSemantics\Platform\MySql\Statement\Replication\Reset\ResetBinaryLogs::deriveTarget() packages/sql-semantics-mysql/src/Statement/Replication/Reset/ResetBinaryLogs.php:68
public function exceeds(Numeral $number, int $bound): boolTells whether a number is greater than a bound.
Parameters
$number | Numeral | |
$bound | int |
Returns
boolTest cases 1
Called from 2
- method-call SqlSemantics\Platform\MySql\Rules\Replication\SourceSettings::number() packages/sql-semantics-mysql/src/Rules/Replication/SourceSettings.php:135
- method-call SqlSemantics\Platform\MySql\Statement\Replication\Reset\ResetBinaryLogs::deriveTarget() packages/sql-semantics-mysql/src/Statement/Replication/Reset/ResetBinaryLogs.php:68
Calls 1
- method-call Magnitudes::integer() line 47
public function flag(Numeral $number): boolTells whether a number is 0 or 1.
Parameters
$number | Numeral |
Returns
boolTest cases 1
Called from 2
- method-call SqlSemantics\Platform\MySql\Rules\Replication\SourceSettings::number() packages/sql-semantics-mysql/src/Rules/Replication/SourceSettings.php:129
- method-call SqlSemantics\Platform\MySql\Rules\Replication\SourceSettings::number() packages/sql-semantics-mysql/src/Rules/Replication/SourceSettings.php:132
Calls 1
- method-call Magnitudes::integer() line 57
public function fractional(Numeral $number): boolTells whether a number is written with a fraction or an exponent.
Parameters
$number | Numeral |
Returns
boolTest cases 1
Called from 2
- method-call SqlSemantics\Platform\MySql\Rules\Replication\SourceSettings::number() packages/sql-semantics-mysql/src/Rules/Replication/SourceSettings.php:129
- method-call SqlSemantics\Platform\MySql\Statement\Replication\Reset\ResetBinaryLogs::deriveTarget() packages/sql-semantics-mysql/src/Statement/Replication/Reset/ResetBinaryLogs.php:66
Calls 1
- function-call
preg_matchline 67
Test cases 4§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Relations§
Instantiated in 2
- new SqlSemantics\Platform\MySql\Rules\Replication\SourceSettings::number() packages/sql-semantics-mysql/src/Rules/Replication/SourceSettings.php:127
- new SqlSemantics\Platform\MySql\Statement\Replication\Reset\ResetBinaryLogs::deriveTarget() packages/sql-semantics-mysql/src/Statement/Replication/Reset/ResetBinaryLogs.php:65
Method calls 7
- method-call SqlSemantics\Platform\MySql\Rules\Replication\SourceSettings::number() packages/sql-semantics-mysql/src/Rules/Replication/SourceSettings.php:129
- method-call SqlSemantics\Platform\MySql\Rules\Replication\SourceSettings::number() packages/sql-semantics-mysql/src/Rules/Replication/SourceSettings.php:129
- method-call SqlSemantics\Platform\MySql\Rules\Replication\SourceSettings::number() packages/sql-semantics-mysql/src/Rules/Replication/SourceSettings.php:132
- method-call SqlSemantics\Platform\MySql\Rules\Replication\SourceSettings::number() packages/sql-semantics-mysql/src/Rules/Replication/SourceSettings.php:135
- method-call SqlSemantics\Platform\MySql\Statement\Replication\Reset\ResetBinaryLogs::deriveTarget() packages/sql-semantics-mysql/src/Statement/Replication/Reset/ResetBinaryLogs.php:66
- method-call SqlSemantics\Platform\MySql\Statement\Replication\Reset\ResetBinaryLogs::deriveTarget() packages/sql-semantics-mysql/src/Statement/Replication/Reset/ResetBinaryLogs.php:68
- method-call SqlSemantics\Platform\MySql\Statement\Replication\Reset\ResetBinaryLogs::deriveTarget() packages/sql-semantics-mysql/src/Statement/Replication/Reset/ResetBinaryLogs.php:68