classZtdPdo
class ZtdPdo
extends PDO
@visibility public.PDO proxy that enforces ZTD behavior for reads and writes.
Uses delegation pattern: extends PDO for type compatibility, but delegates all operations to an inner PDO instance when using fromPdo().
Supports multiple database platforms via SessionFactory injection or auto-detection:
- MySQL (k-kinzal/ztd-query-mysql)
- PostgreSQL (k-kinzal/ztd-query-postgres)
- SQLite (k-kinzal/ztd-query-sqlite)
$native = new \PDO('sqlite::memory:');
$native->exec('CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)');
$pdo = \ZtdQuery\Adapter\Pdo\ZtdPdo::fromPdo($native);
$pdo->exec("INSERT INTO users VALUES (1, 'Alice')") // => 1
$pdo->query('SELECT name FROM users')->fetchColumn() // => 'Alice'
$native->query('SELECT COUNT(*) FROM users')->fetchColumn() // => 0Methods§
public function __construct(
string $dsn,
?string $username = null,
?string $password = null,
array<int, mixed>|null $options = null,
ZtdConfig|null $config = null,
SessionFactory|null $factory = null,
)@visibility public.Configure a new ZTD-enabled PDO wrapper.
If $factory is provided, it is used directly to create the session. If $factory is null, the factory is auto-detected from the PDO driver name.
Parameters
$dsn | string | |
$username | ?string | |
$password | ?string | |
$options | array<int, mixed>|null | Driver options, as PDO::__construct() takes them |
$config | ZtdConfig|null | How ZTD is to behave, or null for the default |
$factory | SessionFactory|null | Platform to rewrite with, or null to read it off the driver |
Throws
RuntimeException When the driver has no platform package installed$pdo = new \ZtdQuery\Adapter\Pdo\ZtdPdo('sqlite::memory:');
$pdo->isZtdEnabled() // => trueCalls 3
- static-call
PDO::__construct()line 62 - new ConnectionExecution line 63
- new
PDOline 63
public static function fromPdo(
PDO $pdo,
ZtdConfig|null $config = null,
SessionFactory|null $factory = null,
): static@visibility public.Create a ZtdPdo wrapper around an existing PDO instance.
This allows reusing an existing PDO connection instead of creating a new one. The wrapped PDO instance will be used for all database operations.
If $factory is provided, it is used directly to create the session. If $factory is null, the factory is auto-detected from the PDO driver name.
Parameters
$pdo | PDO | Connection to wrap |
$config | ZtdConfig|null | How ZTD is to behave, or null for the default |
$factory | SessionFactory|null | Platform to rewrite with, or null to read it off the driver |
Returns
static The connection, with ZTD in front of itThrows
RuntimeException When the driver has no platform package installed$pdo = \ZtdQuery\Adapter\Pdo\ZtdPdo::fromPdo(new \PDO('sqlite::memory:'));
$pdo->isZtdEnabled() // => true
$pdo->getAttribute(\PDO::ATTR_DRIVER_NAME) // => 'sqlite'Test cases 333
PdoQueryBench::benchWrapConnectioncallsPdoQueryBench::setUpcallsSqliteCorrectnessHarness::setupcallsExecutionCheck::verifycallsCaseWhereTest::testUpdateAndDeleteRestrictRowsWithCaseExpressioncallsForeignKeyCascadeTest::testForeignKeysValidateAndCascadeUpdatesAndDeletescallsForeignKeySchemaTest::testInsertWithoutColumnListIgnoresNamedForeignKeyConstraintcallsFullTextSearchTest::testMatchAgainstReadsOnlyShadowRowscallsGeneratedColumnTest::testGeneratedValuesDriveReadsAggregatesUpdatesAndDeletescallsInsertCompoundSelectTest::testInsertPreservesEveryCompoundSelectBranchcallsLoadDataTest::testLoadDataVariantsMutateOnlyTheShadowTablecallsMultiTableMutationTest::testUpdatesAndDeletesEveryListedTablecallsNativeUpsertExpressionTest::testDatabaseEvaluatesConditionalUpsertExpressioncallsNativeUpsertExpressionTest::testDatabaseEvaluatesJsonUpsertExpressioncallsNativeUpsertExpressionTest::testDatabaseEvaluatesSubqueryUpsertExpressioncallsPartitionSelectionTest::testRangePartitionSelectionMatchesShadowRowscallsPreparedUpsertTest::testPreparedOnDuplicateKeyUpdateReplacesExistingValuescallsPreparedUpsertTest::testPreparedReplaceRemovesExistingPrimaryKeycallsTemporaryTableTest::testDmlContinuesAcrossTemporaryTableLifecyclecallsUpdateDerivedSourceTest::testUpdateJoinPreservesDerivedAggregateSourcecallsUpdateDerivedSourceTest::testUpdateJoinPreservesWindowedDerivedSourcecallsUpdateEmptyStringTest::testUpdateReplacesExistingTextWithEmptyStringcallsUpdateHexLiteralTest::testUpdatePreservesIntroducedHexLiteralcallsUpdateIntervalTest::testUpdatePreservesIntervalUnitcallsUpsertRowAliasTest::testRowAliasResolvesIncomingValuesForLiteralAndPreparedUpsertscallsViewTest::testViewsReadShadowWritesAcrossFiltersJoinsAggregatesAndPreparationcallsCopyTest::testExecDelegatesUnsupportedCopyToTheSessioncallsCopyTest::testPrepareDelegatesUnsupportedCopyToTheSessioncallsCopyTest::testQueryDelegatesUnsupportedCopyToTheSessioncallsCopyTest::testStandardPdoMethodsHonorTheSessionsIgnorePolicyForCopycallsCreateTableTest::testCreateTableAndInsertcallsCreateTableTest::testCreateTableAsSelectPreservesColumnsForEmptyResultcallsCreateTableTest::testCreateTableAsSelectPreservesProjectedPostgreSqlTypescallsCreateTableTest::testCreateTableDoesNotModifyPhysicalDatabasecallsCreateTableTest::testCreateTableIfNotExistscallsCteDmlTest::testCteDefinitionsRemainVisibleToRewrittenInsertUpdateAndDeletecallsDeleteBasicTest::testDeleteAllRowsWithConditioncallsDeleteBasicTest::testDeleteDoesNotModifyPhysicalDatabasecallsDeleteBasicTest::testDeleteSingleRowcallsDoBlockTest::testDoBlockPassesThroughAndLaterShadowDmlStillWorkscallsDomainTypeTest::testDomainConstraintsAndDmlRemainNativeInTheShadowStorecallsDropTableTest::testDropTableIfExistscallsDropTableTest::testDropTableRemovesFromRegistrycallsForeignKeyCascadeTest::testForeignKeysValidateAndCascadeUpdatesAndDeletescallsFullTextSearchTest::testTextSearchFunctionsPreserveTsvectorShadowTypecallsGeneratedColumnTest::testGeneratedValuesDriveReadsAggregatesUpdatesAndDeletescallsInsertBasicTest::testInsertDoesNotModifyPhysicalDatabasecallsInsertBasicTest::testInsertSelectPreservesExpressionsDistinctAndWindowscallsInsertBasicTest::testMultiRowInsertcallsInsertBasicTest::testOmittedExplicitAndDefaultValuesMatchPostgreSqlcallsInsertBasicTest::testSerialUsesShadowSequenceWithoutAdvancingPhysicalSequencecallsInsertBasicTest::testSingleRowInsertcallsInsertOnConflictTest::testConditionalOnConflictAndReturningMatchPostgrescallsInsertOnConflictTest::testOnConflictDoNothingcallsInsertOnConflictTest::testOnConflictDoUpdatecallsInsertOnConflictTest::testPreparedOnConflictDoUpdateReplacesExistingRowcallsMergeTest::testMergeSimulatesEveryActionSourceShapeAndPreparedParametercallsNativeUpsertExpressionTest::testDatabaseEvaluatesJsonUpsertExpressioncallsPartialIndexOnConflictTest::testPartialUniqueIndexUpsertsRemainInTheShadowStorecallsPartitionChildTest::testParentAndChildDmlSharePartitionedShadowRowscallsPreparedExecutionTest::testNativePositionsRemainBoundAcrossExpressionsAndMutationscallsReturningTest::testReturningAndLastInsertIdMatchPostgresDmlcallsSelectBitTypeTest::testBitStringsPreserveWidthAndOperatorscallsSelectCteTest::testMultipleCtescallsSelectCteTest::testSimpleCtecallsSelectDistinctTest::testSelectDistinctcallsSelectForUpdateTest::testForShareReturnsDatacallsSelectForUpdateTest::testForUpdateReturnsDatacallsSelectFromTest::testFromKeywordInsideExtractIsNotTreatedAsTableClausecallsSelectFromTest::testSelectAllColumnscallsSelectFromTest::testSelectSpecificColumnscallsSelectFromTest::testSelectWithAliascallsSelectFromTest::testSelectWithTableAliascallsSelectGroupByTest::testGroupByWithCountcallsSelectGroupByTest::testGroupByWithSumcallsSelectHavingTest::testHavingWithCountcallsSelectHavingTest::testHavingWithSumcallsSelectJoinTest::testCrossJoincallsSelectJoinTest::testFullJoincallsSelectJoinTest::testInnerJoincallsSelectJoinTest::testJoinWithTableWithoutPrimaryKeycallsSelectJoinTest::testLeftJoincallsSelectJoinTest::testNaturalJoincallsSelectJoinTest::testRightJoincallsSelectLimitOffsetTest::testLimitcallsSelectLimitOffsetTest::testLimitOffsetcallsSelectOrderByTest::testOrderByAsccallsSelectOrderByTest::testOrderByDesccallsSelectOrderByTest::testOrderByNullsFirstcallsSelectOrderByTest::testOrderByNullsLastcallsSelectQualifiedTableTest::testSchemaQualifiedTableReadsShadowRowscallsSelectRecursiveCteTest::testRecursiveCtecallsSelectSubqueryTest::testScalarSubquerycallsSelectSubqueryTest::testSubqueryInFromcallsSelectSubqueryTest::testSubqueryInWherecallsSelectUnionTest::testExceptcallsSelectUnionTest::testIntersectcallsSelectUnionTest::testUnioncallsSelectUnionTest::testUnionAllcallsSelectWhereTest::testWhereAndcallsSelectWhereTest::testWhereBetweencallsSelectWhereTest::testWhereComparisoncallsSelectWhereTest::testWhereEqualitycallsSelectWhereTest::testWhereIncallsSelectWhereTest::testWhereLikecallsSelectWindowTest::testRankPartitionBycallsSelectWindowTest::testRowNumbercallsSelectWindowTest::testSumOvercallsTableSampleTest::testTableSampleUsesShadowRowscallsTemporaryTableTest::testDmlContinuesAcrossTemporaryTableLifecyclecallsTruncateTest::testTruncateDoesNotModifyPhysicalDatabasecallsTruncateTest::testTruncateMultipleTablescallsTruncateTest::testTruncateTablecallsTruncateTest::testTruncateWithoutTableKeywordcallsUpdateBasicTest::testUpdateDoesNotModifyPhysicalDatabasecallsUpdateBasicTest::testUpdateMultipleColumnscallsUpdateBasicTest::testUpdateReplacesExistingTextWithEmptyStringcallsUpdateBasicTest::testUpdateSetPreservesFromKeywordsInsideFunctionscallsUpdateBasicTest::testUpdateSingleRowcallsUpdateBasicTest::testUpdateWithGroupedInSubquerycallsViewTest::testViewsReadShadowWritesAcrossFiltersJoinsAggregatesAndPreparationcallsPostgreSqlCteShadowingTest::testArrayAndBinaryValuesRetainNativeTypescallsPostgreSqlCteShadowingTest::testCommentsRemainLexicalWhitespaceAcrossPostgreSqlMutationscallsPostgreSqlCteShadowingTest::testDeleteDoesNotModifyPhysicalDatabasecallsPostgreSqlCteShadowingTest::testDisableZtdBypassesRewritingcallsPostgreSqlCteShadowingTest::testEnableDisableTogglecallsPostgreSqlCteShadowingTest::testInsertDoesNotModifyPhysicalDatabasecallsPostgreSqlCteShadowingTest::testInsertIsVisibleViaZtdSelectcallsPostgreSqlCteShadowingTest::testInsertWithoutColumnListSupportsConstraintKeywordPrefixescallsPostgreSqlCteShadowingTest::testJsonExistenceOperatorsRemainDistinctFromPlaceholderscallsPostgreSqlCteShadowingTest::testMultipleInsertsAccumulatecallsPostgreSqlCteShadowingTest::testPhysicalDatabaseRemainsUnchangedAfterMutationscallsPostgreSqlCteShadowingTest::testPostgreSqlQuotedStringFormsPreserveWhereOffsetscallsPostgreSqlCteShadowingTest::testPreparedBooleanAndBigIntValuesRetainTheirTypescallsPostgreSqlCteShadowingTest::testQuotedInsertSourceKeywordsRemainIdentifierscallsPostgreSqlCteShadowingTest::testSelectOnCleanShadowReturnsEmptycallsPostgreSqlCteShadowingTest::testSelectWithWhereOnShadowDatacallsPostgreSqlCteShadowingTest::testUpdateDoesNotModifyPhysicalDatabasecallsPostgreSqlDriverDetectionTest::testAutoDetectionCreatesPgSqlSessioncallsPostgreSqlDriverDetectionTest::testCustomConfigPassedToSessioncallsPostgreSqlDriverDetectionTest::testExplicitSessionFactoryInjectioncallsAlterTableTest::testAddColumnMigratesExistingRowsAndDefaultsFutureRowscallsAlterTableTest::testRenameAndDropColumnMigrateStoredRowscallsAlterTableTest::testRenameTableMovesSchemaAndRowsWithoutTouchingPhysicalTablecallsCreateTableTest::testCreateTableAndInsertcallsCreateTableTest::testCreateTableDoesNotModifyPhysicalDatabasecallsCreateTableTest::testCreateTableIfNotExistscallsCteDmlTest::testCteDefinitionsRemainVisibleToRewrittenInsertUpdateAndDeletecallsDeleteBasicTest::testDeleteAllRowsWithConditioncallsDeleteBasicTest::testDeleteDoesNotModifyPhysicalDatabasecallsDeleteBasicTest::testDeleteSingleRowcallsDeleteBasicTest::testDeleteWithConditioncallsDeleteBasicTest::testDeleteWithGroupedInSubquerycallsDiagnosticStatementTest::testExplainQueryPlanExecutesAgainstPhysicalDatabasecallsDropTableTest::testDropTableIfExistscallsDropTableTest::testDropTableRemovesFromRegistrycallsExecutionResultTest::testPreparedReturningAndLastInsertIdTrackShadowIdentitycallsExecutionResultTest::testReturningProjectsInsertUpdateAndDeleteRowscallsExecutionResultTest::testRowCountUsesNativeMatchedRowConventioncallsForeignKeyCascadeTest::testForeignKeysValidateAndCascadeUpdatesAndDeletescallsFullTextSearchTest::testFts5SearchReadsOnlyShadowRowscallsGeneratedColumnTest::testGeneratedValuesDriveReadsAggregatesUpdatesAndDeletescallsIndexHintTest::testDeleteIndexedByMutatesShadowRowscallsIndexHintTest::testPreparedSelectIndexedByReadsShadowRowscallsIndexHintTest::testSelectIndexedByReadsShadowRowscallsIndexHintTest::testSelectNotIndexedReadsShadowRowscallsIndexHintTest::testUpdateIndexedByMutatesShadowRowscallsInMemoryAttachTest::testInMemoryDatabaseIsAttachedToPhysicalConnectioncallsInMemoryAttachTest::testPersistentDatabaseAttachIsRejectedcallsInsertBasicTest::testInsertDoesNotModifyPhysicalDatabasecallsInsertBasicTest::testInsertSelectPreservesExpressionsDistinctAndWindowscallsInsertBasicTest::testMultiRowInsertcallsInsertBasicTest::testOmittedColumnsAndDefaultValuesMatchSqlitecallsInsertBasicTest::testOmittedIntegerPrimaryKeyUsesShadowIdentitycallsInsertBasicTest::testSingleRowInsertcallsInsertOrIgnoreTest::testInsertOrIgnoreDuplicateKeycallsInsertOrIgnoreTest::testInsertOrIgnoreNewRowcallsInsertOrIgnoreTest::testInsertOrIgnoreUsesUniqueCandidateKeyAndNullSemanticscallsInsertOrReplaceTest::testInsertOrReplacecallsInsertOrReplaceTest::testPreparedInsertOrReplaceRemovesExistingPrimaryKeycallsInsertOrReplaceTest::testReplaceIntocallsInsertOrReplaceTest::testReplaceRemovesRowsConflictingWithPrimaryAndUniqueKeyscallsMultiStatementExecTest::testExecProcessesStatementsAgainstEachPrecedingShadowStatecallsMultiStatementExecTest::testTransactionStatementsInBatchControlShadowRollbackcallsNativeUpsertExpressionTest::testDatabaseEvaluatesJsonUpsertExpressioncallsPreparedExecutionTest::testPreparedExpressionsAndReexecutionUseCurrentTypedShadowRowscallsPreparedExecutionTest::testPreparedInsertCanBeUpdatedAndObservedByRepreparedSelectcallsSelectCteTest::testMultipleCtesAreSupportedcallsSelectCteTest::testSimpleCtecallsSelectCteTest::testUserCteMayOwnTheSameNameAsAPhysicalTablecallsSelectDistinctTest::testSelectDistinctcallsSelectFromTest::testSelectAllColumnscallsSelectFromTest::testSelectSpecificColumnscallsSelectFromTest::testSelectWithAliascallsSelectFromTest::testSelectWithTableAliascallsSelectGroupByTest::testGroupByWithCountcallsSelectGroupByTest::testGroupByWithMinMaxcallsSelectGroupByTest::testGroupByWithSumcallsSelectHavingTest::testHavingWithCountcallsSelectHavingTest::testHavingWithSumcallsSelectJoinTest::testCrossJoincallsSelectJoinTest::testInnerJoincallsSelectJoinTest::testLeftJoincallsSelectJoinTest::testNaturalJoincallsSelectLimitOffsetTest::testLimitcallsSelectLimitOffsetTest::testLimitOffsetcallsSelectLimitOffsetTest::testLimitZerocallsSelectOrderByTest::testOrderByAsccallsSelectOrderByTest::testOrderByDesccallsSelectOrderByTest::testOrderByMultipleColumnscallsSelectQualifiedTableTest::testMainQualifiedTableReadsShadowRowscallsSelectRecursiveCteTest::testRecursiveCtecallsSelectSubqueryTest::testScalarSubquerycallsSelectSubqueryTest::testSubqueryInFromcallsSelectSubqueryTest::testSubqueryInWherecallsSelectTableScopeTest::testDerivedAggregateReadsShadowRowscallsSelectTableScopeTest::testDerivedJoinReadsEveryNestedShadowRelationcallsSelectTableScopeTest::testExistsSubqueryInSelectListReadsShadowRowscallsSelectTableScopeTest::testNestedUnionBranchesReadShadowRowscallsSelectTableScopeTest::testScalarSubqueryAndUserCteReadNestedShadowRelationcallsSelectTableScopeTest::testTableValuedFunctionIsNotTreatedAsUnknownTablecallsSelectUnionTest::testExceptcallsSelectUnionTest::testIntersectcallsSelectUnionTest::testUnioncallsSelectUnionTest::testUnionAllcallsSelectWhereTest::testWhereAndcallsSelectWhereTest::testWhereBetweencallsSelectWhereTest::testWhereComparisoncallsSelectWhereTest::testWhereEqualitycallsSelectWhereTest::testWhereIncallsSelectWhereTest::testWhereIsNullcallsSelectWhereTest::testWhereLikecallsSelectWhereTest::testWhereOrcallsSelectWindowTest::testRankPartitionBycallsSelectWindowTest::testRowNumbercallsSelectWindowTest::testSumOvercallsStrictTableTest::testStrictTableSupportsPreparedAndLiteralDmlcallsTemporaryTableTest::testDmlContinuesAcrossTemporaryTableLifecyclecallsTemporaryTableTest::testTemporaryTableCreatedBeforeWrappingIsReflectedcallsTransactionTest::testRollbackRestoresInsertUpdateAndDeleteTogethercallsTransactionTest::testRollbackRestoresVirtualSchemaRegistrycallsTransactionTest::testRollbackToSavepointRestoresOnlyNestedMutationscallsTransactionTest::testSqlTransactionStatementsUseTheSameShadowSnapshotscallsUpdateBasicTest::testPrimaryKeyChangesAndColumnSwapsRetainOriginalRowIdentitycallsUpdateBasicTest::testUpdateDoesNotModifyPhysicalDatabasecallsUpdateBasicTest::testUpdateMultipleColumnscallsUpdateBasicTest::testUpdateSingleRowcallsUpdateBasicTest::testUpdateWithGroupedInSubquerycallsUpdateScopeTest::testUpdateFromReadsJoinedShadowRowscallsUpdateScopeTest::testUpdateTargetAliasQualifiesSelectionScopecallsUpsertExpressionTest::testConditionalUpsertAndReturningMatchNativeSqlitecallsUpsertExpressionTest::testSelfReferencingUpsertMatchesNativeSqlitecallsViewTest::testViewsReadShadowWritesAcrossFiltersJoinsAggregatesAndPreparationcallsSqliteCteShadowingTest::testBinaryPreparedValueRoundTripsThroughShadowCtecallsSqliteCteShadowingTest::testCommentsRemainLexicalWhitespaceAcrossSqliteMutationscallsSqliteCteShadowingTest::testDeleteAllShadowDatacallsSqliteCteShadowingTest::testDeleteDoesNotModifyPhysicalDatabasecallsSqliteCteShadowingTest::testDeleteIsVisibleViaZtdSelectcallsSqliteCteShadowingTest::testDeleteShadowDatacallsSqliteCteShadowingTest::testDisableZtdBypassesRewritingcallsSqliteCteShadowingTest::testEnableDisableTogglecallsSqliteCteShadowingTest::testInsertDoesNotModifyPhysicalDatabasecallsSqliteCteShadowingTest::testInsertIsVisibleViaZtdSelectcallsSqliteCteShadowingTest::testInsertThenUpdateThenSelectRoundtripcallsSqliteCteShadowingTest::testInsertWithNullValuescallsSqliteCteShadowingTest::testInsertWithoutColumnListSupportsConstraintKeywordPrefixescallsSqliteCteShadowingTest::testMultipleInsertsAccumulatecallsSqliteCteShadowingTest::testMultipleInsertsExactRowComparisoncallsSqliteCteShadowingTest::testPhysicalDatabaseRemainsUnchangedAfterMutationscallsSqliteCteShadowingTest::testPreparedStatementSelectNonExistentcallsSqliteCteShadowingTest::testPreparedStatementSelectWithZtdcallsSqliteCteShadowingTest::testQuotedInsertSourceKeywordsRemainIdentifierscallsSqliteCteShadowingTest::testRealValuesRetainRoundTripPrecisioncallsSqliteCteShadowingTest::testSelectOnCleanShadowReturnsEmptycallsSqliteCteShadowingTest::testSelectWithWhereOnShadowDatacallsSqliteCteShadowingTest::testShadowValuesRetainSqliteStorageClassescallsSqliteCteShadowingTest::testSqliteStringLiteralsDoNotCreateTableReferencescallsSqliteCteShadowingTest::testUpdateDoesNotModifyPhysicalDatabasecallsSqliteCteShadowingTest::testUpdateIsVisibleViaZtdSelectcallsSqliteCteShadowingTest::testUpdateShadowDatacallsSqliteDriverDetectionTest::testAutoDetectionCreatesSqliteSessioncallsSqliteDriverDetectionTest::testCustomConfigPassedToSessioncallsSqliteDriverDetectionTest::testExplicitSessionFactoryInjectioncallsSqliteErrorHandlingTest::testLateTableMutationRespectsExceptionBehaviorcallsSqliteErrorHandlingTest::testLateTableUpdateAndDeletePassThroughByDefaultcallsSqliteErrorHandlingTest::testPreparedStatementInsertAndSelectcallsSqliteErrorHandlingTest::testPreparedStatementWithBindValuecallsSqliteErrorHandlingTest::testRowsFromLateTableInsertDoNotBypassPassthroughBehaviorcallsSqliteErrorHandlingTest::testUnsupportedSqlWithExceptionBehaviorcallsSqliteErrorHandlingTest::testUnsupportedSqlWithIgnoreBehaviorcallsSqliteErrorHandlingTest::testUnsupportedSqlWithNoticeBehaviorcallsZtdPdoStatementTest::testBindParamSurvivesPreparedStatementRecompilationcallsZtdPdoStatementTest::testBindValueSurvivesPreparedStatementRecompilationcallsZtdPdoStatementTest::testBufferedColumnFetchAllReturnsEveryRowcallsZtdPdoStatementTest::testBufferedColumnFetchDefaultsToTheFirstColumnAndThenExhaustscallsZtdPdoStatementTest::testBufferedObjectHydrationUsesDeclaredPropertiescallsZtdPdoStatementTest::testExecuteAndPostProcessLetsZtdReadWhatTheStatementAnsweredcallsZtdPdoStatementTest::testFetchAllAnswersEveryBufferedRowAndNotJustTheFirstcallsZtdPdoStatementTest::testFetchAllAnswersEveryBufferedRowInTheModeItIsAskedcallsZtdPdoStatementTest::testFetchAllAnswersFalseForAColumnTheBufferedRowDoesNotHoldcallsZtdPdoStatementTest::testFetchAllAnswersOneColumnWhereOnlyOneIsAskedcallsZtdPdoStatementTest::testFetchAnswersFalseOnceTheBufferedRowsRunOutcallsZtdPdoStatementTest::testFetchAnswersOneBufferedRowAtATimecallsZtdPdoStatementTest::testFetchColumnAnswersTheColumnAskedForInTheBufferedRowcallsZtdPdoStatementTest::testFetchObjectAnswersFalseWhereThereIsNoBufferedRowLeftcallsZtdPdoStatementTest::testFetchObjectBuildsAnObjectOutOfTheBufferedRowcallsZtdPdoStatementTest::testGetIteratorWalksTheRowsZtdBufferedcallsZtdPdoStatementTest::testPassthroughFetchAllForwardsConstructorArgumentscallsZtdPdoStatementTest::testSetFetchModeIsRememberedAcrossARepreparecallsZtdPdoStatementTest::testSimulatedWritesWithoutReturningHaveNoFetchableRowscallsZtdPdoTest::testAutoDetectionForSqliteDrivercallsZtdPdoTest::testBeginTransactionOpensOneOnTheShadowAsWellAsTheDatabasecallsZtdPdoTest::testCommitKeepsWhatTheTransactionWroteToTheShadowcallsZtdPdoTest::testDisableZtdLetsStatementsReachTheDatabasecallsZtdPdoTest::testEnableZtdPutsTheShadowBackInFrontOfTheDatabasecallsZtdPdoTest::testErrorCodeAnswersWhatTheDriverSaysWentWrongLastcallsZtdPdoTest::testErrorInfoAnswersWhatTheDriverSaysAboutTheLastFailurecallsZtdPdoTest::testExecBatchReturnsTheLastStatementCountcallsZtdPdoTest::testExplicitPlatformFactoryCreatesAnIsolatedSessioncallsZtdPdoTest::testFromPdoRetainsTheExistingConnectionAndItsOptionscallsZtdPdoTest::testGetAttributeReadsTheAttributeOffTheConnectionItWrapscallsZtdPdoTest::testInTransactionSaysNothingIsOpenBeforeOneIsBeguncallsZtdPdoTest::testIsZtdEnabledSaysWritesAreShadowedFromTheStartcallsZtdPdoTest::testLastInsertIdAnswersTheKeyTheShadowGaveTheRowItWrotecallsZtdPdoTest::testPrepareAnswersAStatementThatShadowsWhatItIsRunWithcallsZtdPdoTest::testPrepareHandsTheStatementStraightToPdoWhileZtdIsOffcallsZtdPdoTest::testPrepareWrapsUnsupportedStatementsForPdoConsumerscallsZtdPdoTest::testQueryReadsBackWhatWasWrittenThroughZtdcallsZtdPdoTest::testQueryReadsInTheFetchModeItIsGivencallsZtdPdoTest::testQueryReadsTheShadowRatherThanTheTablecallsZtdPdoTest::testQuoteWritesAValueTheWayTheDriverWouldQuoteItcallsZtdPdoTest::testRollBackTakesBackWhatTheTransactionWroteToTheShadowcallsZtdPdoTest::testSetAttributeSetsTheAttributeOnTheConnectionItWrapscalls
Called from 1
Calls 4
- method-call
ReflectionClass::newInstanceWithoutConstructor()line 91 - new
ReflectionClassline 91 - class-const ZtdPdo::class() line 91
- new ConnectionExecution line 92
public function enableZtd(): void@visibility public.Enable ZTD mode for this connection.
While it is enabled, nothing this connection is asked to write reaches the database; reads are answered from the shadow instead.
$pdo = \ZtdQuery\Adapter\Pdo\ZtdPdo::fromPdo(new \PDO('sqlite::memory:'));
$pdo->disableZtd();
$pdo->enableZtd();
$pdo->isZtdEnabled() // => trueCalls 1
- method-call ConnectionExecution::session() line 110
public function disableZtd(): void@visibility public.Disable ZTD mode for this connection.
Once it is disabled, statements run against the database as they were written, and the shadow is not consulted.
$pdo = new \ZtdQuery\Adapter\Pdo\ZtdPdo('sqlite::memory:');
$pdo->disableZtd();
$pdo->isZtdEnabled() // => false
$pdo->enableZtd();
$pdo->isZtdEnabled() // => trueCalls 1
- method-call ConnectionExecution::session() line 129
public function isZtdEnabled(): bool@visibility public.Check whether ZTD mode is enabled.
Returns
bool Whether writes are being shadowed rather than carried out$pdo = \ZtdQuery\Adapter\Pdo\ZtdPdo::fromPdo(new \PDO('sqlite::memory:'));
$pdo->isZtdEnabled() // => trueTest cases 2
Calls 1
- method-call ConnectionExecution::session() line 143
public function prepare(string $query, array<mixed> $options = []): PDOStatement|false@visibility public.{@inheritDoc}
Parameters
$query | string | |
$options | array<mixed> | Driver options, as PDO::prepare() takes them |
Returns
PDOStatement|false The prepared statement, or false where the driver would not prepare oneThrows
ZtdPdoException When ZTD cannot carry the statement out, or an option is one PDO cannot be given$native = new \PDO('sqlite::memory:');
$native->exec('CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)');
$pdo = \ZtdQuery\Adapter\Pdo\ZtdPdo::fromPdo($native);
$statement = $pdo->prepare('INSERT INTO users VALUES (:id, :name)');
$statement->execute(['id' => 1, 'name' => 'Alice']) // => true
$statement->rowCount() // => 1
$native->query('SELECT COUNT(*) FROM users')->fetchColumn() // => 0Test cases 1
PdoQueryBench::setUpcalls
Called from 1
Calls 2
- method-call ConnectionExecution::prepare() line 168
- new ZtdPdoStatement line 172
public function query(
string $query,
?int $fetchMode = null,
mixed ...$fetchModeArgs,
): PDOStatement|false@visibility public.{@inheritDoc}
Parameters
$query | string | |
$fetchMode | ?int | |
$fetchModeArgs | mixed | The rest of what the fetch mode reads |
Returns
PDOStatement|false The executed statement, or false where it did not runThrows
ZtdPdoException When ZTD cannot carry the statement out$native = new \PDO('sqlite::memory:');
$native->exec('CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)');
$pdo = \ZtdQuery\Adapter\Pdo\ZtdPdo::fromPdo($native);
$pdo->exec("INSERT INTO users VALUES (1, 'Ada')");
$pdo->query('SELECT name FROM users')->fetchColumn() // => 'Ada'
$native->query('SELECT COUNT(*) FROM users')->fetchColumn() // => 0Test cases 1
Calls 2
- method-call ConnectionExecution::query() line 196
- method-call ZtdPdo::prepare() line 196
public function exec(string $statement): int|false@visibility public.{@inheritDoc}
A batch is carried out one statement at a time, and stops at the first one that does not run; what it answers is what the last one that ran affected, which is what PDO answers for a batch.
Parameters
$statement | string |
Returns
int|false Rows the statement affected, or false where it did not runThrows
ZtdPdoException When ZTD cannot carry the statement out$native = new \PDO('sqlite::memory:');
$native->exec('CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)');
$pdo = \ZtdQuery\Adapter\Pdo\ZtdPdo::fromPdo($native);
$pdo->exec("INSERT INTO users VALUES (1, 'Ada')") // => 1
$pdo->exec("UPDATE users SET name = 'Grace'") // => 1
$native->query('SELECT COUNT(*) FROM users')->fetchColumn() // => 0Test cases 1
PdoQueryBench::setUpcalls
Called from 1
Calls 2
- method-call ConnectionExecution::exec() line 221
- method-call ZtdPdo::exec() line 221
public static function connect(
string $dsn,
?string $username = null,
?string $password = null,
array<mixed>|null $options = null,
): static@visibility public.{@inheritDoc}
The connection is opened with PDO's constructor rather than with PDO::connect(), which exists only from PHP 8.4 on while this package supports 8.1. What connect() adds is a driver-specific subclass of PDO, and nothing here asks the wrapped connection for anything a subclass would answer differently.
This carries no #[\Override] for the same reason: from PHP 8.3 on the attribute is checked, and on 8.1 through 8.3 there is no PDO::connect() for it to be checked against.
Parameters
$dsn | string | |
$username | ?string | |
$password | ?string | |
$options | array<mixed>|null | Driver options, as PDO::connect() takes them |
Returns
static The new connection, with ZTD in front of itThrows
RuntimeException When the driver has no platform package installed$pdo = \ZtdQuery\Adapter\Pdo\ZtdPdo::connect('sqlite::memory:');
$pdo->isZtdEnabled() // => trueTest cases 1
Calls 2
- static-call ZtdPdo::fromPdo() line 253
- new
PDOline 253
public function beginTransaction(): bool@visibility public.{@inheritDoc}
Returns
bool$pdo = \ZtdQuery\Adapter\Pdo\ZtdPdo::fromPdo(new \PDO('sqlite::memory:'));
$pdo->beginTransaction() // => true
$pdo->inTransaction() // => true
$pdo->rollBack();Calls 1
- method-call ConnectionExecution::beginTransaction() line 268
public function commit(): bool@visibility public.{@inheritDoc}
Returns
bool$native = new \PDO('sqlite::memory:');
$native->exec('CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)');
$pdo = \ZtdQuery\Adapter\Pdo\ZtdPdo::fromPdo($native);
$pdo->beginTransaction();
$pdo->exec("INSERT INTO users VALUES (1, 'Ada')");
$pdo->commit() // => true
$pdo->query('SELECT COUNT(*) FROM users')->fetchColumn() // => 1
$native->query('SELECT COUNT(*) FROM users')->fetchColumn() // => 0Calls 1
- method-call ConnectionExecution::commit() line 287
public function rollBack(): bool@visibility public.{@inheritDoc}
Returns
bool$native = new \PDO('sqlite::memory:');
$native->exec('CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)');
$pdo = \ZtdQuery\Adapter\Pdo\ZtdPdo::fromPdo($native);
$pdo->beginTransaction();
$pdo->exec("INSERT INTO users VALUES (1, 'Ada')");
$pdo->rollBack() // => true
$pdo->query('SELECT COUNT(*) FROM users')->fetchColumn() // => 0Calls 1
- method-call ConnectionExecution::rollBack() line 305
public function inTransaction(): bool@visibility public.{@inheritDoc}
Returns
bool$pdo = \ZtdQuery\Adapter\Pdo\ZtdPdo::fromPdo(new \PDO('sqlite::memory:'));
$pdo->inTransaction() // => false
$pdo->beginTransaction();
$pdo->inTransaction() // => true
$pdo->rollBack();Calls 1
- method-call ConnectionExecution::native() line 321
public function lastInsertId(?string $name = null): string|false@visibility public.{@inheritDoc}
Parameters
$name | ?string |
Returns
string|false$native = new \PDO('sqlite::memory:');
$native->exec('CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)');
$pdo = \ZtdQuery\Adapter\Pdo\ZtdPdo::fromPdo($native);
$pdo->exec("INSERT INTO users (name) VALUES ('Ada')");
$pdo->lastInsertId() // => '1'Calls 1
- method-call ConnectionExecution::lastInsertId() line 337
public function errorCode(): ?string@visibility public.{@inheritDoc}
Returns
?string$pdo = \ZtdQuery\Adapter\Pdo\ZtdPdo::fromPdo(new \PDO('sqlite::memory:'));
$pdo->disableZtd();
$pdo->query('SELECT 1');
$pdo->errorCode() // => '00000'Calls 1
- method-call ConnectionExecution::native() line 352
public function errorInfo(): array{0: string|null, 1: int|null, 2: string|null}@visibility public.{@inheritDoc}
Returns
array{0: string|null, 1: int|null, 2: string|null}$pdo = \ZtdQuery\Adapter\Pdo\ZtdPdo::fromPdo(new \PDO('sqlite::memory:'));
$pdo->disableZtd();
$pdo->query('SELECT 1');
$pdo->errorInfo()[0] // => '00000'Calls 1
- method-call ConnectionExecution::native() line 370
public function getAttribute(int $attribute): mixed@visibility public.{@inheritDoc}
Parameters
$attribute | int |
Returns
mixed$pdo = \ZtdQuery\Adapter\Pdo\ZtdPdo::fromPdo(new \PDO('sqlite::memory:'));
$pdo->getAttribute(\PDO::ATTR_DRIVER_NAME) // => 'sqlite'Calls 1
- method-call ConnectionExecution::native() line 383
public function setAttribute(int $attribute, mixed $value): bool@visibility public.{@inheritDoc}
Parameters
$attribute | int | |
$value | mixed |
Returns
bool$pdo = \ZtdQuery\Adapter\Pdo\ZtdPdo::fromPdo(new \PDO('sqlite::memory:'));
$pdo->setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC) // => true
$pdo->query('SELECT 7 AS id')->fetch() // => ['id' => 7]Calls 1
- method-call ConnectionExecution::native() line 397
public function quote(string $string, int $type = PDO::PARAM_STR): string|false@visibility public.{@inheritDoc}
Parameters
$string | string | |
$type | int |
Returns
string|false$pdo = \ZtdQuery\Adapter\Pdo\ZtdPdo::fromPdo(new \PDO('sqlite::memory:'));
$pdo->quote("O'Reilly") // => "'O''Reilly'"Calls 2
- class-const
PDO::PARAM_STR()line 408 - method-call ConnectionExecution::native() line 410
public static function getAvailableDrivers(): array<int, string>@visibility public.{@inheritDoc}
Returns
array<int, string> Every driver name PDO itself was built with\ZtdQuery\Adapter\Pdo\ZtdPdo::getAvailableDrivers() === \PDO::getAvailableDrivers() // => trueTest cases 1
Calls 1
- static-call
PDO::getAvailableDrivers()line 425
Private surface 1§
Implementation details, listed for orientation only.
private ConnectionExecution $executionTest cases 348§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 26
ZtdPdoTest::testAutoDetectionForSqliteDrivercallsZtdPdoTest::testBeginTransactionOpensOneOnTheShadowAsWellAsTheDatabasecallsZtdPdoTest::testCommitKeepsWhatTheTransactionWroteToTheShadowcallsZtdPdoTest::testConnectOpensAConnectionWithZtdAlreadyInFrontOfItcallsZtdPdoTest::testDisableZtdLetsStatementsReachTheDatabasecallsZtdPdoTest::testEnableZtdPutsTheShadowBackInFrontOfTheDatabasecallsZtdPdoTest::testErrorCodeAnswersWhatTheDriverSaysWentWrongLastcallsZtdPdoTest::testErrorInfoAnswersWhatTheDriverSaysAboutTheLastFailurecallsZtdPdoTest::testExecBatchReturnsTheLastStatementCountcallsZtdPdoTest::testExplicitPlatformFactoryCreatesAnIsolatedSessioncallsZtdPdoTest::testFromPdoRetainsTheExistingConnectionAndItsOptionscallsZtdPdoTest::testGetAttributeReadsTheAttributeOffTheConnectionItWrapscallsZtdPdoTest::testGetAvailableDriversAnswersTheDriversPdoWasBuiltWithcallsZtdPdoTest::testInTransactionSaysNothingIsOpenBeforeOneIsBeguncallsZtdPdoTest::testIsZtdEnabledSaysWritesAreShadowedFromTheStartcallsZtdPdoTest::testLastInsertIdAnswersTheKeyTheShadowGaveTheRowItWrotecallsZtdPdoTest::testPrepareAnswersAStatementThatShadowsWhatItIsRunWithcallsZtdPdoTest::testPrepareHandsTheStatementStraightToPdoWhileZtdIsOffcallsZtdPdoTest::testPrepareWrapsUnsupportedStatementsForPdoConsumerscallsZtdPdoTest::testPublicApiAdaptsPdoWithoutAddingDriverSpecificOperationscallsZtdPdoTest::testQueryReadsBackWhatWasWrittenThroughZtdcallsZtdPdoTest::testQueryReadsInTheFetchModeItIsGivencallsZtdPdoTest::testQueryReadsTheShadowRatherThanTheTablecallsZtdPdoTest::testQuoteWritesAValueTheWayTheDriverWouldQuoteItcallsZtdPdoTest::testRollBackTakesBackWhatTheTransactionWroteToTheShadowcallsZtdPdoTest::testSetAttributeSetsTheAttributeOnTheConnectionItWrapscalls
Other tests reaching this symbol 322
PdoQueryBench::benchQuerycallsPdoQueryBench::benchWrapConnectioncallsPdoQueryBench::setUpcallsCorrectnessHarness::setupcallsPgCorrectnessHarness::setupcallsSqliteCorrectnessHarness::setupcallsExecutionCheck::verifycallsCaseWhereTest::testUpdateAndDeleteRestrictRowsWithCaseExpressioncallsForeignKeyCascadeTest::testForeignKeysValidateAndCascadeUpdatesAndDeletescallsForeignKeySchemaTest::testInsertWithoutColumnListIgnoresNamedForeignKeyConstraintcallsFullTextSearchTest::testMatchAgainstReadsOnlyShadowRowscallsGeneratedColumnTest::testGeneratedValuesDriveReadsAggregatesUpdatesAndDeletescallsInsertCompoundSelectTest::testInsertPreservesEveryCompoundSelectBranchcallsLoadDataTest::testLoadDataVariantsMutateOnlyTheShadowTablecallsMultiTableMutationTest::testUpdatesAndDeletesEveryListedTablecallsNativeUpsertExpressionTest::testDatabaseEvaluatesConditionalUpsertExpressioncallsNativeUpsertExpressionTest::testDatabaseEvaluatesJsonUpsertExpressioncallsNativeUpsertExpressionTest::testDatabaseEvaluatesSubqueryUpsertExpressioncallsPartitionSelectionTest::testRangePartitionSelectionMatchesShadowRowscallsPreparedUpsertTest::testPreparedOnDuplicateKeyUpdateReplacesExistingValuescallsPreparedUpsertTest::testPreparedReplaceRemovesExistingPrimaryKeycallsTemporaryTableTest::testDmlContinuesAcrossTemporaryTableLifecyclecallsUpdateDerivedSourceTest::testUpdateJoinPreservesDerivedAggregateSourcecallsUpdateDerivedSourceTest::testUpdateJoinPreservesWindowedDerivedSourcecallsUpdateEmptyStringTest::testUpdateReplacesExistingTextWithEmptyStringcallsUpdateHexLiteralTest::testUpdatePreservesIntroducedHexLiteralcallsUpdateIntervalTest::testUpdatePreservesIntervalUnitcallsUpsertRowAliasTest::testRowAliasResolvesIncomingValuesForLiteralAndPreparedUpsertscallsViewTest::testViewsReadShadowWritesAcrossFiltersJoinsAggregatesAndPreparationcallsCopyTest::testExecDelegatesUnsupportedCopyToTheSessioncallsCopyTest::testPrepareDelegatesUnsupportedCopyToTheSessioncallsCopyTest::testQueryDelegatesUnsupportedCopyToTheSessioncallsCopyTest::testStandardPdoMethodsHonorTheSessionsIgnorePolicyForCopycallsCreateTableTest::testCreateTableAndInsertcallsCreateTableTest::testCreateTableAsSelectPreservesColumnsForEmptyResultcallsCreateTableTest::testCreateTableAsSelectPreservesProjectedPostgreSqlTypescallsCreateTableTest::testCreateTableDoesNotModifyPhysicalDatabasecallsCreateTableTest::testCreateTableIfNotExistscallsCteDmlTest::testCteDefinitionsRemainVisibleToRewrittenInsertUpdateAndDeletecallsDeleteBasicTest::testDeleteAllRowsWithConditioncallsDeleteBasicTest::testDeleteDoesNotModifyPhysicalDatabasecallsDeleteBasicTest::testDeleteSingleRowcallsDoBlockTest::testDoBlockPassesThroughAndLaterShadowDmlStillWorkscallsDomainTypeTest::testDomainConstraintsAndDmlRemainNativeInTheShadowStorecallsDropTableTest::testDropTableIfExistscallsDropTableTest::testDropTableRemovesFromRegistrycallsForeignKeyCascadeTest::testForeignKeysValidateAndCascadeUpdatesAndDeletescallsFullTextSearchTest::testTextSearchFunctionsPreserveTsvectorShadowTypecallsGeneratedColumnTest::testGeneratedValuesDriveReadsAggregatesUpdatesAndDeletescallsInsertBasicTest::testInsertDoesNotModifyPhysicalDatabasecallsInsertBasicTest::testInsertSelectPreservesExpressionsDistinctAndWindowscallsInsertBasicTest::testMultiRowInsertcallsInsertBasicTest::testOmittedExplicitAndDefaultValuesMatchPostgreSqlcallsInsertBasicTest::testSerialUsesShadowSequenceWithoutAdvancingPhysicalSequencecallsInsertBasicTest::testSingleRowInsertcallsInsertOnConflictTest::testConditionalOnConflictAndReturningMatchPostgrescallsInsertOnConflictTest::testOnConflictDoNothingcallsInsertOnConflictTest::testOnConflictDoUpdatecallsInsertOnConflictTest::testPreparedOnConflictDoUpdateReplacesExistingRowcallsMergeTest::testMergeSimulatesEveryActionSourceShapeAndPreparedParametercallsNativeUpsertExpressionTest::testDatabaseEvaluatesJsonUpsertExpressioncallsPartialIndexOnConflictTest::testPartialUniqueIndexUpsertsRemainInTheShadowStorecallsPartitionChildTest::testParentAndChildDmlSharePartitionedShadowRowscallsPreparedExecutionTest::testNativePositionsRemainBoundAcrossExpressionsAndMutationscallsReturningTest::testReturningAndLastInsertIdMatchPostgresDmlcallsSelectBitTypeTest::testBitStringsPreserveWidthAndOperatorscallsSelectCteTest::testMultipleCtescallsSelectCteTest::testSimpleCtecallsSelectDistinctTest::testSelectDistinctcallsSelectForUpdateTest::testForShareReturnsDatacallsSelectForUpdateTest::testForUpdateReturnsDatacallsSelectFromTest::testFromKeywordInsideExtractIsNotTreatedAsTableClausecallsSelectFromTest::testSelectAllColumnscallsSelectFromTest::testSelectSpecificColumnscallsSelectFromTest::testSelectWithAliascallsSelectFromTest::testSelectWithTableAliascallsSelectGroupByTest::testGroupByWithCountcallsSelectGroupByTest::testGroupByWithSumcallsSelectHavingTest::testHavingWithCountcallsSelectHavingTest::testHavingWithSumcallsSelectJoinTest::testCrossJoincallsSelectJoinTest::testFullJoincallsSelectJoinTest::testInnerJoincallsSelectJoinTest::testJoinWithTableWithoutPrimaryKeycallsSelectJoinTest::testLeftJoincallsSelectJoinTest::testNaturalJoincallsSelectJoinTest::testRightJoincallsSelectLimitOffsetTest::testLimitcallsSelectLimitOffsetTest::testLimitOffsetcallsSelectOrderByTest::testOrderByAsccallsSelectOrderByTest::testOrderByDesccallsSelectOrderByTest::testOrderByNullsFirstcallsSelectOrderByTest::testOrderByNullsLastcallsSelectQualifiedTableTest::testSchemaQualifiedTableReadsShadowRowscallsSelectRecursiveCteTest::testRecursiveCtecallsSelectSubqueryTest::testScalarSubquerycallsSelectSubqueryTest::testSubqueryInFromcallsSelectSubqueryTest::testSubqueryInWherecallsSelectUnionTest::testExceptcallsSelectUnionTest::testIntersectcallsSelectUnionTest::testUnioncallsSelectUnionTest::testUnionAllcallsSelectWhereTest::testWhereAndcallsSelectWhereTest::testWhereBetweencallsSelectWhereTest::testWhereComparisoncallsSelectWhereTest::testWhereEqualitycallsSelectWhereTest::testWhereIncallsSelectWhereTest::testWhereLikecallsSelectWindowTest::testRankPartitionBycallsSelectWindowTest::testRowNumbercallsSelectWindowTest::testSumOvercallsTableSampleTest::testTableSampleUsesShadowRowscallsTemporaryTableTest::testDmlContinuesAcrossTemporaryTableLifecyclecallsTruncateTest::testTruncateDoesNotModifyPhysicalDatabasecallsTruncateTest::testTruncateMultipleTablescallsTruncateTest::testTruncateTablecallsTruncateTest::testTruncateWithoutTableKeywordcallsUpdateBasicTest::testUpdateDoesNotModifyPhysicalDatabasecallsUpdateBasicTest::testUpdateMultipleColumnscallsUpdateBasicTest::testUpdateReplacesExistingTextWithEmptyStringcallsUpdateBasicTest::testUpdateSetPreservesFromKeywordsInsideFunctionscallsUpdateBasicTest::testUpdateSingleRowcallsUpdateBasicTest::testUpdateWithGroupedInSubquerycallsViewTest::testViewsReadShadowWritesAcrossFiltersJoinsAggregatesAndPreparationcallsPostgreSqlCteShadowingTest::testArrayAndBinaryValuesRetainNativeTypescallsPostgreSqlCteShadowingTest::testCommentsRemainLexicalWhitespaceAcrossPostgreSqlMutationscallsPostgreSqlCteShadowingTest::testDeleteDoesNotModifyPhysicalDatabasecallsPostgreSqlCteShadowingTest::testDisableZtdBypassesRewritingcallsPostgreSqlCteShadowingTest::testEnableDisableTogglecallsPostgreSqlCteShadowingTest::testInsertDoesNotModifyPhysicalDatabasecallsPostgreSqlCteShadowingTest::testInsertIsVisibleViaZtdSelectcallsPostgreSqlCteShadowingTest::testInsertWithoutColumnListSupportsConstraintKeywordPrefixescallsPostgreSqlCteShadowingTest::testJsonExistenceOperatorsRemainDistinctFromPlaceholderscallsPostgreSqlCteShadowingTest::testMultipleInsertsAccumulatecallsPostgreSqlCteShadowingTest::testPhysicalDatabaseRemainsUnchangedAfterMutationscallsPostgreSqlCteShadowingTest::testPostgreSqlQuotedStringFormsPreserveWhereOffsetscallsPostgreSqlCteShadowingTest::testPreparedBooleanAndBigIntValuesRetainTheirTypescallsPostgreSqlCteShadowingTest::testQuotedInsertSourceKeywordsRemainIdentifierscallsPostgreSqlCteShadowingTest::testSelectOnCleanShadowReturnsEmptycallsPostgreSqlCteShadowingTest::testSelectWithWhereOnShadowDatacallsPostgreSqlCteShadowingTest::testUpdateDoesNotModifyPhysicalDatabasecallsPostgreSqlDriverDetectionTest::testAutoDetectionCreatesPgSqlSessioncallsPostgreSqlDriverDetectionTest::testCustomConfigPassedToSessioncallsPostgreSqlDriverDetectionTest::testExplicitSessionFactoryInjectioncallsAlterTableTest::testAddColumnMigratesExistingRowsAndDefaultsFutureRowscallsAlterTableTest::testRenameAndDropColumnMigrateStoredRowscallsAlterTableTest::testRenameTableMovesSchemaAndRowsWithoutTouchingPhysicalTablecallsCreateTableTest::testCreateTableAndInsertcallsCreateTableTest::testCreateTableDoesNotModifyPhysicalDatabasecallsCreateTableTest::testCreateTableIfNotExistscallsCteDmlTest::testCteDefinitionsRemainVisibleToRewrittenInsertUpdateAndDeletecallsDeleteBasicTest::testDeleteAllRowsWithConditioncallsDeleteBasicTest::testDeleteDoesNotModifyPhysicalDatabasecallsDeleteBasicTest::testDeleteSingleRowcallsDeleteBasicTest::testDeleteWithConditioncallsDeleteBasicTest::testDeleteWithGroupedInSubquerycallsDiagnosticStatementTest::testExplainQueryPlanExecutesAgainstPhysicalDatabasecallsDropTableTest::testDropTableIfExistscallsDropTableTest::testDropTableRemovesFromRegistrycallsExecutionResultTest::testPreparedReturningAndLastInsertIdTrackShadowIdentitycallsExecutionResultTest::testReturningProjectsInsertUpdateAndDeleteRowscallsExecutionResultTest::testRowCountUsesNativeMatchedRowConventioncallsForeignKeyCascadeTest::testForeignKeysValidateAndCascadeUpdatesAndDeletescallsFullTextSearchTest::testFts5SearchReadsOnlyShadowRowscallsGeneratedColumnTest::testGeneratedValuesDriveReadsAggregatesUpdatesAndDeletescallsIndexHintTest::testDeleteIndexedByMutatesShadowRowscallsIndexHintTest::testPreparedSelectIndexedByReadsShadowRowscallsIndexHintTest::testSelectIndexedByReadsShadowRowscallsIndexHintTest::testSelectNotIndexedReadsShadowRowscallsIndexHintTest::testUpdateIndexedByMutatesShadowRowscallsInMemoryAttachTest::testInMemoryDatabaseIsAttachedToPhysicalConnectioncallsInMemoryAttachTest::testPersistentDatabaseAttachIsRejectedcallsInsertBasicTest::testInsertDoesNotModifyPhysicalDatabasecallsInsertBasicTest::testInsertSelectPreservesExpressionsDistinctAndWindowscallsInsertBasicTest::testMultiRowInsertcallsInsertBasicTest::testOmittedColumnsAndDefaultValuesMatchSqlitecallsInsertBasicTest::testOmittedIntegerPrimaryKeyUsesShadowIdentitycallsInsertBasicTest::testSingleRowInsertcallsInsertOrIgnoreTest::testInsertOrIgnoreDuplicateKeycallsInsertOrIgnoreTest::testInsertOrIgnoreNewRowcallsInsertOrIgnoreTest::testInsertOrIgnoreUsesUniqueCandidateKeyAndNullSemanticscallsInsertOrReplaceTest::testInsertOrReplacecallsInsertOrReplaceTest::testPreparedInsertOrReplaceRemovesExistingPrimaryKeycallsInsertOrReplaceTest::testReplaceIntocallsInsertOrReplaceTest::testReplaceRemovesRowsConflictingWithPrimaryAndUniqueKeyscallsMultiStatementExecTest::testExecProcessesStatementsAgainstEachPrecedingShadowStatecallsMultiStatementExecTest::testTransactionStatementsInBatchControlShadowRollbackcallsNativeUpsertExpressionTest::testDatabaseEvaluatesJsonUpsertExpressioncallsPreparedExecutionTest::testPreparedExpressionsAndReexecutionUseCurrentTypedShadowRowscallsPreparedExecutionTest::testPreparedInsertCanBeUpdatedAndObservedByRepreparedSelectcallsSelectCteTest::testMultipleCtesAreSupportedcallsSelectCteTest::testSimpleCtecallsSelectCteTest::testUserCteMayOwnTheSameNameAsAPhysicalTablecallsSelectDistinctTest::testSelectDistinctcallsSelectFromTest::testSelectAllColumnscallsSelectFromTest::testSelectSpecificColumnscallsSelectFromTest::testSelectWithAliascallsSelectFromTest::testSelectWithTableAliascallsSelectGroupByTest::testGroupByWithCountcallsSelectGroupByTest::testGroupByWithMinMaxcallsSelectGroupByTest::testGroupByWithSumcallsSelectHavingTest::testHavingWithCountcallsSelectHavingTest::testHavingWithSumcallsSelectJoinTest::testCrossJoincallsSelectJoinTest::testInnerJoincallsSelectJoinTest::testLeftJoincallsSelectJoinTest::testNaturalJoincallsSelectLimitOffsetTest::testLimitcallsSelectLimitOffsetTest::testLimitOffsetcallsSelectLimitOffsetTest::testLimitZerocallsSelectOrderByTest::testOrderByAsccallsSelectOrderByTest::testOrderByDesccallsSelectOrderByTest::testOrderByMultipleColumnscallsSelectQualifiedTableTest::testMainQualifiedTableReadsShadowRowscallsSelectRecursiveCteTest::testRecursiveCtecallsSelectSubqueryTest::testScalarSubquerycallsSelectSubqueryTest::testSubqueryInFromcallsSelectSubqueryTest::testSubqueryInWherecallsSelectTableScopeTest::testDerivedAggregateReadsShadowRowscallsSelectTableScopeTest::testDerivedJoinReadsEveryNestedShadowRelationcallsSelectTableScopeTest::testExistsSubqueryInSelectListReadsShadowRowscallsSelectTableScopeTest::testNestedUnionBranchesReadShadowRowscallsSelectTableScopeTest::testScalarSubqueryAndUserCteReadNestedShadowRelationcallsSelectTableScopeTest::testTableValuedFunctionIsNotTreatedAsUnknownTablecallsSelectUnionTest::testExceptcallsSelectUnionTest::testIntersectcallsSelectUnionTest::testUnioncallsSelectUnionTest::testUnionAllcallsSelectWhereTest::testWhereAndcallsSelectWhereTest::testWhereBetweencallsSelectWhereTest::testWhereComparisoncallsSelectWhereTest::testWhereEqualitycallsSelectWhereTest::testWhereIncallsSelectWhereTest::testWhereIsNullcallsSelectWhereTest::testWhereLikecallsSelectWhereTest::testWhereOrcallsSelectWindowTest::testRankPartitionBycallsSelectWindowTest::testRowNumbercallsSelectWindowTest::testSumOvercallsStrictTableTest::testStrictTableSupportsPreparedAndLiteralDmlcallsTemporaryTableTest::testDmlContinuesAcrossTemporaryTableLifecyclecallsTemporaryTableTest::testTemporaryTableCreatedBeforeWrappingIsReflectedcallsTransactionTest::testRollbackRestoresInsertUpdateAndDeleteTogethercallsTransactionTest::testRollbackRestoresVirtualSchemaRegistrycallsTransactionTest::testRollbackToSavepointRestoresOnlyNestedMutationscallsTransactionTest::testSqlTransactionStatementsUseTheSameShadowSnapshotscallsUpdateBasicTest::testPrimaryKeyChangesAndColumnSwapsRetainOriginalRowIdentitycallsUpdateBasicTest::testUpdateDoesNotModifyPhysicalDatabasecallsUpdateBasicTest::testUpdateMultipleColumnscallsUpdateBasicTest::testUpdateSingleRowcallsUpdateBasicTest::testUpdateWithGroupedInSubquerycallsUpdateScopeTest::testUpdateFromReadsJoinedShadowRowscallsUpdateScopeTest::testUpdateTargetAliasQualifiesSelectionScopecallsUpsertExpressionTest::testConditionalUpsertAndReturningMatchNativeSqlitecallsUpsertExpressionTest::testSelfReferencingUpsertMatchesNativeSqlitecallsViewTest::testViewsReadShadowWritesAcrossFiltersJoinsAggregatesAndPreparationcallsSqliteCteShadowingTest::testBinaryPreparedValueRoundTripsThroughShadowCtecallsSqliteCteShadowingTest::testCommentsRemainLexicalWhitespaceAcrossSqliteMutationscallsSqliteCteShadowingTest::testDeleteAllShadowDatacallsSqliteCteShadowingTest::testDeleteDoesNotModifyPhysicalDatabasecallsSqliteCteShadowingTest::testDeleteIsVisibleViaZtdSelectcallsSqliteCteShadowingTest::testDeleteShadowDatacallsSqliteCteShadowingTest::testDisableZtdBypassesRewritingcallsSqliteCteShadowingTest::testEnableDisableTogglecallsSqliteCteShadowingTest::testInsertDoesNotModifyPhysicalDatabasecallsSqliteCteShadowingTest::testInsertIsVisibleViaZtdSelectcallsSqliteCteShadowingTest::testInsertThenUpdateThenSelectRoundtripcallsSqliteCteShadowingTest::testInsertWithNullValuescallsSqliteCteShadowingTest::testInsertWithoutColumnListSupportsConstraintKeywordPrefixescallsSqliteCteShadowingTest::testMultipleInsertsAccumulatecallsSqliteCteShadowingTest::testMultipleInsertsExactRowComparisoncallsSqliteCteShadowingTest::testPhysicalDatabaseRemainsUnchangedAfterMutationscallsSqliteCteShadowingTest::testPreparedStatementSelectNonExistentcallsSqliteCteShadowingTest::testPreparedStatementSelectWithZtdcallsSqliteCteShadowingTest::testQuotedInsertSourceKeywordsRemainIdentifierscallsSqliteCteShadowingTest::testRealValuesRetainRoundTripPrecisioncallsSqliteCteShadowingTest::testSelectOnCleanShadowReturnsEmptycallsSqliteCteShadowingTest::testSelectWithWhereOnShadowDatacallsSqliteCteShadowingTest::testShadowValuesRetainSqliteStorageClassescallsSqliteCteShadowingTest::testSqliteStringLiteralsDoNotCreateTableReferencescallsSqliteCteShadowingTest::testUpdateDoesNotModifyPhysicalDatabasecallsSqliteCteShadowingTest::testUpdateIsVisibleViaZtdSelectcallsSqliteCteShadowingTest::testUpdateShadowDatacallsSqliteDriverDetectionTest::testAConnectionOpenedByDsnReadsItsPlatformOffTheDrivercallsSqliteDriverDetectionTest::testAConnectionOpenedByDsnUsesThePlatformItIsGivencallsSqliteDriverDetectionTest::testAutoDetectionCreatesSqliteSessioncallsSqliteDriverDetectionTest::testCustomConfigPassedToSessioncallsSqliteDriverDetectionTest::testExplicitSessionFactoryInjectioncallsSqliteErrorHandlingTest::testLateTableMutationRespectsExceptionBehaviorcallsSqliteErrorHandlingTest::testLateTableUpdateAndDeletePassThroughByDefaultcallsSqliteErrorHandlingTest::testPreparedStatementInsertAndSelectcallsSqliteErrorHandlingTest::testPreparedStatementWithBindValuecallsSqliteErrorHandlingTest::testRowsFromLateTableInsertDoNotBypassPassthroughBehaviorcallsSqliteErrorHandlingTest::testUnsupportedSqlWithExceptionBehaviorcallsSqliteErrorHandlingTest::testUnsupportedSqlWithIgnoreBehaviorcallsSqliteErrorHandlingTest::testUnsupportedSqlWithNoticeBehaviorcallsPdoConnectionTestcallsPdoStatementTestcallsDriverSessionFactoryTestcallsParameterBinderTestcallsPreparedQueryTestcallsStatementExecutionTestcallsZtdPdoExceptionTestcallsZtdPdoStatementTest::testBindParamSurvivesPreparedStatementRecompilationcallsZtdPdoStatementTest::testBindValueSurvivesPreparedStatementRecompilationcallsZtdPdoStatementTest::testBufferedColumnFetchAllReturnsEveryRowcallsZtdPdoStatementTest::testBufferedColumnFetchDefaultsToTheFirstColumnAndThenExhaustscallsZtdPdoStatementTest::testBufferedObjectHydrationUsesDeclaredPropertiescallsZtdPdoStatementTest::testExecuteAndPostProcessLetsZtdReadWhatTheStatementAnsweredcallsZtdPdoStatementTest::testFetchAllAnswersEveryBufferedRowAndNotJustTheFirstcallsZtdPdoStatementTest::testFetchAllAnswersEveryBufferedRowInTheModeItIsAskedcallsZtdPdoStatementTest::testFetchAllAnswersFalseForAColumnTheBufferedRowDoesNotHoldcallsZtdPdoStatementTest::testFetchAllAnswersOneColumnWhereOnlyOneIsAskedcallsZtdPdoStatementTest::testFetchAnswersFalseOnceTheBufferedRowsRunOutcallsZtdPdoStatementTest::testFetchAnswersOneBufferedRowAtATimecallsZtdPdoStatementTest::testFetchColumnAnswersTheColumnAskedForInTheBufferedRowcallsZtdPdoStatementTest::testFetchObjectAnswersFalseWhereThereIsNoBufferedRowLeftcallsZtdPdoStatementTest::testFetchObjectBuildsAnObjectOutOfTheBufferedRowcallsZtdPdoStatementTest::testGetIteratorWalksTheRowsZtdBufferedcallsZtdPdoStatementTest::testPassthroughFetchAllForwardsConstructorArgumentscallsZtdPdoStatementTest::testSetFetchModeIsRememberedAcrossARepreparecallsZtdPdoStatementTest::testSimulatedWritesWithoutReturningHaveNoFetchableRowscalls