Conventions
GoSQL is very opinionated.
Tables
Table names are all snake case of the struct name and singular. type User struct{}
will correspond to the table in the database named user
. type UserProfile struct{}
will correspond to the table in the database named user_profile
.
Columns
Column names are all snake case of the struct field names. Consider the struct:
GoSQL expects the database to have a table named user
with 3 columns: id
, email
, and is_active
.
Last updated