classPgSqlReadOnlyDiagnosticStatement
final class PgSqlReadOnlyDiagnosticStatement
Read only diagnostic statement for PostgreSQL queries.
Methods§
public static function isSafe(string $sql): boolChecks whether a diagnostic statement can execute without modifying tables.
Parameters
$sql | string |
Returns
boolTest cases 1
Called from 2
Calls 5
- static-call SqlTokenStream::tokenize() line 30
- static-call PgSqlLexerProfile::create() line 30
- function-call
countline 31 - static-call KeywordSearch::containsKeyword() line 45
- class-const PgSqlReadOnlyDiagnosticStatement::WRITE_KEYWORDS() line 49
Private surface 1§
Implementation details, listed for orientation only.
private const non-empty-list<string> WRITE_KEYWORDS = ['INSERT', 'UPDATE', 'DELETE', 'MERGE', 'CREATE', 'ALTER', 'DROP', 'TRUNCATE', …Test cases 5§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Other tests reaching this symbol 4
PgSqlSessionFactoryTestcallsPgSqlQueryGuardTestcallsPgSqlRewriterTestcallsStatementRewriterTestcalls