Gorm How can set SQLITE_LIMIT_VARIABLE_NUMBER to resolve too many SQL variable?

HiI got 'too many SQL variable error' when i want to insert to 1000000 rows to my sqlite。The go-sqlite has merged the re...

Gorm 当 preload 的表是分表的时候,设置了分表键, 但仍然提示 sharding key or id required

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1Descriptiondb.Preload("File", "\"file\".user_id = ?", 1)...

Gorm 关于AutoMigrate操作问题

我想使用AutoMigrate的时候配置一次性同步全部的表,避免我每次新增一个表都要去写入下,有什么办法呢Comment From: github-actions[bot]The issue has been automatically m...

Gorm 使用db.Model.Where查询数据时出现明明数据存在却查不到的bug,打开debug模式时bug消失

PRDhttps://c9xudyniiq.feishu.cn/docx/Up8vdYg5ko0FhVx50e3cUSemnFgbug info在nightingale的代码里使用了gorm,通过model.where对某个表的列进行来判断...

Gorm how to get the context in callback after set by db.WithContext() method

Your Questionthe use code:ctx := context.WithValue(context.Background(), "foo", "bar")fmt.Println(&q...

Gorm Cancel Context won't terminate DB query session/process

Your QuestionI have a service that is copying data from one table to another in mysql using GORM. The Query will take ab...

Gorm Bulk updates in gorm

Your QuestionDo gorm support bulk updates? i.e to update every column to different values for each record. I tried sear...

Gorm Unable to stop using gorm default logging

No matter what I do, I can't seem to prevent the gorm default logger from getting invoked.It appears that inside of the ...

Gorm Sqlite Create Fails With Empty String and Default NULL

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/598DescriptionSee playground for example - with sqlite, i...

Gorm Сoncurrent map writes while parsing table

While running the code below, there is a chance of running into an error "fatal error: concurrent map writes"It happens ...

Gorm AutoMigrate Error 1091 (42000): Can't DROP 'uni_sys_users_user_name'; check that column/key exists

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1Descriptionversion:1.25.10question: It can only be execu...

Gorm When not using gorm.Model, .First confuses the primaryKey

https://github.com/go-gorm/playground/pull/1DescriptionWhen not using gorm.Model as the base struct, the method First ge...

Gorm How Many To Many Preload performs conditional query on the intermediate table?

Your QuestionHow Many To Many Preload performs conditional query on the intermediate table?The document you expected thi...

Gorm sqlite AutoMigrate 中比对列长度出Bug

列的tab为:IsSmart int32 `gorm:"column:is_smart;type:tinyint(1);not null;comment:是否智能设备" json:"...

Gorm Is gormDB instance thread safe?

Is gormDB thread safe?I just created a global variable like below code.then can I share this db *gormDB in multiple thre...

Gorm 能否新增WhereIf 根据值过滤条件

原来是这样的:db := s.DB.Model(&Role{}) if query.Code != "" { db = db.Where("code like ?", &q...

Gorm 解析sql报错

正常运行 db.Table("roles"). Select("id", "name", "description", "GROUP_...

Gorm How to modify tablename with plugin and callback?

Your QuestionI want to change all the SQL's table names with a fixed prefix before the process. I don't know how to do t...

Gorm When using the "gen" to generate the code, problem occurred. seems the version problem

DescriptionI use the "gen" to generate the code about accessing to the database.But when execute the "gen", problem occu...
上一页 下一页
.