Skip to content

Conversation

icholy
Copy link
Contributor

@icholy icholy commented Oct 16, 2017

This lets you use nullable types without hard-coding them. Here's how you use it:

dbmap := &gorp.DbMap{Db: db, Dialect: gorp.PostgresDialect{
	TypeMap: map[reflect.Type]string{
		reflect.TypeOf(MyInt64{}):   "bigint",
		reflect.TypeOf(MyFloat64{}): "double precision",
		reflect.TypeOf(MyTime{}):    "bigint",
	},
}}

Addresses #348 #334

@icholy
Copy link
Contributor Author

icholy commented Oct 18, 2017

I just found SqlTyper

@icholy icholy closed this Oct 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant