classResultSelectRunner
final class ResultSelectRunner
Executes result-select queries and returns rows.
Type Aliases§
Row = import from TableDefinitionRowValue = import from TableDefinitionMethods§
public function run(
string $sql,
callable(string): StatementInterface|false $executor,
ResultColumnTypeResolver $typeResolver,
): array<int, Row>Execute SQL using the provided executor and return result rows.
Parameters
$sql | string | |
$executor | callable(string): StatementInterface|false | |
$typeResolver | ResultColumnTypeResolver |
Returns
array<int, Row>Test cases 3
Calls 1
- method-call ResultSelectRunner::runResultSet() line 31
public function runResultSet(
string $sql,
callable(string): StatementInterface|false $executor,
ResultColumnTypeResolver $typeResolver,
): ResultSetParameters
$sql | string | |
$executor | callable(string): StatementInterface|false | |
$typeResolver | ResultColumnTypeResolver |
Returns
Test cases 1
Called from 3
Calls 2
- new ResultSet line 44
- method-call ResultSelectRunner::readResultSet() line 47
public function runStatement(
StatementInterface $statement,
ResultColumnTypeResolver $typeResolver,
array<int|string, RowValue>|null $params = null,
): array<int, Row>Execute a prepared statement and return result rows.
Parameters
$statement | StatementInterface | |
$typeResolver | ResultColumnTypeResolver | |
$params | array<int|string, RowValue>|null |
Returns
array<int, Row>Test cases 1
Calls 2
- method-call StatementInterface::execute() line 61
- method-call ResultSelectRunner::readResultSet() line 63
public function readResultSet(
StatementInterface $statement,
ResultColumnTypeResolver $typeResolver,
): ResultSetReads result set.
Parameters
$statement | StatementInterface | |
$typeResolver | ResultColumnTypeResolver |
Returns
Test cases 2
Called from 3
- method-call ZtdQuery\ResultSelectRunner::runResultSet() packages/ztd-query-core/src/ResultSelectRunner.php:47
- method-call ZtdQuery\ResultSelectRunner::runStatement() packages/ztd-query-core/src/ResultSelectRunner.php:63
- method-call ZtdQuery\Session::processExecutedStatement() packages/ztd-query-core/src/Session.php:351
Calls 3
- method-call StatementInterface::resultColumns() line 77
- method-call StatementInterface::fetchAll() line 78
- new ResultSet line 80
Test cases 89§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 7
ResultSelectRunnerTest::testReadResultSetPassesPlatformTypeResolverToStatementcallsResultSelectRunnerTest::testReadResultSetReadsMetadataBeforeRowscallsResultSelectRunnerTest::testRunPreservesSparseDriverRowsAndOpaqueValuescallsResultSelectRunnerTest::testRunResultSetRetainsColumnsWhenRowsAreEmptycallsResultSelectRunnerTest::testRunReturnsEmptyWhenExecutorReturnsFalsecallsResultSelectRunnerTest::testRunReturnsRowsFromExecutorcallsResultSelectRunnerTest::testRunStatementReturnsRowscalls
Other tests reaching this symbol 82
FakeSessionFactory::createcallsMysqliResultProcessorTest::testProcessCreatesAnEmptyWriteResultcallsMysqliResultProcessorTest::testProcessPreservesTheOriginalDatabaseExceptioncallsMysqliResultProcessorTest::testProcessUsesNativeRowsForTheShadowMutationcallsSessionTest::testApplyShadowWritesTheMutationAndAnswersWhatItCameTocallsSessionTest::testApplyTransactionStatementDoesWhatTheStatementSayscallsSessionTest::testBeginTransactionRollBackTransactionBeginTransactionUsesProvidedTransactionManagerForSchemaRollbackcallsSessionTest::testCommitTransactionKeepsWhatTheTransactionDidcallsSessionTest::testCopySupportIsNothingWhereTheDialectHasNoCopycallsSessionTest::testCopyTargetIsNothingWhereTheDialectHasNoCopycallsSessionTest::testCreateEmptyWriteResultAnswersASimulatedWriteWithNothingToFetchcallsSessionTest::testDisableEnableDisableEnableAndDisablecallsSessionTest::testDisableStopsZtdWithoutTouchingTheShadowcallsSessionTest::testEnableTurnsZtdBackOncallsSessionTest::testExecStatementAnswersHowManyRowsAReadStatementCameTocallsSessionTest::testForeignKeyFailureRestoresShadowStatecallsSessionTest::testIsEnabledFollowsWhatWasAskedForcallsSessionTest::testLastInsertIdIsFalseUntilSomethingHasBeenInsertedcallsSessionTest::testMutationFailureIsConvertedToDatabaseExceptioncallsSessionTest::testNeedsPostProcessingIsTrueForTheKindsThatChangeTheShadowcallsSessionTest::testParameterBindingCompilerIsNothingWhereTheDriverBindsThemItselfcallsSessionTest::testParameterBindingCompilerResultColumnTypeResolverParameterBindingCompilerDelegatesCopyTargetsToTheConfiguredPlatformSupportcallsSessionTest::testProcessExecutedStatementReadsAReadStatementStraightBackcallsSessionTest::testResultColumnTypeResolverAnswersTheOneTheSessionWasBuiltWithcallsSessionTest::testRewriteAnswersThePlanTheRewriterGivescallsSessionTest::testRollBackTransactionPutsTheShadowBackToWhereItBegancallsSessionTest::testRunResultSelectAndApplyShadowReadsBackWhatTheStatementWouldHaveWrittencallsSessionTest::testShouldExecuteIsFalseOnlyForAPlanNothingIsToBeRunForcallsSessionTest::testSplitStatementsUsesPlatformRewritercallsSessionTest::testTableDefinitionReturnsRegisteredSchemaOrNullcallsSessionTest::testTransactionsAnswersWhatATransactionStatementIsAppliedTocallsSessionTest::testTransactionStatementIsNothingForAStatementThatIsNotOnecallsStatementSimulatorTest::testReadStatementReturnsFalseWhenExecutorFailscallsStatementSimulatorTest::testReadStatementReturnsRowCountcallsStatementSimulatorTest::testSimulateRefusesAWriteThePlanCarriesNoMutationForcallsStatementSimulatorTest::testUnsupportedSqlThrowscallsStatementSimulatorTest::testWriteStatementUpdatesShadowStorecallsZtdMysqliStatementTest::testAttr_getReadsTheConfiguredNativeCursorModecallsZtdMysqliStatementTest::testAttr_setUpdatesTheNativeCursorModecallsZtdMysqliStatementTest::testCloseClosesTheDelegatedStatementcallsZtdMysqliStatementTest::testData_seekMovesTheNativeCursorcallsZtdMysqliStatementTest::testExecuteAppliesRowsToTheShadowStorecallsZtdMysqliStatementTest::testExecuteDoesNotRunASkippedPlancallsZtdMysqliStatementTest::testExecuteHonorsReadAndUnplannedParameterscallsZtdMysqliStatementTest::testExecuteReturnsFalseForNativeFailurescallsZtdMysqliStatementTest::testFetchWritesBoundResultVariablescallsZtdMysqliStatementTest::testFree_resultReleasesBufferedRowscallsZtdMysqliStatementTest::testGet_resultConsumesTheCachedNativeResultOncecallsZtdMysqliStatementTest::testGet_resultReturnsFalseForAStatementWithoutRowscallsZtdMysqliStatementTest::testGet_warningsReturnsTheNativeWarningcallsZtdMysqliStatementTest::testMore_resultsReturnsFalseAfterASingleResultcallsZtdMysqliStatementTest::testNext_resultReturnsFalseWithoutAnotherResultcallsZtdMysqliStatementTest::testNum_rowsReturnsTheNativeBufferedCountcallsZtdMysqliStatementTest::testPrepareReplacesTheDelegatedStatementcallsZtdMysqliStatementTest::testResetClearsTheSimulatedAffectedRowCountcallsZtdMysqliStatementTest::testResult_metadataReturnsNativeColumnInformationcallsZtdMysqliStatementTest::testSend_long_dataConcatenatesBinaryChunkscallsZtdMysqliStatementTest::testStore_resultBuffersTheNativeRowscallsZtdMysqliStatementTest::testZtdAffectedRowsReturnsTheNativeWriteCountcallsZtdMysqliTest::testAutocommitCommitsOrRollsBackTheShadowScopecallsZtdMysqliTest::testBegin_transactionCreatesAShadowRollbackScopecallsZtdMysqliTest::testCommitRetainsTheShadowRowscallsZtdMysqliTest::testConnectUsesTheSuppliedNativeCredentialscallsZtdMysqliTest::testFromMysqliPassesTheConnectionAndConfigurationToItsFactorycallsZtdMysqliTest::testPrepareAndQueriesPreserveNativeFalseResultscallsZtdMysqliTest::testPrepareWrapsRewriteFailurescallsZtdMysqliTest::testQueryReturnsFalseWhenThePreparedExecutionFailscallsZtdMysqliTest::testQueryReturnsTrueWithoutAResultSetcallsZtdMysqliTest::testReal_connectConnectsAnInitializedNativeHandlecallsZtdMysqliTest::testReal_queryAppliesTransactionStatementscallsZtdMysqliTest::testRelease_savepointRemovesTheNativeAndShadowSavepointscallsZtdMysqliTest::testRollbackRestoresTheShadowSnapshotcallsZtdMysqliTest::testSavepointPreservesItsShadowSnapshotcallsZtdPdoStatementTest::testBindValueDelegatesToInnercallsZtdPdoStatementTest::testCloseCursorDelegatesToInnercallsZtdPdoStatementTest::testColumnCountDelegatesToInnercallsZtdPdoStatementTest::testExecuteDelegatesWhenNoPlancallsZtdPdoStatementTest::testExecuteDelegatesWhenNoPostProcessingNeededcallsZtdPdoStatementTest::testExecuteReturnsFalseWhenShouldExecuteIsFalsecallsZtdPdoStatementTest::testExecuteWithoutPostProcessingRunsNativeStatementOncecallsZtdPdoStatementTest::testExecuteWrapsSimulationFailureAsAdapterExceptioncallsZtdPdoStatementTest::testRowCountDelegatesToInnerWhenNoResultcalls
Relations§
Instantiated in 3
- new ZtdQuery\Platform\MySql\MySqlSessionFactory::create() packages/ztd-query-mysql/src/MySqlSessionFactory.php:74
- new ZtdQuery\Platform\Postgres\PgSqlSessionFactory::create() packages/ztd-query-postgres/src/PgSqlSessionFactory.php:80
- new ZtdQuery\Platform\Sqlite\SqliteSessionFactory::create() packages/ztd-query-sqlite/src/SqliteSessionFactory.php:73