Skip to content

Rename SQLite store ctx field to db#495

Merged
mtlynch merged 1 commit intomasterfrom
db-not-ctx
Apr 26, 2026
Merged

Rename SQLite store ctx field to db#495
mtlynch merged 1 commit intomasterfrom
db-not-ctx

Conversation

@mtlynch
Copy link
Copy Markdown
Owner

@mtlynch mtlynch commented Apr 26, 2026

Rename the sqlite.Store field from ctx to db and update all internal call sites accordingly.

Using ctx for a *sql.DB is confusing because ctx is the conventional identifier for context.Context throughout Go code. Naming the database handle db makes the type and purpose obvious at the call site and avoids suggesting that Store carries a request-scoped context value.

Rename the sqlite.Store field from ctx to db and update all internal call sites accordingly.

Using ctx for a *sql.DB is confusing because ctx is the conventional identifier for context.Context throughout Go code. Naming the database handle db makes the type and purpose obvious at the call site and avoids suggesting that Store carries a request-scoped context value.
@mtlynch mtlynch enabled auto-merge (squash) April 26, 2026 20:02
@mtlynch mtlynch merged commit e432ece into master Apr 26, 2026
9 checks passed
@mtlynch mtlynch deleted the db-not-ctx branch April 26, 2026 20:04
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant