mtxr / vscode-sqltools

Database management for VSCode
https://vscode-sqltools.mteixeira.dev?utm_source=github&utm_medium=homepage-link
MIT License
1.43k stars 290 forks source link

Leading Spaces Are Trimmed in Results Pane #1266

Open fuzl-llc opened 6 months ago

fuzl-llc commented 6 months ago

Describe the bug Whitespace is trimmed from results.

Steps to reproduce the behavior:

  1. Run these two queries: select 'blah'; select ' blah';

  2. Notice that the results for the second select (which contains a leading space) does not show the leading space, i.e. the results of both appear the same.

Expected behavior I would expect the contents of the cell showing the first result to be 'blah' and that of the second to be ' blah' so we can actually see and indent since there was a space there.

Motivation

  1. It seems like this is a bug and should be fixed just for correctness sake.
  2. This is useful for some queries I use to visualize hierarchies where I pad with spaces (and use a fixed width font) to indent child values.