Skip to content

Conversation

@come-nc
Copy link
Contributor

@come-nc come-nc commented May 2, 2023

Summary

Since this is a new method in 27 it’s the occasion to make use of a generator instead of an array

Checklist

@come-nc come-nc added the 2. developing Work in progress label May 2, 2023
@come-nc come-nc added this to the Nextcloud 27 milestone May 2, 2023
@come-nc come-nc self-assigned this May 2, 2023
@skjnldsv skjnldsv mentioned this pull request May 3, 2023
@come-nc come-nc force-pushed the enh/use-iterable-for-searchingroup branch from 6659f28 to 8a8355a Compare May 4, 2023 12:30
This was referenced May 9, 2023
$users[$row['uid']] = new LazyUser($row['uid'], $userManager, $row['displayname'] ?? null);
yield $row['uid'] => new LazyUser($row['uid'], $userManager, $row['displayname'] ?? null);
}
$result->closeCursor();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not get called if the Generator is not exhausted by the caller, so this approach may be problematic.
Anyone have a better idea on how to do that?

@come-nc
Copy link
Contributor Author

come-nc commented May 11, 2023

Abandoning this, not enough time to try it out and see if it helps, and find a way to fix the cursor close problem.

@come-nc come-nc closed this May 11, 2023
@skjnldsv skjnldsv deleted the enh/use-iterable-for-searchingroup branch March 14, 2024 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants