Gorm How to convert all Statement.Vars to string? as redis key for me

How to convert all Statement.Vars to string? as redis key for meI can switch case all types,such as int32 bool string ,e...

Gorm 关于Table中的AS问题

项目依赖从以下版本:gorm.io/driver/mysql v1.0.4gorm.io/gorm v1.20.12升级到以下版本:gorm.io/driver/mysql v1.3.3gorm.io/gorm v1.23.6之后,Tabl...

Gorm sql过长查询不出来数据

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1sql过长查询不出来数据Comment From: github-actions[bot]The issue h...

Gorm The func Rows() problem

They confused me with the func Rows()im use [gorm]db.where().Rows() to fetch data. the original is followingbut! [mysql...

Gorm 和clickhouse连接,读取Nullable字段时,报unsupport scan

GORM Playground Link使用gorm+clickhouse连接DB连接import("gorm.io/driver/clickhouse" "gorm.io/driver/mysql")db_ch, dberr = g...

Gorm When updating a record, GORM does not use all defined primary keys.

IssueWhen updating a record, GORM does not use all defined primary keys.Because some of the primary keys are disregarded...

Gorm sqlite3 参数转义错误问题

DB.Where("username = ?", u.Username).First(&user).ErrorMySQl where username='参数' 正确切换 Sqlite 输出SQL 为 where userna...

Gorm sqlite3 automigrate failed "table already exists"

newTableName = "t_candles_temp"createSQL after regep replace is still create table t_candlesComment From: dashessmithli...

Gorm Multiple orders with Clauses() not working

Your QuestionThere is a way to order by FIELD and multiple columns at the same time?Clauses(clause.OrderBy{ Expressio...

Gorm select 首次主键查询非常慢,怎么能够看下查询的各阶段时间消耗

go.mod: gorm.io/driver/mysql v1.3.0 gorm.io/gorm v1.23.0 gorm.io/plugin/soft_delete v1.1.0有啥方法可以查看单次查询各阶段的时间消耗?...

Gorm About AfterFind modifiers not working with preloaded models

No preloading is used, as shown:Use the preload case as shown in Figur:goods := &models.Goods{ Id: id,}db.Debug()...

Gorm overwrite the "type" I set

DescriptionI have 2 struct://like gorm.Modeltype Model struct { Id uint `json:"id" gorm:&...

Gorm Multiple commands in a single connection

Your QuestionHi guys,Now, gorm use database/sql, every command with a connection.In my situation, I want run multiple c...

Gorm db.AutoMigrate failed on postgres after adding new field to struct

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/515DescriptionI am using AutoMigrate as a method of datab...

Gorm sqlite3: collate nocase in where condition

I have a table:create table test( field text);insert into test values ('A');I want to use select * from test where fie...

Gorm gorm is converting times with time zones to UTC before saving

It seems that gorm is converting local times to UTC when writing to my database but the time object in golang has the co...

Gorm Nil as part of where interface

Your QuestionHello. I have a db request with "where" param, which accepts an interface value, and table model one of the...

Gorm Count function not use TableName method

Your Questionif i use the CountRoleByIds function, then report unsupported data type: 0x1400003a688: Table not set, plea...

Gorm bug: Exec(szSql, args...) RowsAffected always is 0

code:xx1 := GetSession().Exec(szSql, args...) xx1 = xx1.Commit() nRst := xx1.RowsAffectedRowsAffected always is 0D...

Gorm How to group conditions dynamically

Your QuestionI have a graphql request base on which I need create query dynamically.query MyQuery { Logs(where: {id: ...
上一页 下一页
.