Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to save results as CSV or JSON. EXPORT, Open Results and Save Results all broken. #832

Closed
pbower opened this issue Jun 22, 2021 · 2 comments · Fixed by #880
Closed
Labels

Comments

@pbower
Copy link

pbower commented Jun 22, 2021

After running a query, 'Save as CSV' or 'Save as JSON' options do not work.

Steps to reproduce the behavior:

  1. Go to SQLTools and run a query.
  2. Click on EXPORT, 'Open Results', or 'Save Results'
  3. For EXPORT, nothing happens and no notification.
  4. For Save Results/Open Results, See error

Expected behavior:
A saved CSV file or JSON file on hard drive. XLSX would be nice too, but out of scope for a fix.

Screenshot:
Screenshot from 2021-06-22 11-02-14

Desktop

  • SQLTools Version 0.23.0
  • VSCode Version: VSCode Version 1.58.0-insider
  • OS: Ubuntu 20.04.2 LTS focal
  • Driver:
    • PostgreSQL/Redshift

Additional context
It has never worked, including on older versions to my knowledge, for the last 6-12 months.

@pbower pbower added the triage label Jun 22, 2021
@laurenh-soa
Copy link

laurenh-soa commented Jul 15, 2021

I am having precisely this issue with a different configuration:

  • SQLTools v0.23.0
  • VSCode v1.58.2 (user setup)
  • OS: Windows_NT x64 10.0.18363 (Windows 10 1909)
  • Driver: SQLTools Intersystems IRIS v1.1
  • Database: Cache for Windows (x86-64) 2018.1.5 (Build 659U)

@dthompson-maystreet
Copy link

The offending code appears to be here:

private saveResultsHandler: RequestHandler<typeof SaveResultsRequest> = async ({ fileType, filename, ...opts }) => {

What it looks like to me is that the cache is never set; any successfully executing response should invoke the function defined at

async function QuerySuccess(results: NSDatabase.IResult[]) {
, but this doesn't appear to happen with the extensions.

@sdissegna-maystreet, would you please take a quick look at this issue? Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants