8000 Added TypeMap support by icholy · Pull Request #49 · jmoiron/modl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added TypeMap support #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Added TypeMap support #49

wants to merge 1 commit into from

Conversation

icholy
Copy link
@icholy icholy commented Oct 16, 2017

This is just a proof of concept, but if I get the go-ahead i'll add docs/tests. Here's how it would work.

dbmap := modl.NewDbMap(db, modl.PostgresDialect{
	TypeMap: map[reflect.Type]string{
		reflect.TypeOf(sql.NullInt64{}):   "bigint",
		reflect.TypeOf(sql.NullFloat64{}): "double precision",
	},
})

This addresses #45

@tmc
Copy link
Collaborator
tmc commented Oct 21, 2017

@icholy I think this would be a nice addition

@icholy
Copy link
Author
icholy commented Oct 21, 2017

@tmc I'm using the SqlTyper interface.

@icholy icholy closed this Oct 21, 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.

2 participants
0