classSqliteSessionFactory
final class SqliteSessionFactory
implements SessionFactory
Public API: explicitly declared with
@visibility public.Factory for creating Session instances pre-configured for SQLite.
$connection = new class implements \ZtdQuery\Connection\ConnectionInterface { public function query(string $sql): \ZtdQuery\Connection\StatementInterface|false { return false; } };
$session = (new \ZtdQuery\Platform\Sqlite\SqliteSessionFactory())->create($connection, new \ZtdQuery\Config\ZtdConfig());
$session->rewrite("SELECT 1")->sql() // => 'SELECT 1'Methods§
public function create(ConnectionInterface $connection, ZtdConfig $config): SessionPublic API: explicitly declared with
@visibility public.{@inheritDoc}
Parameters
$connection | ConnectionInterface | |
$config | ZtdConfig |
Returns
$connection = new class implements \ZtdQuery\Connection\ConnectionInterface { public function query(string $sql): \ZtdQuery\Connection\StatementInterface|false { return false; } };
$session = (new \ZtdQuery\Platform\Sqlite\SqliteSessionFactory())->create($connection, new \ZtdQuery\Config\ZtdConfig());
$session->isEnabled() // => true
$session->rewrite('SELECT 1')->sql() // => 'SELECT 1'Test cases 29
PreparedQueryTest::testPrepareReportsASilentDriverFailurecallsPreparedQueryTest::testRewriteUsesTheCurrentShadowOnEveryExecutioncallsStatementExecutionTest::testBindingsRemainAvailableAcrossExecutionscallsStatementExecutionTest::testBindParameterRetainsReferencesAcrossRepreparationcallsStatementExecutionTest::testExecutePreparedRefreshesShadowReadsAndReplaysBindingscallsStatementExecutionTest::testExecuteSilentFailureDoesNotProduceAShadowResultcallsStatementExecutionTest::testFetchAllReturnsAssociativeRowscallsStatementExecutionTest::testNativeUnrewrittenExecutionDelegatesToTheNativeStatementcallsStatementExecutionTest::testPostProcessAppliesResultSelectRowsToTheShadowcallsStatementExecutionTest::testResultColumnsRemainAvailableAfterRowsAreConsumedcallsStatementExecutionTest::testResultUpdatesShadowAndReturnsItsResultcallsStatementExecutionTest::testRowCountTracksNativeMutationscallsSqliteSessionFactoryTest::testCreateRegistersReflectedViewscallsSqliteSessionFactoryTest::testCreateReturnsSessioncallsSqliteSessionFactoryTest::testCreateWithExistingTablesRegistersDefinitionscallsSqliteSessionFactoryTest::testCreateWithUnparseableSchemaSkipsTablecallsZtdPdoStatementTest::testBindColumnFillsTheVariableTheColumnIsReadIntocallsZtdPdoStatementTest::testDebugDumpParamsWritesTheDumpRatherThanAnsweringItcallsZtdPdoStatementTest::testErrorCodeAnswersNothingWhereTheDriverSaysNothingcallsZtdPdoStatementTest::testErrorCodeAnswersWhatTheDriverSaysWentWrongLastcallsZtdPdoStatementTest::testErrorInfoAnswersWhatTheDriverSaysAboutTheLastFailurecallsZtdPdoStatementTest::testFetchObjectDelegatesWithoutABufferedResultcallsZtdPdoStatementTest::testGetAttributeReadsTheAttributeOffTheStatementItWrapscallsZtdPdoStatementTest::testGetColumnMetaAnswersWhatTheDriverSaysAboutAColumncallsZtdPdoStatementTest::testGetIteratorWalksTheDriversOwnCursorWhereNothingWasBufferedcallsZtdPdoStatementTest::testNextRowsetMovesTheStatementOnToTheDriversNextResultcallsZtdPdoStatementTest::testPassthroughFetchAllForwardsColumnAndCallbackArgumentscallsZtdPdoStatementTest::testPassthroughFetchAllPreservesKeyPairKeyscallsZtdPdoStatementTest::testSetAttributeSetsTheAttributeOnTheStatementItWrapscalls
Calls 24
- new ShadowStore line 44
- new SqliteParser line 45
- new SqliteSchemaParser line 46
- new TableDefinitionRegistry line 47
- new SqliteSchemaReflector line 49
- method-call SqliteSchemaReflector::reflectAll() line 50
- method-call SqliteSchemaParser::parse() line 51
- method-call TableDefinitionRegistry::register() line 53
- new ViewDefinitionSet line 56
- method-call SqliteSchemaReflector::reflectViews() line 57
- method-call ViewDefinitionSet::register() line 58
- new SqliteQueryGuard line 61
- new SelectTransformer line 62
- new InsertTransformer line 63
- new UpdateTransformer line 64
- new DeleteTransformer line 65
- new SqliteTransformer line 66
- new SqliteMutationResolver line 67
- new SqliteRewriter line 68
- new Session line 70
- new ResultSelectRunner line 73
- new ShadowTransactions line 76
- new SqlitePdoParameterBindingCompiler line 78
- new SqlitePdoResultColumnTypeResolver line 79
Test cases 32§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 4
Other tests reaching this symbol 28
SqliteDriverDetectionTest::testAConnectionOpenedByDsnUsesThePlatformItIsGivencallsSqliteDriverDetectionTest::testExplicitSessionFactoryInjectioncallsPreparedQueryTest::testPrepareReportsASilentDriverFailurecallsPreparedQueryTest::testRewriteUsesTheCurrentShadowOnEveryExecutioncallsStatementExecutionTest::testBindingsRemainAvailableAcrossExecutionscallsStatementExecutionTest::testBindParameterRetainsReferencesAcrossRepreparationcallsStatementExecutionTest::testExecutePreparedRefreshesShadowReadsAndReplaysBindingscallsStatementExecutionTest::testExecuteSilentFailureDoesNotProduceAShadowResultcallsStatementExecutionTest::testFetchAllReturnsAssociativeRowscallsStatementExecutionTest::testNativeUnrewrittenExecutionDelegatesToTheNativeStatementcallsStatementExecutionTest::testPostProcessAppliesResultSelectRowsToTheShadowcallsStatementExecutionTest::testResultColumnsRemainAvailableAfterRowsAreConsumedcallsStatementExecutionTest::testResultUpdatesShadowAndReturnsItsResultcallsStatementExecutionTest::testRowCountTracksNativeMutationscallsZtdPdoStatementTest::testBindColumnFillsTheVariableTheColumnIsReadIntocallsZtdPdoStatementTest::testDebugDumpParamsWritesTheDumpRatherThanAnsweringItcallsZtdPdoStatementTest::testErrorCodeAnswersNothingWhereTheDriverSaysNothingcallsZtdPdoStatementTest::testErrorCodeAnswersWhatTheDriverSaysWentWrongLastcallsZtdPdoStatementTest::testErrorInfoAnswersWhatTheDriverSaysAboutTheLastFailurecallsZtdPdoStatementTest::testFetchObjectDelegatesWithoutABufferedResultcallsZtdPdoStatementTest::testGetAttributeReadsTheAttributeOffTheStatementItWrapscallsZtdPdoStatementTest::testGetColumnMetaAnswersWhatTheDriverSaysAboutAColumncallsZtdPdoStatementTest::testGetIteratorWalksTheDriversOwnCursorWhereNothingWasBufferedcallsZtdPdoStatementTest::testNextRowsetMovesTheStatementOnToTheDriversNextResultcallsZtdPdoStatementTest::testPassthroughFetchAllForwardsColumnAndCallbackArgumentscallsZtdPdoStatementTest::testPassthroughFetchAllPreservesKeyPairKeyscallsZtdPdoStatementTest::testSetAttributeSetsTheAttributeOnTheStatementItWrapscallsZtdPdoTest::testExplicitPlatformFactoryCreatesAnIsolatedSessioncalls