Closed LordFlashmeow closed 4 years ago
This functionality was considered originally, but it ended up making the functions themselves very verbose. I therefore opted to implement any query commands as methods to reduce the number of arguments in the constructors.
I agree that this is suboptimal, but I am a bit short on alternatives that don't cause more confusion (i.e. "why is X a parameter but Y isn't?"). We could look into parameter objects or piles of anonymous kwargs, but neither struck me as overly intuitive.
Maybe my initial idea of sticking close to the source was flawed - after all, what's the point of an API wrapper if it's just the same convoluted system using a different syntax?
// Edit: See #8 regarding the last rhetorical question.
Implemented in f6c085af.
Is your feature request related to a problem? Please describe. I would like to pass a list of fields to show into my query without having to call the
show()
function.Describe the solution you'd like Adding show to the initializer of Query and Join of the type
List[str]
Describe alternatives you've considered Passing in show as a
Term
does not add the command. Additionally,hide_fields()
(orset_hide_fields()
depending on if the PR goes through) takes fields after the first as*args
instead of a list, so it is more challenging to set the fields if you already have a list.Additional context Add any other context or screenshots about the feature request here. I'll add to the PR soon.