classStatementRewriter
final class StatementRewriter
Restricted visibility: declared "@visibility ZtdQuery\Platform\Sqlite". Code outside that scope must not name this declaration.
Builds the read projection and mutation plan for one SQLite statement.
Methods§
public function __construct(
SqliteCteShadowComposer $cteComposer,
private SqliteQueryGuard $guard,
private SqliteMutationResolver $mutationResolver,
SqliteParser $parser,
private TableDefinitionRegistry $registry,
private SqliteReturningProjectionParser $returningProjectionParser,
private ShadowStore $shadowStore,
private SqliteTransformer $transformer,
private ViewDefinitionSet $views,
)Binds the collaborators used by this operation.
Parameters
$cteComposer | SqliteCteShadowComposer | |
$guard | SqliteQueryGuard | |
$mutationResolver | SqliteMutationResolver | |
$parser | SqliteParser | |
$registry | TableDefinitionRegistry | |
$returningProjectionParser | SqliteReturningProjectionParser | |
$shadowStore | ShadowStore | |
$transformer | SqliteTransformer | |
$views | ViewDefinitionSet |
Calls 1
public function rewriteStatement(string $stmtSql, string $originalSql): RewritePlanBuilds the read projection and mutation plan for one SQLite statement.
Parameters
$stmtSql | string | |
$originalSql | string |
Returns
Test cases 3
Called from 2
Calls 17
- static-call SqliteInMemoryAttachStatement::isSafe() line 58
- static-call SqliteReadOnlyDiagnosticStatement::isSafe() line 58
- new RewritePlan line 59
- class-const QueryKind::READ() line 59
- method-call SqliteQueryGuard::classify() line 61
- new UnsupportedSqlException line 63
- method-call TableContextBuilder::buildTableContext() line 66
- new TableContextBuilder line 66
- method-call ShadowStore::getAll() line 66
- method-call ReferencedTableLookup::assertKnownTables() line 69
- method-call SqliteTransformer::transform() line 71
- class-const QueryKind::DDL_SIMULATED() line 76
- method-call SqliteMutationResolver::resolve() line 77
- class-const AffectedRowsMode::None() line 83
- class-const QueryKind::WRITE_SIMULATED() line 96
- method-call SqliteReturningProjectionParser::parse() line 98
- class-const AffectedRowsMode::Matched() line 99
Private surface 8§
Implementation details, listed for orientation only.
private ReferencedTableLookup $tableLookupprivate SqliteQueryGuard $guardprivate SqliteMutationResolver $mutationResolverprivate TableDefinitionRegistry $registryprivate SqliteReturningProjectionParser $returningProjectionParserprivate ShadowStore $shadowStoreprivate SqliteTransformer $transformerprivate ViewDefinitionSet $viewsTest cases 5§
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 2
SqliteRewriterTestcallsSqliteSessionFactoryTestcalls