Is there a plan for SQL support?

Posted by sac on 2007-02-08 04:48
Forums: Komodo discussion | OS: All / Any

I'm thinking of getting Komodo as my primary web editor but I was thinking if you have any plans of implementing an SQL (specifically MySQL) browser/client in Komodo? My current IDE (Zend Studio) has that feature and it's very handy. I don't need to switch to another app just to run a fast query or, more importantly, browse my database/table structure. My current IDE lacks in JavaScript support and I'm developing more and more JS so that's why I'm thinking of moving away from it.

toddw
ActiveState Staff
Thu, 2007-02-08 09:16

We do not have any SQL browsers inside of Komodo at present and we will likely not add one in the near future (i.e. not likely in Komodo 4.x series).

You can use a run command (or macro) if you just need to run a simple db query.

This could be added as an extension, if someone wants to do that...

mksql | Thu, 2007-02-08 16:00

Would make for a very useful addition to the product.

Rob Andrews | Tue, 2007-04-17 18:36

For what it's worth, I expect I'd be willing to pay more for such a thing if it were done well.

toddw
ActiveState Staff
Mon, 2007-04-23 13:20

Which databases would you like supported and what features would you like to see supported for these databases.

Example:
SQLite: Add browser, to view/edit the sqlite database information.

Rob Andrews | Fri, 2007-04-27 14:05

I'd love to see at least basic browser functionality for MySQL and T-SQL.

cheesegrits | Sat, 2007-11-17 21:17

I'd like to second or third this request. I was about to post a new request, but found this one already here.

Having an SQL editor / console would be soooooooo useful. What would absolutely rock is if the editor could evaluate expressions in the current debugger context, so something like ...

SELECT * FROM $oJoin->table_join

... does just that.

And on the variable list in the PHP/perl/whatever debug window, add "Evaluate SQL" on the context menu, which would copy the content of the variable to the SQL console and run it.

And on the context menu in the main code editor, have a "Paste from SQL" which pastes the content of the SQL console.

And support for SQL snippets I can drag and drop to/from the console.

And ... and ...

Oh PLEASE can we have this? Can we can we can we?

Oh, and I obviously vote for MySQL as the first candidate.

-- hugh

toddw
ActiveState Staff
Mon, 2007-11-19 12:15

We are still looking into database support for Komodo, so we appreciate all the suggestions.

As a note, Travis "tswicegood" has created a simple MySQL extension for Komodo, available here:
http://community.activestate.com/forum-topic/mysql-console

Cheers,
Todd

mksql | Tue, 2008-03-11 08:45

I will raise this issue once again, only because it is the single significant limiting factor I personally find in Komodo. I use another Win32 editor that has a Regex based identifier, where I was able to write an expression to locate all CREATE TABLE/PROC/FUNCTION in the code browser/explorer window - very useful with large multi-part scripts. Unfortunately this editor will not work on Linux or OSX (natively), but Komodo will.

Since most of my projects involve both a dynamic language and SQL, having more capable SQL support, even if it is generic/ANSI only, would IMO be a significant enhancement to the editor functions of the product.

toddw
ActiveState Staff
Tue, 2008-03-11 10:02

The Source Tree extension:
http://community.activestate.com/komodo-extension/source-tree

This extension is using regex pattern matching in order to display a code browser view of Python/PHP files. I'm sure it would be relatively straight forward to include SQL support for this extension, and I'm sure Iván Campaña would be keen to include your additions to the extension.

It would be nice if this regex style parsing could be added to the existing Komodo IDE code browser, in order to better support languages that Komodo does not provide an outline for. I've logged a Komodo enhancement request for this here:
http://bugs.activestate.com/show_bug.cgi?id=75562

Cheers,
Todd

ivanhoe011 | Thu, 2010-07-29 02:06

it would be nice if strings in php, perl, etc.. could be checked for SQL-like syntax and colored appropriately. I've seen such support for SQL coloring and auto-completion in a couple of other IDEs, and it's very useful feature..

ron.stewart | Thu, 2010-08-05 15:52

Having done this in my CFML mode, it may be possible but if so would probably be a fair amount of work to retool the PHP, perl, etc., modes to support SQL syntax highlighting.

I had the advantage in the CFML mode of knowing the specific context in which SQL might occur (within CFQUERY tags), where as in these other languages it seems most likely to occur in quoted text strings. I'm not sure you'd want all strings syntax highlighted for SQL but I'm not sure what reliable context clues might exist within the code that could trigger the SQL highlighting in a given string...

ivanhoe011 | Thu, 2010-08-05 18:41

Sql statements have very rigid form and can start with just a few keywords (SELECT, INSERT, UPDATE, DELETE, ALTER, SHOW, CREATE, SET and I can't think of anything else). However not even all of that is really needed, as 99% of the time developers deal just with SELECT, INSERT, UPDATE, DELETE, so it would be more than enough to just handle these 4. Also a common practice is to write sql keywords in uppercase, so that can be used as a filter, too.

Even if you get false positives it's not such a big deal, I presume it will happen rarely, and having a little extra color on one or two strings will do no harm, compared to how helpful this can be. But, of course, the best would be if it's possible to add this as an extra option that can be switched on/off from the preferences.

ron.stewart | Fri, 2010-08-13 05:26

I'm willing to give this a shot in my CFML mode, just to see if I can get it to work. I have some other things I've been meaning to play with in terms of syntax highlighting in strings (e.g., "crunched" variables) so this will be a good excuse to start looking at handling of string content.

(Having said that, though, I think I am a little more concerned about the false positives...)