> For the complete documentation index, see [llms.txt](https://twharmon.gitbook.io/gosql/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://twharmon.gitbook.io/gosql/conventions.md).

# 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:

```go
type User struct {
    ID       int `gosql:"primary"`
    Email    string
    IsActive bool
}
```

GoSQL expects the database to have a table named `user` with 3 columns: `id`, `email`, and `is_active`.
