Nineya
Home
Blog
软著申请
Gorm 查询"timestamp"时间类型,时区丢失问题
2025-01-14 08:11:13
1464
大背景: java改go数据库时间类型"timestamp", 存储为当地时间(没有带时区, 且没有做时区偏移处理) : 数据如下实现: java接口不变, impl由go提供。java使用Date,go使用time.Time接收时间类型...
Gorm can not link clickhouse
2025-01-14 08:11:07
1444
clickhouse version == 20.12.4.5Comment From: zhuyujie000please help me.Sorry my English is not good enoughComment From: ...
Gorm 希望支持 optimisticlock 插件。
2025-01-14 08:11:01
3526
在使用gorm-gen时,出现panic生成语句:g.GenerateModel("user", optVersionType := gen.FieldType("version", "op...
Gorm cannot use []uint8{1,2} for where condition, only support []string{"1", "2"}
2025-01-14 08:10:58
4701
DescriptionI use gin + gorm + postgresqlI defined consts:const ( cpnTypeCheckbox uint8 = 20 CpnTypeCascader uint8 ...
Gorm Using a pointer for a foreign-key related field yields unexpected behavior when selecting multiple values
2025-01-14 08:10:56
3728
Your QuestionSuppose you have database models as follows:package storagetype Country struct { ID string `json:"...
Gorm Scan does not return RowsAffected when update
2025-01-14 08:10:53
1140
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1Descriptionversiongorm.io/driver/mysql v1.1.2 gorm.io...
Gorm Update的时候,如果指定了model,不能根据主键生成where条件
2025-01-14 08:10:50
2731
v1.23.5func Test_update_where(t *testing.T) { defer func() { if r := recover(); r != nil { fmt.Prin...
Gorm Please considering support 'using tag to generate forerign keys'
2025-01-14 08:10:38
7231
This is first time I use Gorm, it's really amazing and very easy to use.But it cost me lots of time to figure out how to...
Gorm How to inject dependencies into hooks?
2025-01-14 08:10:35
1505
Your QuestionA hook is a method on a model that receives a DB object (and a pointer to itself). This limits possible hoo...
Gorm [error] unsupported data type: &[]
2025-01-14 08:10:32
949
gorm.io/gorm v1.23.62022/06/11 09:24:58 github.com/hktalent/goSqlite_gorm@v1.0.6/pkg/db/db.go:48[error] unsupported data...
Gorm model cannot create time type
2025-01-14 08:10:25
2079
type LotteryResultDate struct { Id int64 `gorm:"primary_key"` CreatedAt time.Time `gorm:...
Gorm Panic on AutoMigration
2025-01-14 08:10:22
4254
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1DescriptionAutoMigration panic when add new column.panic...
Gorm [mysql] Omit("SomeReference.*") does empty insert for references
2025-01-14 08:10:20
1554
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/435DescriptionGorm v1.22.5For objects with a "has one" or...
Gorm Upsert with has_many association
2025-01-14 08:10:17
4741
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/459DescriptionIn this sample, I have a model Article with...
Gorm why sql count use 'count(*)' not use 'count(1)'?
2025-01-14 08:10:15
1392
if my table is more than ten million data, it use more than ten seconds. if i use count(1), it will save half time.Comme...
Gorm AutoMigrate PostgreSQL deadlock (V1.23.5)
2025-01-14 08:10:12
753
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/451DescriptionAutoMigrate(PostgreSQL,timestamptz(0)) Firs...
Gorm clause.OnConflict{UpdateAll: true} 不会更新 update_time
2025-01-14 08:10:10
2817
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/481Description`package mainimport ( "fmt" "time""go...
Gorm When I only need to query one field,I want user Scan() to receive result by an array of underlying variable types
2025-01-14 08:10:06
156
Describe the feature当我使用gorm查询返回某一个字段结果时候,我希望用一个int数组或者string数组进行直接接收,而不是需要定义一个结构体数组获取返回结果Motivation查询统计数据的时候会很需要这样的功能,能...
Gorm sqlite AutoMigrate时报错converting argument $1 type: unsupported type clause.Expr, a struct
2025-01-14 08:10:03
2142
Description在v1.22.4报错:gorm.io/driver/sqlite@v1.1.4/migrator.go:108 sql: converting argument $1 type: unsupported type cl...
Gorm When using FindInBatches, is it necessary to judge tx.Error in the handler function
2025-01-14 08:09:54
713
Your Question`// batch size 100result := db.Where("processed = ?", false).FindInBatches(&results, 100, func(tx *gorm...
上一页
下一页
1
…
986
987
988
989
990
…
2246
.