go-gorm / sharding

High performance table sharding plugin for Gorm.
MIT License
264 stars 56 forks source link

sharding.Register((sharding.Config literal), (model.XXXX literal)).Register undefined (type *sharding.Sharding has no field or method #117

Open godtell opened 1 year ago

godtell commented 1 year ago

code: db.Use(sharding.Register(sharding.Config{ ShardingKey: "user_id", NumberOfShards: 64, PrimaryKeyGenerator: sharding.PKSnowflake, }, "orders").Register(sharding.Config{ ShardingKey: "user_id", NumberOfShards: 256, PrimaryKeyGenerator: sharding.PKSnowflake, // This case for show up give notifications, audit_logs table use same sharding rule. }, Notification{}, AuditLog{})) the second Register function show error below: *sharding.Register((sharding.Config literal), (model.XXXX literal)).Register undefined (type sharding.Sharding has no field or method** why? thanks.

omer9564 commented 1 month ago

Any update on that? Don't mind contributing that with a bit of guidance