DbSignal.Sqlite
1.0.2
dotnet add package DbSignal.Sqlite --version 1.0.2
NuGet\Install-Package DbSignal.Sqlite -Version 1.0.2
<PackageReference Include="DbSignal.Sqlite" Version="1.0.2" />
<PackageVersion Include="DbSignal.Sqlite" Version="1.0.2" />
<PackageReference Include="DbSignal.Sqlite" />
paket add DbSignal.Sqlite --version 1.0.2
#r "nuget: DbSignal.Sqlite, 1.0.2"
#:package DbSignal.Sqlite@1.0.2
#addin nuget:?package=DbSignal.Sqlite&version=1.0.2
#tool nuget:?package=DbSignal.Sqlite&version=1.0.2
DbSignal.Sqlite
Know when another process wrote to your SQLite file.
await using var feed = SqliteFeed.For("Data Source=app.db").Build();
await foreach (var batch in feed.ReadAsync(Checkpoint.Now, ct))
Console.WriteLine($"Something changed at {batch.ObservedUtc:HH:mm:ss}");
Open that .db in DB Browser for SQLite, change a row, hit
Write Changes, and the console reacts. No schema changes, no triggers, no setup.
What it can and cannot tell you
Built on PRAGMA data_version, which is a single integer the SQLite engine bumps when
any other connection commits. That is honest but coarse:
| Detail | DatabaseChanged — "something changed", not which table or row |
| Survives app restart | No — the counter is meaningless across connections |
| Survives downtime | No — changes while your app was down are not recoverable |
| Setup required | None |
| Privileges | None |
If you need to know which rows changed, this provider will tell you so at startup rather than pretend:
o.RequireAtLeast(ChangeDetail.KeysChanged); // throws on SQLite, at startup, with a reason
Use DbSignal.SqlServer where that matters.
One thing worth knowing
data_version is only comparable against a previous reading from the same connection,
so the feed holds one connection open for the lifetime of the enumeration. This is
deliberate and load-bearing.
It also ignores commits made on the connection doing the reading — but the feed never
writes, and your application writes on its own connection, so your own writes do
surface. The package therefore declares FiltersOwnWrites: false, because that is the
truth.
Targets net8.0. MIT licensed.
Source and full documentation.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- DbSignal.Abstractions (>= 1.0.2)
- Microsoft.Data.Sqlite (>= 8.0.11)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.