classWithoutRowidRule
final class WithoutRowidRule
implements RewriteRule
Implements the required PRIMARY KEY and forbidden AUTOINCREMENT conditions in build.c/sqlite3EndTable.
Methods§
public function rewrite(TerminalSequence $sequence): TerminalSequenceCompletes the table's first column only when WITHOUT ROWID has no primary key.
Parameters
$sequence | TerminalSequence |
Returns
Test cases 3
WithoutRowidRuleTest::testPrimaryKeyLeavesASequenceWithoutAColumnUntouchedcovers and callsWithoutRowidRuleTest::testRewriteCompletesAKeyOnlyForWithoutRowidAndRetainsTheOriginalTracecovers and callsWithoutRowidRuleTest::testRewriteRemovesAutoincrementAndPreservesAnExistingPrimaryKeycovers and calls
Calls 4
- method-call TerminalSequence::occurrences() line 23
- function-call
array_filterline 24 - method-call TerminalSequence::range() line 30
- method-call WithoutRowidRule::primaryKey() line 38
public function primaryKey(TerminalSequence $sequence, int $table): TerminalSequenceAttaches a column constraint to its original carglist occurrence.
Parameters
$sequence | TerminalSequence | |
$table | int |
Returns
Test cases 2
Called from 1
Calls 4
- method-call TerminalSequence::range() line 53
- method-call TerminalSequence::child() line 54
- method-call TerminalSequence::replace() line 58
- method-call TerminalSequence::insertedFor() line 59
Test cases 9§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 3
WithoutRowidRuleTest::testPrimaryKeyLeavesASequenceWithoutAColumnUntouchedcovers and callsWithoutRowidRuleTest::testRewriteCompletesAKeyOnlyForWithoutRowidAndRetainsTheOriginalTracecovers and callsWithoutRowidRuleTest::testRewriteRemovesAutoincrementAndPreservesAnExistingPrimaryKeycovers and calls
Other tests reaching this symbol 6
MySqlProviderTestcallsPostgreSqlProviderTestcallsSqlGeneratorFactoryTestcallsGenerationContextTestcallsRewriteDefinitionsTestcallsSqliteProviderTestcalls