(ctx context.Context, start, end *time.Time)
| 137 | ) |
| 138 | |
| 139 | func (c *userClient) CountByTimeRange(ctx context.Context, start, end *time.Time) (int, error) { |
| 140 | if start == nil || end == nil { |
| 141 | return c.client.User.Query().Count(ctx) |
| 142 | } |
| 143 | return c.client.User.Query().Where(user.CreatedAtGTE(*start), user.CreatedAtLT(*end)).Count(ctx) |
| 144 | } |
| 145 | |
| 146 | func (c *userClient) UpdateNickname(ctx context.Context, u *ent.User, name string) (*ent.User, error) { |
| 147 | return c.client.User.UpdateOne(u).SetNick(name).Save(ctx) |
nothing calls this directly
no test coverage detected