generate characters with sane compile time/memory

This commit is contained in:
2026-01-07 16:36:50 -05:00
parent 4bd9100954
commit b134bea670
7 changed files with 210 additions and 80039 deletions

View File

@@ -20,6 +20,9 @@ var characterAffinity3SQL string
type Character struct {
ID int
Name string
// For internal use, the index of the character.
// We don't show this in public API, but it lets us use vectors for lookups.
Index int
}
func Characters(ctx context.Context, db *sqlitex.Pool) ([]Character, error) {
@@ -44,8 +47,9 @@ func Characters(ctx context.Context, db *sqlitex.Pool) ([]Character, error) {
break
}
c := Character{
ID: stmt.ColumnInt(0),
Name: stmt.ColumnText(1),
ID: stmt.ColumnInt(0),
Name: stmt.ColumnText(1),
Index: stmt.ColumnInt(2),
}
r = append(r, c)
}