[backend]
name = "go-pgx"
language = "go"
file_extension = "go"
engine = "redshift"
description = "Go code generation targeting pgx v5 with Redshift"

[types.scalars]
bool = "bool"
int16 = "int16"
int32 = "int32"
int64 = "int64"
float32 = "float32"
float64 = "float64"
string = "string"
bytes = "[]byte"
uuid = "uuid.UUID"
decimal = "decimal.Decimal"
date = "time.Time"
time = "time.Time"
time_tz = "time.Time"
datetime = "time.Time"
datetime_tz = "time.Time"
interval = "time.Duration"
json = "json.RawMessage"
inet = "netip.Addr"
super = "json.RawMessage"
geometry = "string"

[types.containers]
array = "[]{T}"
nullable = "*{T}"
range = "string"
json_typed = "{T}"

[naming]
struct_case = "PascalCase"
field_case = "PascalCase"
fn_case = "PascalCase"
enum_variant_case = "PascalCase"
row_suffix = "Row"

[imports.rules]
"time." = "\"time\""
"decimal." = "\"github.com/shopspring/decimal\""
"uuid." = "\"github.com/google/uuid\""
"json." = "\"encoding/json\""
"netip." = "\"net/netip\""
