func (d Dao) UpdatePointsIncrement(ctx context.Context, userPoints map[string]int) error {
	queries := make([]db.Query, 0, len(userPoints))
	for username, points := range userPoints {
		queries = append(queries, db.NewExecFunction("user_update_points_increment", username, points))
	}
	if err := d.db.Exec(ctx, queries...); err != nil {
		return fmt.Errorf("incrementing user points: %w", err)
	}
	return nil
}
// UpdatePointsIncrement increments the points for multiple users by the amount defined in the map.
UpdatePointsIncrement increments the points for multiple users by the amount defined in the map.
// UpdatePointsIncrement increments the points for multiple users by the amount defined in the map .
func (d Dao) UpdatePointsIncrement(ctx context.Context, userPoints map[string]int) error {
	queries := make([]db.Query, 0, len(userPoints))
	for username, points := range userPoints {
		queries = append(queries, db.NewExecFunction("user_update_points_increment", username, points))
	}
	if err := d.db.Exec(ctx, queries...); err != nil {
		return fmt.Errorf("incrementing user points: %w", err)
	}
	return nil
}
func ( d Dao ) UpdatePointsIncrement ( ctx context . Context , userPoints map [ string ] int ) error { queries := make ( [ ] db . Query , 0 , len ( userPoints ) ) for username , points := range userPoints { queries = append ( queries , db . NewExecFunction ( " " , username , points ) ) } if err := d . db . Exec ( ctx , queries ... ) ; err != nil { return fmt . Errorf ( " " , err ) } return nil }
UpdatePointsIncrement increments the points for multiple users by the amount defined in the map.
UpdatePointsIncrement increments the points for multiple users by the amount defined in the map .