Skip to content

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

Open
SAY-5 wants to merge 1 commit intosqlc-dev:mainfrom
SAY-5:docs/issue-3336-sqlite-tutorial-fix
Open

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

Conversation

@SAY-5
Copy link
Copy Markdown

@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

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

1 participant