Open lvaudor opened 1 year ago
Ah nice, let me look how {cli} handles this, I know it has glue-like syntax. Or we could use glue under the hood anyway :thinking:
mmh so it's not as easy as I thought.
I wonder whether it's worth the complexity, honestly, compared to letting the users construct their strings.
Hey!
I'm working on a vignette in which I want to run a "combined" query. First I go and search laboratory identifiers (lab) and then I try and find all publishing people affiliated to this lab.
For example, lab_EVS="https://data.archives-ouvertes.fr/structure/390864"
This does not work if I remove the call to
glue::glue()
, I guess because of something to do with environments :I find that (mildly) annoying because the use of this {object} notation in triple patterns is mainly useful when used in combined queries and thus in functions (well, for those who use purrr instead of [for] loops anyway).
Actually the only other use that I can think of the {object} notation (when not used for iterative processes) is keeping the query "nice and concise" i.e. instead of showing long urls in the code, one can assign a name to these urls and use the name in the query.
(Anyway, the necessity to use glue::glue is NOT a big problem but it's still something more to think of when building combined queries so I just thought I should document this somewhere ;-) )