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

Update SQLExec.py #6

Closed
wants to merge 1 commit into from
Closed

Update SQLExec.py #6

wants to merge 1 commit into from

Conversation

yangweijie
Copy link

fix text un-encoded returns incroectly shows,
allow connention'config consists empty password can also connects.

fix text un-encoded  returns incroectly shows,
allow connention'config  consists empty password  can also connects.
@jum4
Copy link
Owner

jum4 commented Nov 8, 2013

Hi jay,

I really think the code have to stay generic, and we must put all database specific in .sqlexec files.

Your first modification for empty passwords is MySQL specific, and i'm not sure it's a good idea to replace the password option directly in _buildCommand() method. Maybe we can create another configuration line in *.sqlexec files for connecting without password, and to choose using this one when password is empty ?

For the second modification, SET NAMES UTF8 is also a MySQL specific query, it should be SET NAMES 'UTF8' on Postgresql, and probably another on Oracle.
I think we should set another parameter in .sqlexec files, something like "init_queries": "SET NAMES UTF8;" in mysql.sqlexec, and write these ones at begining of the tempFile in _getCommand() method.

@yangweijie
Copy link
Author

Hi jum4. Ths for your reply. I just came up a solution. And not tests in Postgresql And Oracle. How to deal that should be careful. Beside, you'd better be aware of that in Sublime text3, package installed via package controller center will be stored in Sublime-package, a kind of ziped archive. So, any access of inside file will be not allowed.
Better way is to place your connection file in you 'User' Package. Or to install a package calls 'Extract Subliem Package',and drag it to sublime , unzip it to your ‘Package’ Directory., to make it works normally in Sublime text 3.

@yangweijie yangweijie closed this Nov 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants