Nineya
Home
Blog
软著申请
Gorm Is there any way to pass additional data to hooks?
2025-01-14 08:00:00
670
Your QuestionIs there any way to pass additional data to hooks?I need to pass the user ID of the current logged user to ...
Gorm 软删除之后的行还可以被设置值
2025-01-14 07:59:57
3403
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1Description软删除之后的行还可以通过以下的方式设置值 db.Model(b).Update("PId"...
Gorm Many To Many Query (Filter)
2025-01-14 07:59:53
988
I am having an issue querying a many to many relationship...My relationships are as followstype User struct { ID stri...
Gorm AddIndex 方法问题
2025-01-14 07:59:51
1061
Gorm V1 提供 AddIndex 和 AddUniqueIndex方法可以手动添加索引。旧项目用此方法:例如现在想升级gorm v2,貌似可以用Migrator.CreateIndex, 但是有几个问题:1.要必须在struct字段添...
Gorm 1.22.4版本按照文档软删除失效,反而是硬删除
2025-01-14 07:59:47
2003
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1DescriptionComment From: github-actions[bot]The issue ha...
Gorm How to Preload recursive table?
2025-01-14 07:59:45
6739
Your QuestionI have a reply table that looks like this:type Reply struct { ID string `gorm:"colum...
Gorm Proto3使用的麻烦性
2025-01-14 07:59:43
1554
Describe the feature问题:是否能够支持一种注入方法,实现自定义类型解析原生数据类型,不通过Scan和Value方式。在proto中,定义一个message只能用一些基本类型,比如 repeated map 等对象,假如我...
Gorm Sqlite内存模式下无数据问题
2025-01-14 07:59:40
905
最近在使用该模块,发现一个问题: 1. 在指定sqlite的指定有效时间后(sqliteDb.SetConnMaxLifetime(1 * time.Minute)),发现到达时间后再次请求数据里的连接是无数据的,这个设计有点不理解,...
Gorm How can I access nested model fields for Preload chaining?
2025-01-14 07:59:37
3951
How can I access nested model fields for Preload chaining?The example mentioned on GORM.io works fine but not when using...
Gorm gormV2版本怎么没有beforeFind了呀 看代码和文档只有queryCallback.Register("gorm:after_query",
2025-01-14 07:59:35
195
Describe the feature查询之前,加上钩子 before_queryMotivationbeforeFind before_query这个钩子比较重要,可以在查询前通过钩子查询是不是需要访问缓存Related Issue...
Gorm go get is deprecated, use go install
2025-01-14 07:59:32
688
The documentation still refers to go getgo get is however deprecated. the advice is to use go install Comment From: gith...
Gorm Require a method to return raw sql for pipeline control, not just for logging.
2025-01-14 07:59:30
1129
Describe the featureRequire a method to return raw sql for pipeline control, not just for logging.Most case we use ....S...
Gorm 指教下会话模式的用法
2025-01-14 07:59:27
892
https://gorm.io/zh_CN/docs/context.html能说下会话模式的用法吗?以及什么场景下使用会话模式?如果不使用会话模式难道就会引发并发安全问题吗?Comment From: github-actions[bot...
Gorm Require a method to return raw sql for pipeline control, not just for logging.
2025-01-14 07:59:25
1461
Most case we use ....Scan(), ....First(), ...Find(), ...Delete(), ...Update, ... Updates ...Create to executed a sql.How...
Gorm batch update not support
2025-01-14 07:59:22
2659
I find that gorm has [Upsert / On Conflict] feature, but that means "create NEW and update if exists", it will create ne...
Gorm panic: query after update
2025-01-14 07:59:19
706
Your Questionif I call like this :(update(XXX).First())it will panic:when I debug code:error will return in here:stmt.Sc...
Gorm after create, tx.Statement.SQL.String() got empty
2025-01-14 07:59:06
1143
I tried this, but not got the expectation.func (cars *CARS) AfterCreate(tx *gorm.DB) (err error) { fmt.Println("...
Gorm Reduce CGO for better cross-compile experiences
2025-01-14 07:59:04
319
Describe the featureReduce the use of CGO for better cross-compile experiences. For example, to cross compile operation ...
Gorm List 3rd-party pure-Go SQLite driver in GORM docs
2025-01-14 07:59:02
849
Describe the featureI am maintaining a fully-tested pure-Go SQLite driver for GORM (https://github.com/glebarez/sqlite)T...
Gorm NameReplacer: strings.NewReplacer("Model", "") 会panic
2025-01-14 07:58:59
904
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/432Description我想使用 NameReplacer: strings.NewReplacer("Mod...
上一页
下一页
1
…
997
998
999
1000
1001
…
2246
.