Skip to content

docs(tutorial): fix SQLite tutorial CreateAuthor return value (#3336)#4422

Merged
kyleconroy merged 1 commit intosqlc-dev:mainfrom
SAY-5:docs/issue-3336-sqlite-tutorial-fix
May 5, 2026
Merged

docs(tutorial): fix SQLite tutorial CreateAuthor return value (#3336)#4422
kyleconroy merged 1 commit intosqlc-dev:mainfrom
SAY-5:docs/issue-3336-sqlite-tutorial-fix

Conversation

@SAY-5
Copy link
Copy Markdown
Contributor

@SAY-5 SAY-5 commented Apr 30, 2026

Fixes #3336. The SQLite getting-started tutorial showed:

insertedAuthor, err := queries.CreateAuthor(ctx, ...)
queries.GetAuthor(ctx, insertedAuthor.ID)

CreateAuthor for SQLite returns sql.Result, which has no .ID field — readers following the tutorial got a compile error. The MySQL tutorial already shows the correct pattern (result.LastInsertId()); this PR mirrors that into the SQLite version exactly.

Test plan

  • Snippet now compiles against the same sql.Result-returning shape used in the MySQL tutorial (docs/tutorials/getting-started-mysql.md:135)
  • Docs-only change, no code/build impact

@kyleconroy kyleconroy merged commit a45ce7f into sqlc-dev:main May 5, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

getting-started-sqlite.md - wrong return value of queries.CreateAuthor

2 participants