interfaceStatementInterface
interface StatementInterface
Minimal statement interface for ZTD layer.
This interface defines the contract that all statement adapters must implement to work with the ZTD session. It provides a driver-agnostic API for executing prepared statements and fetching results.
Rows retain the keys and opaque values supplied by the driver. The platform owns value interpretation and SQL encoding.
Type Aliases§
Row = import from TableDefinitionRowValue = import from TableDefinitionMethods§
public function execute(array<int|string, RowValue>|null $params = null): boolExecute the prepared statement.
Parameters
$params | array<int|string, RowValue>|null | Optional parameters to bind. |
Returns
bool True on success, false on failure.Called from 1
public function fetchAll(): array<int, Row>Fetch all rows as associative arrays.
Returns
array<int, Row> Array of associative arrays.Called from 1
public function resultColumns(ResultColumnTypeResolver $typeResolver): list<ResultColumn>Return result-set columns in projection order.
Metadata must remain available when the result contains no rows.
Parameters
$typeResolver | ResultColumnTypeResolver |
Returns
list<ResultColumn>Called from 1
public function rowCount(): intReturn the number of affected rows.
Returns
intTest cases 128§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Other tests reaching this symbol 128
FakeConnectioncallsFakeStatementcallsMySqlSessionSqlModeReflectorTest::testReflectsTheCurrentSessionSqlModecallsPdoConnectionTest::testQueryReturnsStatementOnSuccesscallsPdoStatementTest::testImplementsStatementInterfacecallsMySqlSessionFactoryTest::testCreateAppliesReflectedAnsiQuotesModeToProductionLexingcallsMySqlSessionFactoryTest::testCreateRegistersReflectedViewscallsMySqlSessionFactoryTest::testCreateReturnsSessioncallsPgSqlSessionFactoryTest::testCreatedSessionIsEnabledByDefaultcallsPgSqlSessionFactoryTest::testCreateRegistersReflectedPartialUniqueIndexescallsPgSqlSessionFactoryTest::testCreateRegistersReflectedPartitionMetadatacallsPgSqlSessionFactoryTest::testCreateRegistersReflectedViewscallsPgSqlSessionFactoryTest::testCreateReturnsSessioncallsPgSqlSessionFactoryTest::testCreateWithNullParseResultStillWorkscallsPgSqlSessionFactoryTest::testCreateWithTableRegistersSchemaInSessioncallsPgSqlSessionFactoryTest::testCreateWithTablesReflectsSchemacallsPgSqlSessionFactoryTest::testSessionCanBeEnabledAfterCreationcallsMySqlSchemaReflectorTest::testGetCreateStatementReturnsNullWhenNoRowscallsMySqlSchemaReflectorTest::testGetCreateStatementReturnsSqlcallsMySqlSchemaReflectorTest::testReflectViewsSkipsMalformedDefinitionscallsPgSqlPartitionReflectorTest::testReflectsKeysAndParentRelationsFromCatalogcallsPgSqlSchemaReflectorTest::testArrayWithLowercaseUdtNamecallsPgSqlSchemaReflectorTest::testCharStringLengthcallsPgSqlSchemaReflectorTest::testCollectsCompositePartialIndexesAndDiscardsMalformedMetadatacallsPgSqlSchemaReflectorTest::testEscapesTableNameInEveryMetadataQuerycallsPgSqlSchemaReflectorTest::testExactSqlForArrayNoUnderscorecallsPgSqlSchemaReflectorTest::testExactSqlForArrayWithUnderscorecallsPgSqlSchemaReflectorTest::testExactSqlForBigintcallsPgSqlSchemaReflectorTest::testExactSqlForBooleancallsPgSqlSchemaReflectorTest::testExactSqlForByteacallsPgSqlSchemaReflectorTest::testExactSqlForCharNoLencallsPgSqlSchemaReflectorTest::testExactSqlForCharWithLencallsPgSqlSchemaReflectorTest::testExactSqlForDatecallsPgSqlSchemaReflectorTest::testExactSqlForDoublePrecisioncallsPgSqlSchemaReflectorTest::testExactSqlForIntegerNotNullcallsPgSqlSchemaReflectorTest::testExactSqlForJsoncallsPgSqlSchemaReflectorTest::testExactSqlForJsonbcallsPgSqlSchemaReflectorTest::testExactSqlForNumericBarecallsPgSqlSchemaReflectorTest::testExactSqlForNumericPrecisionOnlycallsPgSqlSchemaReflectorTest::testExactSqlForNumericPrecisionScalecallsPgSqlSchemaReflectorTest::testExactSqlForRealcallsPgSqlSchemaReflectorTest::testExactSqlForSmallintcallsPgSqlSchemaReflectorTest::testExactSqlForTextcallsPgSqlSchemaReflectorTest::testExactSqlForTimecallsPgSqlSchemaReflectorTest::testExactSqlForTimestampcallsPgSqlSchemaReflectorTest::testExactSqlForTimestamptzcallsPgSqlSchemaReflectorTest::testExactSqlForTimetzcallsPgSqlSchemaReflectorTest::testExactSqlForUserDefinedCitextcallsPgSqlSchemaReflectorTest::testExactSqlForUserDefinedCustomcallsPgSqlSchemaReflectorTest::testExactSqlForUserDefinedEmptycallsPgSqlSchemaReflectorTest::testExactSqlForUserDefinedHstorecallsPgSqlSchemaReflectorTest::testExactSqlForUserDefinedLtreecallsPgSqlSchemaReflectorTest::testExactSqlForUuidcallsPgSqlSchemaReflectorTest::testExactSqlForVarcharNoLencallsPgSqlSchemaReflectorTest::testExactSqlForVarcharWithLencallsPgSqlSchemaReflectorTest::testExactSqlPreservesBitWidthscallsPgSqlSchemaReflectorTest::testExactSqlPreservesUnboundedBitTypescallsPgSqlSchemaReflectorTest::testExactSqlWithCompositePkcallsPgSqlSchemaReflectorTest::testExactSqlWithCompositeUniquecallsPgSqlSchemaReflectorTest::testExactSqlWithDefaultcallsPgSqlSchemaReflectorTest::testExactSqlWithPkcallsPgSqlSchemaReflectorTest::testExactSqlWithPkAndUniquecallsPgSqlSchemaReflectorTest::testExactSqlWithUniquecallsPgSqlSchemaReflectorTest::testForeignKeyQueryIsExactAndEscapesTableNamecallsPgSqlSchemaReflectorTest::testForeignKeysAreReconstructedWithCompositeColumnsAndActionscallsPgSqlSchemaReflectorTest::testGetCreateStatementReturnsNullWhenNoColumnscallsPgSqlSchemaReflectorTest::testMalformedForeignKeyRowsAreSkippedIndependentlycallsPgSqlSchemaReflectorTest::testMissingColumnNameDefaultscallsPgSqlSchemaReflectorTest::testMissingDataTypeDefaultsToTextcallsPgSqlSchemaReflectorTest::testNumericIntPrecisionAndScaleExactOutputcallsPgSqlSchemaReflectorTest::testNumericNonIntPrecisionCastsToIntcallsPgSqlSchemaReflectorTest::testNumericPrecisionOnlyNonIntCastsToIntcallsPgSqlSchemaReflectorTest::testNumericStringPrecisionOnlycallsPgSqlSchemaReflectorTest::testNumericStringPrecisionScalecallsPgSqlSchemaReflectorTest::testPartialUniqueIndexesReflectsPartialUniqueIndexesWithoutFlatteningTheirPredicatecallsPgSqlSchemaReflectorTest::testPkNonStringColumnNameIsSkippedcallsPgSqlSchemaReflectorTest::testPkQueryReturnsFalseStillWorkscallsPgSqlSchemaReflectorTest::testReflectAllExactResultscallsPgSqlSchemaReflectorTest::testReflectAllMultipleTablesExactResultscallsPgSqlSchemaReflectorTest::testReflectAllSkipsInvalidNamescallsPgSqlSchemaReflectorTest::testReflectAllSkipsTablesWithNoColumnscallsPgSqlSchemaReflectorTest::testReflectsDomainWithoutSchemaAsAQuotedTypecallsPgSqlSchemaReflectorTest::testReflectsGeneratedAndIdentityColumnscallsPgSqlSchemaReflectorTest::testReflectsSchemaQualifiedDomainTypeInsteadOfItsBaseTypecallsPgSqlSchemaReflectorTest::testReflectViewsSkipsMalformedRowscallsPgSqlSchemaReflectorTest::testTableNameEscapingcallsPgSqlSchemaReflectorTest::testTableNameWithSingleQuoteInReflectAllcallsPgSqlSchemaReflectorTest::testUniqueConstraintNonStringColumnsAreSkippedcallsPgSqlSchemaReflectorTest::testUniqueQueryReturnsFalseStillWorkscallsPgSqlSchemaReflectorTest::testUnknownDataTypePassedThroughcallsPgSqlSchemaReflectorTest::testVarcharStringLengthcallsPgSqlSchemaReflectorTest::testVerifyColumnsQueryExactcallsPgSqlSchemaReflectorTest::testVerifyPkQueryExactcallsPgSqlSchemaReflectorTest::testVerifyReflectAllListQuerycallsPartitionKeysTest::testReflectIgnoresMalformedRowsAndKeepsThePartitionExpressioncallsTableQueriesTest::testColumnsQueriesTheCurrentSchemaAndEscapesTheTableNamecallsTableQueriesTest::testForeignKeysQueriesTheCurrentSchemaAndEscapesTheTableNamecallsTableQueriesTest::testPrimaryKeyQueriesTheCurrentSchemaAndEscapesTheTableNamecallsTableQueriesTest::testUniqueIndexesQueriesTheCurrentSchemaAndEscapesTheTableNamecallsForeignKeysTest::testDefinitionsGroupsCompositeKeysInCatalogOrdercallsPrimaryColumnsTest::testColumnsKeepsCatalogOrderAndSkipsInvalidMetadatacallsUniqueIndexesTest::testDefinitionsReconstructsThePartialIndexPredicatecallsSqliteSchemaReflectorTest::testGetCreateStatementEscapesSingleQuotesInTableNamecallsSqliteSchemaReflectorTest::testGetCreateStatementReturnsNullWhenNoRowscallsSqliteSchemaReflectorTest::testGetCreateStatementReturnsNullWhenSqlKeyMissingcallsSqliteSchemaReflectorTest::testGetCreateStatementReturnsNullWhenSqlNotStringcallsSqliteSchemaReflectorTest::testGetCreateStatementReturnsSqlcallsSqliteSchemaReflectorTest::testGetCreateStatementWithSingleQuoteInTableNamecallsSqliteSchemaReflectorTest::testReflectAllKeepsOnlyValidRowsAmongInvalidcallsSqliteSchemaReflectorTest::testReflectAllMultipleValidTablescallsSqliteSchemaReflectorTest::testReflectAllPrefersTemporaryTableWhenNamesCollidecallsSqliteSchemaReflectorTest::testReflectAllReturnsSqlValuescallsSqliteSchemaReflectorTest::testReflectAllReturnsTablescallsSqliteSchemaReflectorTest::testReflectAllSkipsInvalidRowscallsSqliteSchemaReflectorTest::testReflectAllSkipsMissingSqlKeycallsSqliteSchemaReflectorTest::testReflectAllSkipsRowsWithMissingNamecallsSqliteSchemaReflectorTest::testReflectAllSkipsRowsWithNonStringNamecallsSqliteSchemaReflectorTest::testReflectAllSkipsRowsWithNonStringSqlcallsSqliteSchemaReflectorTest::testReflectAllSkipsRowWithEmptyNameAndValidSqlcallsSqliteSchemaReflectorTest::testReflectAllSkipsRowWithValidNameAndEmptySqlcallsSqliteSchemaReflectorTest::testReflectViewsPrefersTemporaryAndSkipsMalformedRowscallsSchemaInitializerTest::testPopulateRegistersColumnsPartialIndexesAndPartitionKeyscallsStatementSimulatorTest::testReadStatementReturnsRowCountcallsStatementSimulatorTest::testWriteStatementUpdatesShadowStorecallsSqliteSessionFactoryTest::testCreateRegistersReflectedViewscallsSqliteSessionFactoryTest::testCreateReturnsSessioncallsSqliteSessionFactoryTest::testCreateWithExistingTablesRegistersDefinitionscallsSqliteSessionFactoryTest::testCreateWithUnparseableSchemaSkipsTablecalls
Relations§
Implemented by 5
- FakeStatement packages/ztd-query-core/tests/Fake/FakeStatement.php:21
- MysqliResultStatement packages/ztd-query-mysqli-adapter/src/Driver/MysqliResultStatement.php:17
- MysqliStatement packages/ztd-query-mysqli-adapter/src/Driver/MysqliStatement.php:20
- PdoStatement packages/ztd-query-pdo-adapter/src/Driver/PdoStatement.php:24
- StatementExecution packages/ztd-query-pdo-adapter/src/Session/StatementExecution.php:24
Method calls 3
- method-call ZtdQuery\ResultSelectRunner::runStatement() packages/ztd-query-core/src/ResultSelectRunner.php:61
- method-call ZtdQuery\ResultSelectRunner::readResultSet() packages/ztd-query-core/src/ResultSelectRunner.php:77
- method-call ZtdQuery\ResultSelectRunner::readResultSet() packages/ztd-query-core/src/ResultSelectRunner.php:78
Type declarations 17
- type ZtdQuery\Connection\ConnectionInterface packages/ztd-query-core/src/Connection/ConnectionInterface.php:21
- type ZtdQuery\GenericExecuteResult packages/ztd-query-core/src/GenericExecuteResult.php:28
- type ZtdQuery\GenericExecuteResult packages/ztd-query-core/src/GenericExecuteResult.php:60
- type ZtdQuery\GenericExecuteResult packages/ztd-query-core/src/GenericExecuteResult.php:101
- type ZtdQuery\GenericExecuteResult packages/ztd-query-core/src/GenericExecuteResult.php:139
- type ZtdQuery\ResultSelectRunner packages/ztd-query-core/src/ResultSelectRunner.php:57
- type ZtdQuery\ResultSelectRunner packages/ztd-query-core/src/ResultSelectRunner.php:74
- type ZtdQuery\Session packages/ztd-query-core/src/Session.php:345
- type ZtdQuery\Adapter\Mysqli\Driver\MysqliConnection packages/ztd-query-mysqli-adapter/src/Driver/MysqliConnection.php:35
- type ZtdQuery\Adapter\Pdo\Driver\PdoConnection packages/ztd-query-pdo-adapter/src/Driver/PdoConnection.php:40
- type ZtdQuery\Platform\Postgres\Schema\Reflection\Catalog\TableQueries packages/ztd-query-postgres/src/Schema/Reflection/Catalog/TableQueries.php:27
- type ZtdQuery\Platform\Postgres\Schema\Reflection\Catalog\TableQueries packages/ztd-query-postgres/src/Schema/Reflection/Catalog/TableQueries.php:44
- type ZtdQuery\Platform\Postgres\Schema\Reflection\Catalog\TableQueries packages/ztd-query-postgres/src/Schema/Reflection/Catalog/TableQueries.php:63
- type ZtdQuery\Platform\Postgres\Schema\Reflection\Catalog\TableQueries packages/ztd-query-postgres/src/Schema/Reflection/Catalog/TableQueries.php:89
- type ZtdQuery\Platform\Postgres\Schema\Reflection\Key\ForeignKeys packages/ztd-query-postgres/src/Schema/Reflection/Key/ForeignKeys.php:20
- type ZtdQuery\Platform\Postgres\Schema\Reflection\Key\PrimaryColumns packages/ztd-query-postgres/src/Schema/Reflection/Key/PrimaryColumns.php:20
- type ZtdQuery\Platform\Postgres\Schema\Reflection\Key\UniqueIndexes packages/ztd-query-postgres/src/Schema/Reflection/Key/UniqueIndexes.php:19