Nineya
Home
Blog
软著申请
Gorm How can set SQLITE_LIMIT_VARIABLE_NUMBER to resolve too many SQL variable?
2025-01-15 04:25:40
1735
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
2025-01-15 04:25:37
791
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1Descriptiondb.Preload("File", "\"file\".user_id = ?", 1)...
Gorm 关于AutoMigrate操作问题
2025-01-15 04:25:34
1907
我想使用AutoMigrate的时候配置一次性同步全部的表,避免我每次新增一个表都要去写入下,有什么办法呢Comment From: github-actions[bot]The issue has been automatically m...
Gorm 使用db.Model.Where查询数据时出现明明数据存在却查不到的bug,打开debug模式时bug消失
2025-01-15 04:25:32
810
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
2025-01-15 04:25:29
1086
Your Questionthe use code:ctx := context.WithValue(context.Background(), "foo", "bar")fmt.Println(&q...
Gorm Cancel Context won't terminate DB query session/process
2025-01-15 04:25:26
1591
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
2025-01-15 04:25:24
756
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
2025-01-15 04:25:21
946
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
2025-01-15 04:25:19
3671
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/598DescriptionSee playground for example - with sqlite, i...
Gorm Сoncurrent map writes while parsing table
2025-01-15 04:25:16
4798
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
2025-01-15 04:25:09
1428
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
2025-01-15 04:25:06
3482
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?
2025-01-15 04:25:04
2397
Your QuestionHow Many To Many Preload performs conditional query on the intermediate table?The document you expected thi...
Gorm postgreSQL Insert []string construct insert statement failed:INSERT INTO "tags" ("tag_names") VALUES (('tag1','tag2','tag3')) RETURNING "id",It should be:INSERT INTO "tags" ("tag_names") VALUES (ARRAY['tag1', 'tag2', 'tag3']) RETURNING "id";
2025-01-15 04:24:54
1385
type Tag struct { ID uintgorm:"primaryKey"TagNames []stringgorm:"type:text[]"` // 指定为 PostgreSQL 的文本数组类型}tag :=...
Gorm sqlite AutoMigrate 中比对列长度出Bug
2025-01-15 04:24:51
767
列的tab为:IsSmart int32 `gorm:"column:is_smart;type:tinyint(1);not null;comment:是否智能设备" json:"...
Gorm Is gormDB instance thread safe?
2025-01-15 04:24:46
1277
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 根据值过滤条件
2025-01-15 04:24:43
1557
原来是这样的:db := s.DB.Model(&Role{}) if query.Code != "" { db = db.Where("code like ?", &q...
Gorm 解析sql报错
2025-01-15 04:24:41
2926
正常运行 db.Table("roles"). Select("id", "name", "description", "GROUP_...
Gorm How to modify tablename with plugin and callback?
2025-01-15 04:24:38
990
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
2025-01-15 04:24:36
2071
DescriptionI use the "gen" to generate the code about accessing to the database.But when execute the "gen", problem occu...
上一页
下一页
1
…
902
903
904
905
906
…
2246
.