Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat(datatypes): improve details on TEXT
  • Loading branch information
josethz00 authored Mar 5, 2024
commit 8229e38b9ef436c9a7d5d3fea76166a9b8559c6d
4 changes: 4 additions & 0 deletions docs/reference/datatypes.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@ type Book struct {
}
```

## TEXT

For PostgreSQL, when you have a column with the `TEXT` type, sqlc will map it to `pgtype.Text` by default. If you want to use it as a string in your Golang application, you will need to override it. The `TEXT` datatype is an unlimited size VARCHAR, so, for this reason, if you want to map the `TEXT` SQL datatype to a Golang `string`, you must set the option `pointer: true` in your overrides config. The same applies to MySQL and other supported SQL databases.

## Geometry

### PostGIS
Expand Down