Meta
dbfiddle add tag
PeterVandivier
# `feature-request` inline highlights

When sharing fiddle, often there is a small section of a larger batch or result set you'd like to bring special attention to. 

In addition to the exemplary `&hide=` functionality, we should have an `&show=` parameter that provides highlighting when the page is rendered. Please consider the following by way of a mock-up

---

<>https://dbfiddle.uk/?rdbms=sqlserver_2019&fiddle=12dfc8be15dacf92a521ad2d493b221c

When using the above fiddle on TopAnswers, I would like to display the 3rd and 4th batches only. I would like to highlight use of the `iif()` function, `into` syntax, and the resulting rows in `bar` where we've found an odd number.

I might use a link of the following form: 

`https://dbfiddle.uk/?rdbms=sqlserver_2019&fiddle=12dfc8be15dacf92a521ad2d493b221c`**&hide=3&show=4q,2-6,9&show=8r,2,4**

...containing the supplemental arguments parts...

- `&hide=3`
- `&show=4q,2-6,9`
- `&show=8r,2,4`

...which might show me...

![untitled.png](/image?hash=38c23f027582b8477ace056ae2cd9c8658c7de31ac74a88d15fe30f94e13e8c3)

---

By way of explanation of the mock-up - 

- `&hide=` functions as expected - masking the first two batches
- multiple `&show=` args are permitted
- `&show=` requires a comma-separated series of the form `[1-9(q|r)],[1-9\-],[1-9\-],...`
- the first element of `&show=` is a two-part identifier anchoring the batch using the same bitmask integer one would use for `&hide=`, `q` is used to denote the query portion of the batch, `r` denotes the result-set portion. 
- the elements after the first use the same line-anchor syntax you might use in GitHub (for example). e.g. "2-6" denotes the range of line 2 through line 6. Each comma-separated element is a new highlighted range

In our example...

- `&show=4q,2-6,9` indexes the 3rd batch (id 4) on the query side; and highlights lines 2 through 6 and then line 9
- `&show=8r,2,4` indexes the 4th batch (id 8) on the result-set side; and highlights line 2 and line 4 (counting the header row as line 1)

This room is for discussion about this question.

Once logged in you can direct comments to any contributor here.

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.