Skip to content

Commit

Permalink
Added Hstore as it's native type, and map Inet to string.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Lianza committed Jan 21, 2017
1 parent 1f80f9b commit db10a24
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion loaders/postgres.go
Expand Up @@ -80,7 +80,7 @@ func PgParseType(args *internal.ArgType, dt string, nullable bool) (int, string,
typ = "sql.NullBool"
}

case "character", "character varying", "text", "money":
case "character", "character varying", "text", "money", "inet":
nilVal = `""`
typ = "string"
if nullable {
Expand Down Expand Up @@ -176,6 +176,9 @@ func PgParseType(args *internal.ArgType, dt string, nullable bool) (int, string,
asSlice = true
typ = "byte"

case "hstore":
typ = "hstore.Hstore"

default:
if strings.HasPrefix(dt, args.Schema+".") {
// in the same schema, so chop off
Expand Down

0 comments on commit db10a24

Please sign in to comment.