Gorm how to use stored procedures

Descriptionidiot bot , How to use mysql procedures.How to get multiple result setsComment From: github-actions[bot]The ...

Gorm Is it possible to prefix the sql statement columns with a pg schema name?

On a per query basis, would it be possible to prefix the column names that get generated in the sql statements with a sc...

Gorm 支持自定义表名或者可以通过ctx构建schema.table的表名形式

Describe the feature通过ctx构建schema.table的表名形式Motivation在开发多租户的系统时使用PG数据库, 此时通过schema应用租户隔离, 这时tableName不支持动态改变, 只能使用table...

Gorm 每次编译后程序有时候找不到数据库的字段有时候可以找到

我有一个这样结构的表我对它进行查询时有时候会报找不到user_id字段的错误而如果我重新编译它这个错误就会消失并出现在几次编译之后这是我的模型请问这个是因为什么,谢谢Comment From: github-actions[bot]The ...

Gorm [Aliyun ADB MySQL] Unsupported column type: 245

[ADB MySql]adb mysql version: 3.1.3.8mysql column type: json array, e.g. ["basketball", "football"]sdk: golang gormERROR...

Gorm Create duplicate index when AutoMigrate table schema

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1Descriptionreproducepackage mainimport ( "gorm.i...

Gorm logger writer 支持 context

Describe the feature在自定义的logger接口中传入 context,如下所示type Writer interface { Printf(context.Context, string, ...interface...

Gorm 使用string 条件时 出现语法错误

model.DB.Where("show = ?", 1).Debug().Find(&plans)model.DB.Where("id = ?", 1).Debug().Find(&...

Gorm v1.23.6 Find数据行错误

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1Description使用FIND查询数据到结构数组时,数据行错乱。第一行的数据可能填充到第三行了。恢复到v1....

Gorm 批量从创建的时候的数据越界问题

在批量创建的时候会报数组越界的错误,但是我不知道为什么会这样。我的想法是写这样一个sql:INSERT INTO tag (`name`, num) VALUES ('奇幻', 1), ('杂志', 1), ('男同', 1) ON DUP...

Gorm Scan数据集可为null字段时值混乱

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1Description数据表 数据如图:// modeltype User struct { Name ...

Gorm SQL log failed with mssql.UniqueIdentifier type

My struct has a memeber of mssql.UniqueIdentifier type.type Demo struct{ ID mssql.UniqueIdentifier}The output of sql log...

Gorm Model接口无法使用动态的TableName

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1Description某些场景下,我希望通过Model接口,动态地根据数据模型的属性值决定最终的TableNam...

Gorm Scan 时busy buffer 导致 connection timed out

出错代码type Member struct { ID int `json:"id"` Phone string `json:"phone"`}rs := []Member{}...

Gorm Use interface as the model when Updates

Your QuestionThe following code works well in gorm v1.type Object struct { ...}func (obj *Object) Scan(value inter...

Gorm Range query using map condition

Can I pass in a map in gorm to support range query for numeric or time-based values? Like, if I have a column named mile...

Gorm How to Smart Select Fields "struct in struct" ?

I have this structtype UserData struct { Name string json:"name" Address struct { Country string json:"c...

Gorm could not launch process: could not open debug info

1.environment: (1)os: ubantu 22.04 (2)kenel: Linux xyl-virtual-machine 5.15.0-27-generic #28-Ubuntu SMP Thu Apr ...

Gorm 自定义多对多的表无法插入数据

Your QuestionThe document you expected this should be explained我有一个用户表和一个用户组的表,他们之间是多对多的关系,我自定义可以通过多对多的关联表实现查找/删除,但是增加报错...

Gorm Saving preload object re creates entires for all preloaded associations

GORM Playground LinkFor examhttps://github.com/go-gorm/playground/pull/1DescriptionWhat is happening?I have a Quiz model...
上一页 下一页
.