classPdoConnection
final class PdoConnection
implements ConnectionInterface
Restricted visibility: declared "@visibility ZtdQuery\Adapter\Pdo". Code outside that scope must not name this declaration.
PDO adapter implementing ConnectionInterface for ZTD layer.
This class wraps a PDO instance and provides the minimal interface required by the ZTD session for executing queries.
Methods§
public function __construct(PDO $pdo)Binds the instance to what it will work from.
Parameters
$pdo | PDO |
public function query(string $sql): StatementInterface|false{@inheritDoc}
Parameters
$sql | string |
Returns
StatementInterface|falseThrows
DatabaseException On database error when PDO is in exception mode.Test cases 4
Calls 4
- method-call
PDO::query()line 43 - new PdoStatement line 48
- new DatabaseException line 50
- function-call
is_intline 52
Private surface 1§
Implementation details, listed for orientation only.
private PDO $pdoTest cases 36§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 5
PdoConnectionTest::testItIsTheConnectionZtdReadsAndWritesThroughcallsPdoConnectionTest::testQueryReturnsFalseOnFailureInSilentModecallsPdoConnectionTest::testQueryReturnsStatementOnSuccesscallsPdoConnectionTest::testQueryThrowsDatabaseExceptionInExceptionModecallsPdoConnectionTest::testQueryThrowsDatabaseExceptionWithDriverErrorCodecalls
Other tests reaching this symbol 31
PdoStatementTestcallsConnectionExecutionTestcallsDriverSessionFactoryTestcallsParameterBinderTestcallsPreparedQueryTest::testPrepareReportsASilentDriverFailurecallsPreparedQueryTest::testRewriteUsesTheCurrentShadowOnEveryExecutioncallsStatementExecutionTest::testBindingsRemainAvailableAcrossExecutionscallsStatementExecutionTest::testBindParameterRetainsReferencesAcrossRepreparationcallsStatementExecutionTest::testExecutePreparedRefreshesShadowReadsAndReplaysBindingscallsStatementExecutionTest::testExecuteSilentFailureDoesNotProduceAShadowResultcallsStatementExecutionTest::testFetchAllReturnsAssociativeRowscallsStatementExecutionTest::testNativeUnrewrittenExecutionDelegatesToTheNativeStatementcallsStatementExecutionTest::testPostProcessAppliesResultSelectRowsToTheShadowcallsStatementExecutionTest::testResultColumnsRemainAvailableAfterRowsAreConsumedcallsStatementExecutionTest::testResultUpdatesShadowAndReturnsItsResultcallsStatementExecutionTest::testRowCountTracksNativeMutationscallsZtdPdoExceptionTestcallsZtdPdoStatementTest::testBindColumnFillsTheVariableTheColumnIsReadIntocallsZtdPdoStatementTest::testDebugDumpParamsWritesTheDumpRatherThanAnsweringItcallsZtdPdoStatementTest::testErrorCodeAnswersNothingWhereTheDriverSaysNothingcallsZtdPdoStatementTest::testErrorCodeAnswersWhatTheDriverSaysWentWrongLastcallsZtdPdoStatementTest::testErrorInfoAnswersWhatTheDriverSaysAboutTheLastFailurecallsZtdPdoStatementTest::testFetchObjectDelegatesWithoutABufferedResultcallsZtdPdoStatementTest::testGetAttributeReadsTheAttributeOffTheStatementItWrapscallsZtdPdoStatementTest::testGetColumnMetaAnswersWhatTheDriverSaysAboutAColumncallsZtdPdoStatementTest::testGetIteratorWalksTheDriversOwnCursorWhereNothingWasBufferedcallsZtdPdoStatementTest::testNextRowsetMovesTheStatementOnToTheDriversNextResultcallsZtdPdoStatementTest::testPassthroughFetchAllForwardsColumnAndCallbackArgumentscallsZtdPdoStatementTest::testPassthroughFetchAllPreservesKeyPairKeyscallsZtdPdoStatementTest::testSetAttributeSetsTheAttributeOnTheStatementItWrapscallsZtdPdoTestcalls