MIT · One package, generator included

The row type
is the schema

Schipper.Io.Sqlite ships the runtime and a Roslyn generator in one package. No reflection, no runtime SQL building, no IQueryable. Native AOT stays clean because the generator never enters lib/.

AOT
No reflection
SQLG
Build diagnostics
Keyset
Paging
1
NuGet package

Migrations that refuse a plausible wrong answer

Extra columns under VerifyOnly are fatal. A late [Unique] stays. Scale lives in the schema hash.

Generated repositories

Get, query, stream, insert, version-checked update, upsert, delete. Bound filters. Keyset pages with HasMore.

Diagnosed at build

Missing constructors, private setters, bad [Scale], illegal key types. Errors land on the row type, not a generated file.

Quoted identifiers

Tables named Order and columns named Group prepare. C# keywords get @ in the emitted source.

Declare the row. Apply. Insert.

Nullable upserts use COALESCE and cannot clear NULL; UpdateAsync can.

C#
[Table("Widgets")]
public sealed class WidgetRow : AuditedRow
{
    [Key] public string Id { get; set; } = "";
    public string Name { get; set; } = "";
}

var db = new SqliteDb("Data Source=app.db");
await Database.ApplyAsync(db);
await using var session = await db.BeginAsync(user: "ada");
await widgets.InsertAsync(session, new WidgetRow { Id = "w1", Name = "Nebula" });
await session.CommitAsync();

Source on GitHub

One package. Generator packed as an analyzer.

Repository