Repository navigation
fix: Renames from_csv to from_text (#286) - #1514
Conversation
|
Were we also going to have a named-arg for We could merge this, have |
|
I won't put this in the release notes yet given the open question, we can do 0.4.1 in a few days |
|
This function is for parsing string literals - I'm not sure why anyone would prefer writing json instead of csv here... |
|
Not writing, but pasting. I was thinking that you might get some JSON data back from some API and you might quickly just want to run a query over it. It would be convenient if you could just paste it (maybe even in the playground) and then test your query, rather than having to save the data to a file and then run it against that. |
|
I see. Do you think this signature is ok: |
|
Interesting. In #286 we discussed having the signature as from_text format:csv "a,b,c\n1,2,3\n4,5,6"
from_text format:json '[{"a": 1, "b": 2, "c": 3, }, {"a": 4, "b": 5, "c": 6 }]'but your new suggestion is shorter. Having different formats as different named parameters almost makes it a kind of enum and might make autodiscovery simpler and improve errors. I think I might quite like that. Let me think on it a bit. Any pros and cons for either approach that you could see on the code side? |
|
Interesting! I was also thinking about it like I'm not strongly opposed to the For example, we have I'm +0.5 for the |
|
Recent thought on this: to make the API uniform across Therefore I'm now +1 on |
|
It seems that we have a consensus and this can be merged. |
I'd like to add a
formatparameter as well but that can probably come later.This should probably also get a mention in the docs and the changelog. I could take a stab at those in maybe 9 hours time.
I also haven't run any tests as my env is not set up. Will making this a PR automatically trigger a CI run?