Relative Content

Tag Archive for gogo-gorm

mysql data cannot be queried using go gorm

I use gorm to count qps of mysql, but the query data is always empty.
The program did not report any errors, and I could have used similar code to get my own test table data.

Generic function to upsert objects using gorm in Go for mssql?

I’m attempting to create a generic function in Go for upserting objects in a Microsoft SQL Azure database using gorm, but am not too familiar with the details in the documentation for gorm and wanted to confirm this is doing what I am expecting.

Optional relations in database model in GORM

Using a custom DbAuthoring model I add fields createdBy to my database models. This works fine (I have to populate them manually fetching the user ID out of the JWT claim though).