Add support for time.Time objects to gorp. #67
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit adds support for storing and retriving time.Time objects,
by passing through such objects to the underlying driver. This
resolves gorp issue #14.
The commit is tested and works with the github.com/mattn/go-sqlite3
driver.
The commit does not currently work with the
github.com/ziutek/mymysql/godrv driver, due to a bug in the mysql
driver. This problem is resolved by mymysql pull request #77. I have
successfully tested that with the fix from pull request #77 applied to
mymysql, and with the current commit applied, gorp can correctly store
and retrieve time.Time objects from mysql databases.
This commit is NOT tested with the github.com/lib/pq driver.