Skip to content

Conversation

jasonblanchard
Copy link
Contributor

@jasonblanchard jasonblanchard commented Aug 5, 2022

The example for transactions is a little confusing for a few reasons:

  1. It mentions WithTx, but then it never actually calls it
  2. Confusing use of the db package - I believe db.Begin(ctx) should be p.Begin(ctx)

My suggestion here does a few things:


  1. Fixes the above issues.
  2. Uses naming conventions that match the “Getting started with PostgreSQL” tutorial (i.e package tutorial, queries, schema.sql, query.sql, db, etc).
  3. Use database/sql and lib/pq to match the “Getting started with PostgreSQL” tutorial.

Copy link
Collaborator

@kyleconroy kyleconroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the improvements!

@kyleconroy kyleconroy merged commit a2a6f16 into sqlc-dev:main Aug 7, 2022
jlisthood pushed a commit to jlisthood/sqlc that referenced this pull request Apr 28, 2023
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.

2 participants