mtxr / vscode-sqltools

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

Handle SQLite driver's `${workspaceFolder:rootFolderName}/...` database path format correctly on Windows (#703) #961

Closed gjsjohnmurray closed 2 years ago

gjsjohnmurray commented 2 years ago

The SQLite driver had been coded to transform an absolute path for a database file within the workspace, storing it in the connection definition with a ${workspaceFolder:rootFoldername}/ prefix instead. This is done so that if the connection definition is put in a source-controlled XYZ.code-workspace or .vscode/settings.json file and the database is also committed to source control then the connection will work regardless of where another developer places their pulled copy of the connection config file and the database.

However the mechanism wasn't working correctly on Windows, resulting in the symptoms described in #703.

This PR resolves the issue by publishing a corrected version 0.1.11 of @sqltools/base-driver, then using that in driver.sqlite.


Thank you for your contribution! Before submitting this PR, please make sure:

codecov[bot] commented 2 years ago

Codecov Report

Merging #961 (13f5f57) into dev (37c6ad0) will decrease coverage by 0.00%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##              dev     #961      +/-   ##
==========================================
- Coverage   10.00%   10.00%   -0.01%     
==========================================
  Files         175      175              
  Lines        5867     5868       +1     
  Branches     1376     1376              
==========================================
  Hits          587      587              
- Misses       5280     5281       +1     
Flag Coverage Δ
extension 10.00% <0.00%> (-0.01%) :arrow_down:
formatter 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/base-driver/src/index.ts 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.