-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add [module:PublicationsByPlatform]
#1952
Conversation
@YoshiRulz : how is this PR coming along? the code looks good |
It's finished (helps if I commit before pushing). The problem is #1910 (comment)
|
fb2b6be
to
28156d6
Compare
Yeah that grouping is not any concept we have in our database, and we would lose it if we used the module instead. How important is it @vadosnaprimer ? |
28156d6
to
182f89d
Compare
If grouping functionality is added to the module it'd be an overkill?
|
Turns out we already have modules that have grouping. Example
I believe the same should be done here.
|
182f89d
to
d64def6
Compare
You can test with
|
Grouping works!!! Is it a big DB hit if only non-empty lists are shown? |
IDK ask adelikat edit:
|
9a369ce
to
2ae437d
Compare
{ | ||
var extant = (await platforms.GetAll()).ToList(); | ||
List<IReadOnlyList<SystemsResponse>> rows = []; | ||
void ProcessGroup(string groupStr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this local function necessary here? It seems to be called only once, and it makes the entire method more difficult to parse and understand, because I have to keep going up and down to see what things are affected where.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's that or goto
, since C# doesn't have multi-break
.
edit: I considered having the method return a List<...>?
and then conditionally appending to rows
in the outer loop; do you think that would be better?
resolves #1910