Often I come across references to the SQL-style operators (JOIN, INDEX, IN) in e.g. StackOverflow answers (this one has both INDEX and IN), and I have wondered what they are and how they work*. And I suspect that I'm not the only one.
Trouble is, when I use my favourite mechanism for this - the search box in the jq manual, I cannot find any reference to them. For example, INDEX doesn't show up:
I thought I'd create this issue to start the conversation. I rigged up a docs test environment in which I could experiment, and here's one way of addressing this gap. I'm not suggesting it's the best way, but I thought I'd share it anyway to get things started.
I just extended the sectionIDs object used by the autocomplete mechanism like this:
and the result is that these three operators can now be found in the search box, and all lead to the SQL-Style Operators section:
Alternatively, there is also the option of modifying the documentation content to elevate each of the operators so that they have their own section ID, but I'm not sure whether that's ideal.
Anyway, I wonder if this is something you'd consider. Thanks!
Instead of hard coding, it would be great if command line arguments and formatting strings have individual id attributes. We can extract by pattern <li><code>.*</code>:</li> from entry bodies.
Often I come across references to the SQL-style operators (JOIN, INDEX, IN) in e.g. StackOverflow answers (this one has both INDEX and IN), and I have wondered what they are and how they work*. And I suspect that I'm not the only one.
Trouble is, when I use my favourite mechanism for this - the search box in the jq manual, I cannot find any reference to them. For example, INDEX doesn't show up:
I thought I'd create this issue to start the conversation. I rigged up a docs test environment in which I could experiment, and here's one way of addressing this gap. I'm not suggesting it's the best way, but I thought I'd share it anyway to get things started.
I just extended the
sectionIDs
object used by the autocomplete mechanism like this:and the result is that these three operators can now be found in the search box, and all lead to the SQL-Style Operators section:
Alternatively, there is also the option of modifying the documentation content to elevate each of the operators so that they have their own section ID, but I'm not sure whether that's ideal.
Anyway, I wonder if this is something you'd consider. Thanks!
* I did dig into a couple of these, they're great!