Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How can I use sqlc if I don't know how to write sql files? #1033

Unanswered
frederikhors asked this question in Q&A
Discussion options

I'm using go-pg right now.

I wanna try sqlc but I'm too inexperienced to define PG tables properly.

For example I don't know what is the right choice for ID columns and other definitions which instead using Gorm or go-pg come to me "FREE".

What do you recommend to those like me in this situation?

You must be logged in to vote

Replies: 3 comments

Comment options

That you borrow a book an learn SQL

You must be logged in to vote
0 replies
Comment options

sqlc requires a good understanding of SQL. There's no shame in using other Go ORMs that require less SQL knowledge. If you're just getting into SQL, this is a good place to start: https://gumroad.com/l/sql-zine.

You must be logged in to vote
0 replies
Comment options

You might also check out dbdiagram.io as a step toward learning sql. It's sql-ish and generates sql that can be exported for Postgres, MySql, or Sql Server.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /