-
Notifications
You must be signed in to change notification settings - Fork 0
SQLite Provider
SharpAccess.Sqlite is the supported zero-infrastructure relational persistence package. Core remains provider-neutral.
dotnet add package SharpAccess.Core --version 0.9.0-rc.1
dotnet add package SharpAccess.Sqlite --version 0.9.0-rc.1builder.Services.AddSharpAccess(builder.Configuration);
builder.Services.AddSqliteAccess(builder.Configuration);Example provider configuration:
{
"SharpAccess": {
"Sqlite": {
"ConnectionString": "Data Source=sharpaccess.db"
}
}
}Each opened provider connection enables foreign keys and a bounded five-second busy timeout.
Writable file-backed databases created from the provider connection string also require:
- WAL journal mode;
-
synchronous=NORMAL.
A host-managed connection factory retains ownership of journal mode, synchronization, pooling, and physical storage policy.
SQLite has one concurrent writer. Keep transactions short, do not place the database on a network filesystem, and use PostgreSQL when sustained write contention, failover, multiple writers, or horizontal scaling require a server DB.
Protect the database, -wal, and -shm files with operating-system permissions. Do not place them under a static-content root or a shared user profile.
./scripts/sqlite-smoke.ps1 -RepositoryRoot $PWD
./scripts/recovery-drill.ps1 -RepositoryRoot $PWDA safe controlled backup checkpoints WAL, verifies integrity, copies the database while quiesced, restores it, verifies integrity again, and proves a verified account can sign in. See Recovery.
SharpAccess · Windows · .NET 10 · PowerShell 7 · Repository · Security · License