Skip to content
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

Add SQLite3 storagetype to gorma #132

Closed
wants to merge 4 commits into from
Closed

Add SQLite3 storagetype to gorma #132

wants to merge 4 commits into from

Conversation

jsimonetti
Copy link
Contributor

This PR will add the SQLite3 StorageType to gorma.
SQLite is an ideal database to use for development purposes. Supporting SQLite3 in gorma will help with local development of gorma backed API's.

Signed-off-by: Jeroen Simonetti jeroen@simonetti.nl

Signed-off-by: Jeroen Simonetti <jeroen@simonetti.nl>
@jsimonetti
Copy link
Contributor Author

I have no idea why this would fail on 1.5.3 and builds fine on 1.6 ...

This change will add an update map to the generated Update functions.
This will work around an issue with gorm and updates using structs.

From gorm manual:
// WARNING when update with struct, GORM will only update those fields that
with non blank value
// For below Update, nothing will be updated as "", 0, false are blank values
of their types
db.Model(&user).Updates(User{Name: "", Age: 0, Actived: false})

Signed-off-by: Jeroen Simonetti <jeroen@simonetti.nl>
@raphael
Copy link
Member

raphael commented Oct 5, 2016

Please update the list of Go versions in the .travis yaml file to:

  • Remove 1.5.3
  • Change 1.6 to 1.6.3
  • Add 1.7.1

Thank you!

Signed-off-by: Jeroen Simonetti <jeroen@simonetti.nl>
Signed-off-by: Jeroen Simonetti <jeroen@simonetti.nl>
@jsimonetti
Copy link
Contributor Author

This PR has 1 too many commits, let me re-add it.

@jsimonetti jsimonetti closed this Oct 6, 2016
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