[ANN] SQLQueryPlugin version 1.1.0 released
I've just released the newest version of my plugin.
http://www.intellij.org/twiki/bin/view/Main/SQLQueryPlugin
Changes
Bugfix for Sybase FAKE_METADATA
Possibility to display columns in different formats
Bye,
Stefan.
Please sign in to leave a comment.
Hi,
I have a small feature request and a question:
Would it be possible to mark null fields in some obvious way,
for example by having the word 'null' there in italic? Right
now null fields are empty and you cannot distinguish them from
empty strings.
Under Properties / Miscellaneous there is an option to save
the password in the workspace. This option is disabled for
me, do you know why?
Thanks,
Marius
Stefan Stiller wrote:
The option is disabled if the plugin can't find the JCE provider neccessary for encoding the passwords.
You can install it by copying the file sunjce_provider.jar (supplied with default JDK 1.4.x) to ]]>/jre/lib/ext
.
I'm having a problem getting this to work. I've copied the jar, and the option is now no longer greyed out. But checking it doesn't seem to do anything.
Here's a sequence of events and observations which might be helpful:
Check save encrypted passwords in workspace
Execute a query, enter the password when prompted
Close the project
View the project's .iws file and verify that <savePasswords enabled="true" /> and that the (encrypted) password is saved.
Open the project. When opening the project, I noticed that String index out of range: 34 appears in the IDEA console.
Execute a query. I expected the password to be remembered, but I was again prompted to enter the password.
I tried this same sequence with the save encrypted passwords in workspace option unchecked and noticed that the String index out of range: 34 message does not appear when opening the project. I assume an error is occurring while reading the password?
thanks!
chris
Sorry, forgot to include my setup details:
IDEA 3.0.2 build 695
DB2 7.2
Win2k
Thanks, it worked!
Is this something new? I remember that I was using this option at
some point without this sunjce_provider.jar.
Isn't this an overkill though? It is nice to have the password
properly encrypted but if the option to save it is not working
then most people will put the password in the URL, as I did, and
then the whole purpose is defeated. A warning or some message
telling why the option is disabled would help a lot.
Thanks,
Marius
Stefan Stiller wrote:
>>Under Properties / Miscellaneous there is an option
>>to save
>>the password in the workspace. This option is
>>disabled for
>>me, do you know why?
This is a small bug in my plugin during the decoding of the passwords. I've uploaded a new build on monday with the same version number where this bug is fixed.
Bye,
Stefan.
The option is there from the start. I've added this option to provide a secure way to save the db passwords. If someone wants to bypass this method its at their own risk.
I'm thinking about adding a second option to save the passwords unencrypted.
Bye,
Stefan.
I think that would be useful. All of my DB connections (for example) point
to DB instances that live behind a firewall. Those instances are configured
so that the password is obvious (i.e. not one you would pick if you
weren't behind a firewall). Given that, the current "don't support
persistent passwords unless the encryption provider is present" is
definitely overkill. (Having the second option is good so that it is
obvious that an insecure approach is being selected.)
"Stefan Stiller" <stefan@sstiller.de> wrote in message
news:15177471.1052289994203.JavaMail.javamailuser@localhost...
>
unencrypted.
Great, thanks, that fixed it! :)
Hi,
Great plugin, I almost don't need to open Toad or SQL navigation anymore.
There's a small enhancement that would make my life (and probably other
users' lives as well) so much easier when testing SQL statements in the
code: query formatting when copying from the editor to the plugin.
Right now the "Send to SQL Plugin" action in the pop-up menu sends the
selected text as is. I think another option that takes care of the
multiline SQL statements and removes all the concatenations from the
selected text would come in quite handy.
I filled in a feature request
http://www.intellij.net/tracker/idea/viewSCR?publicId=12099, but since this
is the main place I would use it I thought I might ask for the plugin
enhancement as well.
I though about writing a plugin to do this, but this functionality alone is
too small to deserve a plugin of it's own. Hence the enhancement request.
Thx,
Andrei
Stefan Stiller wrote:
I'd like to chime in here, this would be a great enhancement to the plugin. As an additional feature (and I realize this is really pushing the boundaries of an enhancement) I've got lots of code with prepared statements split over multiple lines -- things like:
If you plan to work with Andrei's request, it would be nice to reformat things like the above. I would imagine a simple regexp like "\" *\+? *\n+ *\+? *\"" would match, but that's just off the top of my head.
Actually, something like
Pattern p = Pattern.compile("\"
s*
+
s*\"", Pattern.MULTILINE);
String[] tokens = p.split(selectedSection);
should give you the relevant info in the selected section (would split
around the concatenations). Pasting all the strings in the tokens array on
separate lines (instead of the selected text itself) would give us what we
need.
Thx,
Andrei
Thanks for your suggestions. I've already thought about implementing such a feature. There were just other features which I wanted to implement first.
The problem I see is that not all copied Strings are formated like this because I can also copy statements from XML files or text files. I could distinguish between the two formats by checking if the first none whitespace character is a " or not.
Bye, Stefan.
a feature. There were just other features which I wanted to implement first.
Great, thanks a lot.
because I can also copy statements from XML files or text files. I could
distinguish between the two formats by checking if the first none whitespace
character is a " or not.
Well, would you have to? If the mentioned regexp does not apply then you'll
get just one string, so you just use that. I start from the assumption that
there is no concatenation for the SQL statements in the text or xml files,
of course. If there is, you could just create different regexps and see
which one applies.
The " check might not be the best approach, as the selection could start
from somewhere inside the string.
Thanks again for a great plugin,
Andrei
Thanks for the great plugin. I have a little problem with it though. Once in a while I get the following exception. I guess the fix should be really simple since you have to use SwingUtilities.invokeLater when doing any UI modifications.
/kesh
2003-05-13 14:19:44,353 ERROR - plication.impl.ApplicationImpl - Assertion failed: Access is allowed from event dispatch thread only.
2003-05-13 14:19:44,353 ERROR - plication.impl.ApplicationImpl - IntelliJ IDEA 3.0.4 Build #701
2003-05-13 14:19:44,353 ERROR - plication.impl.ApplicationImpl - JDK: 1.4.1_02
2003-05-13 14:19:44,353 ERROR - plication.impl.ApplicationImpl - VM: Java HotSpot(TM) Client VM
2003-05-13 14:19:44,353 ERROR - plication.impl.ApplicationImpl - Vendor: Sun Microsystems Inc.
2003-05-13 14:19:44,353 ERROR - plication.impl.ApplicationImpl - OS: Windows XP
2003-05-13 14:19:44,353 ERROR - plication.impl.ApplicationImpl -
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:43)
at com.intellij.openapi.application.a.e.assertIsDispatchThread(e.java:111)
at com.intellij.ui.cz.d(cz.java:2)
at com.intellij.ui.b.getDefaultComponent(b.java:4)
at com.intellij.openapi.wm.a.a.a(a.java:47)
at com.intellij.openapi.wm.a.a.a(a.java:38)
at com.intellij.ui.t.getDefaultComponent(t.java:2)
at com.intellij.openapi.wm.a.a.a(a.java:47)
at com.intellij.openapi.wm.a.a.a(a.java:38)
at com.intellij.ui.t.getDefaultComponent(t.java:8)
at com.intellij.openapi.wm.a.a.a(a.java:47)
at com.intellij.openapi.wm.a.a.a(a.java:38)
at com.intellij.ui.t.getDefaultComponent(t.java:2)
at com.intellij.openapi.wm.a.a.a(a.java:47)
at com.intellij.openapi.wm.a.a.a(a.java:38)
at com.intellij.ui.t.getDefaultComponent(t.java:8)
at javax.swing.SortingFocusTraversalPolicy.enumerateAndSortCycle(Unknown Source)
at javax.swing.SortingFocusTraversalPolicy.getComponentAfter(Unknown Source)
at javax.swing.LayoutFocusTraversalPolicy.getComponentAfter(Unknown Source)
at java.awt.Component.nextFocusHelper(Unknown Source)
at java.awt.Container.nextFocusHelper(Unknown Source)
at java.awt.Component.nextFocus(Unknown Source)
at java.awt.Component.transferFocus(Unknown Source)
at java.awt.Component.doAutoTransfer(Unknown Source)
at java.awt.Component.autoTransferFocus(Unknown Source)
at java.awt.Component.disable(Unknown Source)
at javax.swing.JComponent.disable(Unknown Source)
at java.awt.Component.enable(Unknown Source)
at java.awt.Component.setEnabled(Unknown Source)
at javax.swing.JComponent.setEnabled(Unknown Source)
at javax.swing.AbstractButton.setEnabled(Unknown Source)
at javax.swing.AbstractButton$ButtonActionPropertyChangeListener.propertyChange(Unknown Source)
at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(Unknown Source)
at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(Unknown Source)
at javax.swing.AbstractAction.firePropertyChange(Unknown Source)
at javax.swing.AbstractAction.setEnabled(Unknown Source)
at com.kiwisoft.idea.QueryPanel$ExecutionThread.run(Unknown Source)
Hi.
Sorry for this cluseless questions, but is there any documentation for this?
I can't figure out how to initiate the SQL plugin from IDEA.
I am a newbie to it.
thanks
There is a doc folder within the zip. It describes how to use the plugin.
simply:
- add the ks-sql.jar into you idea's plugins folder.
- add the db driver classes into your idea's lib folder (not part of the plugin's zip)
- add additionally the jce.jar (not part of the plugin's zip) into idea's jre/lib/ext folder, if you like to save encrypted DB passwords
Sven