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

Export to CSV? #33

Open
joereynolds opened this issue Dec 3, 2017 · 0 comments
Open

Export to CSV? #33

joereynolds opened this issue Dec 3, 2017 · 0 comments

Comments

@joereynolds
Copy link
Owner

joereynolds commented Dec 3, 2017

Could be a potential thing to add

How it should work:
Call sqhell#Export
This will proxy down to the provider of choice.
We'll need to store the last query executed so we can re-run it and export it. Since we can have multiple windows, to avoid conflicts, we should store the query in a variable that also contains the SQHResult buffer's id.

A MySql version will work like this

:SQHExport -> sqhell#Export() -> mysql#Export()

Runs the current query and appends the following

INTO OUTFILE 'argument from SQHExecute'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n';

Note that this only works on selects, obviously.

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

No branches or pull requests

1 participant