Path: redb/redb.Tests.Integration/Tests/Sqlite/SqliteAmbientTransactionTests.cs Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Tests.Integration/Tests/Sqlite/SqliteAmbientTransactionTests.cs ---- using Microsoft.Extensions.DependencyInjection; using redb.Core.Data; using redb.SQLite.Data; using redb.Tests.Integration.Fixtures; using redb.Tests.Integration.Tests.Base; namespace redb.Tests.Integration.Tests.Sqlite; [Collection("Sqlite")] public class SqliteAmbientTransactionTests : AmbientTransactionTestsBase { public SqliteAmbientTransactionTests(SqliteFixture fixture) : base(fixture.ServiceProvider) { } protected override string CreateProbeTableSql => "CREATE TABLE IF NOT EXISTS ambient_tx_rows (tag TEXT NOT NULL)"; // No sleep function in SQLite: a recursive count that runs for seconds. protected override string SlowStatementSql => "WITH RECURSIVE c(x) AS (SELECT 1 UNION ALL SELECT x + 1 FROM c WHERE x < 20000000) SELECT count(*) FROM c"; // Case folding, not lazy references: the lazy flag needs the native extension, the case folding functions do not. protected override IRedbConnection CreateStandaloneConnection(IServiceProvider services, bool differentSessionSettings) => new SqliteRedbConnection(SqliteDataSource.Create( services.GetService()?.ConnectionString ?? ConnString("Sqlite"), unicodeCaseFolding: differentSessionSettings, lazyReferences: false)); }