classSessionDatabase
final class SessionDatabase
The current database of the session a context describes.
Rule: MYSQL-CURRENT-DATABASE-001. An unqualified table name is searched in one database, the current database of the session (the first and only entry of the context's search path). When the caller names none, the platform searches the placeholder name UNNAMED, which stands for a session whose current database is not known: rules that would print or compare the real name of the current database (SHOW TABLES column names, the database of a privilege on *) treat it as unknown instead. Terminates: one comparison. Source: https://dev.mysql.com/doc/refman/8.4/en/identifier-qualifiers.html. Status: Implemented.
Constants§
public const UNNAMED = '(current)'The database an unqualified name belongs to when the caller names no current database.
Methods§
public function named(AnalysisContext $context): ?NameAnswers the current database a context names, or null when the caller named none.
Parameters
$context | AnalysisContext |
Returns
?NameTest cases 2
Called from 1
Calls 1
- class-const SessionDatabase::UNNAMED() line 40
Test cases 3§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.