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.
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.