Gorm 使用了 DBResolver 读写分离怎么获取对应的数据库连接地址 和 DB.Stats()

使用了 DBResolver 读写分离怎么获取对应的数据库连接地址 和 DB.Stats()Comment From: github-actions[bot]The issue has been automatically marked a...

Gorm Please add support Fiber.Map for parameter and result

Describe the featuremake fiber.Map for parameter and result rather than write result := map[string]interface{}{} example...

Gorm 关于查询构建器的之后是否会扩展更多类型,补充 in / not in / eq / ge 等,而非仅仅只有目前的where or 等搜索?

Your Question因为在开发过程中,使用where需要以字符串的形式去拼接sql。不是很方便。我自己写了querybuild 用来在调用where 的时候使用。package querybuildimport ( "...

Gorm 是否有postload方法

Your Questiongorm有preload的方法,但是有的时候,我已经获取到了model或者model数组,想要加载其中的某个关联字段比如type Answer struct { ID int64 ...

Gorm generated always as not work on mysql

GORM codetype User struct { ID string //`gorm:"default:uuid_generate_v3()"` // db func FirstName ...

Gorm 外键命名过于严格问题,很多直觉能够成功的情况,皆迁移失败

外键命名过于严格问题,很多直觉能够成功的情况,皆迁移失败https://gorm.io/zh_CN/docs/conventions.html只有这一种命名方式,能够成功1成功// 用户表type ManUser struct { M...

Gorm Multiple foreign keys saving problem

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/513DescriptionThe case of using several foreign keys to d...

Gorm Syntax Error on AutoMigrate Existing Database

SQLite3 DBuser.gopackage databaseimport ( "fmt" "infohubserver/internal/utils" "strcon...

Gorm 并发更新数据的时候怎么加锁

user := &User{} if err := Db.Select("diamond").Where("uid = ?", uid).First(user).Error; err != nil { log.P...

Gorm 使用gorm save(&model)方法更新记录时, time字段每次保存时会增加8个小时

Your issue may already be reported! Please search on the issue track before creating one.What version of Go are you usin...

Gorm Bug: SQLite foreign key not created on self-reference

I have this exampleOne-To-Oonetype Category struct { gorm.Model Name string `json:"name" gorm:&q...

Gorm There is a problem with SQL injection when querying with SELECT

GORM Playground LinkI created a Device model and automatically generated the table, then used the Select method to query...

Gorm dsn parse error

When use sqlserver with password "E3pl2021#@!" report error:failed to initialize database, got error parse "sqlserver://...

Gorm postgres: multiple default values specified for column "id" of table "posts"

https://github.com/go-gorm/gorm/blob/8c3018b96aea241a35b769291de6edd2a3378b44/tests/postgres_test.go#L65-L75problemmulti...

Gorm Model field tag "default" not working correctly

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/498DescriptionI need to create record in DB with false (b...

Gorm bug: update sql does't return error in myql5.7

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/509Descriptionsee pr⬆️Comment From: a631807682- update us...

Gorm How to get LastInsertId when Create with map?

Your QuestionThe docs says now it is able to Create() from mapdb.Model(&User{}).Create(map[string]interface{}{"...

Gorm After upgrade to v0.2.36 got too many clients error

I upgrade gorm.io/gorm to v0.2.36 and gorm.io/driver/postgres to v.0.2.9I got : server error (FATAL: sorry, too many cli...

Gorm insert json failed with zero value on sqlite3

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/507codepackage mainimport ( "log" "o...

Gorm gorm.io/driver/postgres/migrator.go:628:25: undefined: migrator.Index

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1DescriptionComment From: github-actions[bot]The issue ha...
上一页 下一页
.