Gorm FirstOrCreate(gorm@v1.22.4) return RowsAffected with value 1 when record already exist

Your QuestionFirstOrCreate(gorm@v1.22.4) return RowsAffected with value 1 when record already exist , while FirstOrCreat...

Gorm FirstOrCreate(gorm@v1.23.4) return RowsAffected with value 1 when record already exist

FirstOrCreate RowsAffectedDescriptionhttps://github.com/go-gorm/gorm/issues/4996 has fix, but gorm@v1.23.4 still exists....

Gorm DB.Count函数貌似存在bug

在对某个字段group by后使用DB.Count统计总共条数时,如果group by后只有一个分组, DB.Count函数将获取到该分组下一共有多少条数据(即在sql中使用COUNT(*)时获取的数据)例如这种情况我想通过DB.Count...

Gorm Set read-only field using OnConflict clause

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/584DescriptionI set id column read-only, but succesfully ...

Gorm Check Constraint with Custom Error Message

Your QuestionSupposed I have a model:type Issue struct { gorm.Model UserLevel string `gorm:"type:TINYINT;not ...

Gorm Which type can be used to represent Array type in ClickHouse?

Your QuestionI use string array to represent array type, like this.type Row struct { FieldA []string}But I got unsupp...

Gorm Prepared statement pgx_ does not exist (SQLSTATE 26000) Error

DescriptionI keep getting this message on the live version: DB Version: PostgreSQL 14ERROR: prepared statement "pgx_8" ...

Gorm BIGINT UNSIGNED value is out of range

Sql :update table set column = column - 1;This column is bigint and is not unsigned;I exec this sql in the mysql termina...

Gorm How to escape characters for index expressions?

Many functions that are classified by GORM as expressions have commas in them. However, as the expression is listed in a...

Gorm 多协程用同一个db速度会很慢的问题

最近在做查询优化的工作。当我尝试用多协程协助查询的时候,每个协程得到结果的速度随着协程数量增加而增加。于是我进行了如下测试。原生sql执行的时间为600ms。开启多个不同数量的协程跑同样的sql。下面是测试数据,1,600ms,2,621m...

Gorm Model automigrate foreign key generate bug

GORM Playground Link具体问题见下Description// 短信模板type SMSTemplate struct { gorm.Model Name string // 模板...

Gorm GORM time.Time tag default value invalid

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1Descriptiontype Student struct { Name string `...

Gorm nil error returned instead of record not found with Raw()

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/334DescriptionAFAICT, GORM doesn't return record not foun...

Gorm Bug: gorm:"default:null" Tag Causes AutoMigrate to Drop and Recreate Table

Your QuestionThis is a bug, but I do not know how to write a test case for it. It is only observed through the logs. T...

Gorm dbname.tablename

eg:select * from db1.name as a inner join db2.name as b on a.id=b.id If I use sql, the table does not existbecause The d...

Gorm if column name dupilicat, just return one column

type School struct { ID int64 `gorm:"primary_key" json:"id"` Name string `json:"name&q...

Gorm Automatically execute ALTER TABLE MODIFY COLUMN ,But I didn't write such code

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1DescriptionI didn't write such business in the code:ALTE...

Gorm Searching for a nonexistent record does not return ErrRecordNotFound

When I search for a nonexistent record, no error is returned, while I expect for ErrRecordNotFoundhere is an example:pac...

Gorm How to use upsert in bulk data

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

Gorm Preload panics if at least one of parent model field's value is NULL

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/537DescriptionUser and UserProp models are saved independ...
上一页 下一页
.