Kate SQL Plugin

Text Editors

Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

7
Become a Fan
6.8

Available as/for:
Description:
This is a plugin that transform Kate into a simple, light, versatile and useful SQL client.
It take the advantages of the Qt Sql module to allow you to open connections with all supported SQL drivers (MySQL, PostgreSQL, SQLite, ODBC, etc...) and easily launch queries on database. Some of the main features:
- supports all Qt Sql drivers
- manage multiple connections simultaneously
- provides an integrated viewer for SELECT statements
- a simple wizard to export query results in csv file
- provides a basic schema browser for views, tables and fields with primary keys

(Tested on Linux and Windows with MySQL, SQLite and ODBC drivers)

Important:
KateSQL was moved to svn.kde.org , under /trunk/KDE/kdesdk/kate/plugins/katesql/ , and to kate git repository hosted on gitorious.org


Therefore, KateSQL is available on the latest KDE trunk.

Build instructions:
---------------------
If your distribution does not provide the kate development package with libkateinterfaces, you need to compile Kate from sources.
Please follow these steps from the official Kate wiki: http://gitorious.org/kate/pages/Building Kate .

QtSql with development libraries is required.

Note:
---------
If you can't see your preferred driver in the new connection wizard, you need to install the appropriate qt driver package and restart kate. (eg. on debian: libqt4-sql-mysql, libqt4-sql-odbc ... )

When you press the Run Query button, all selected text (or all text in the current document if none selected) is executed in an sql query. Pay attention! DELETE and DROP statements are tremendously rapid and destructive.

There are a lot of features planned for future releases, like parameters recognition, support for multiple queries, configurable fonts and colors for outputs.

If you have questions or you need to report a bug, please send an email to marcomentasti@gmail.com or report to bugs.kde.org.

Any suggestions are appreciated.
Last changelog:

0.2 - 22/07/2010
- table fields added to schema browser
- configuration parameters to change output colors
- save/restore last used connection
- improved performance exporting data
- fixed bugs
0.1 - 05/07/2010
- select results are now displayed with default system font.
- fixed incorrect export behavior.
- added possibility to export column names and line numbers.
- added context menu to data output, to quickly export/copy selected cells.

0.1-RC1 - 29/06/2010
- preview release


Ratings & Comments

9 Comments

otzy007

What happend to the plugin? Is it still developed? It seems that it doesn't exist anymore on the kde anonsvn

MMentos

Yes, this plugin is alive, and must be included in KDE >= 4.6.0. Or you can find latest sources in kate repository hosted on git.kde.org (https://projects.kde.org/projects/kde/kdebase/kate/repository/revisions/master/show/kate/plugins/katesql). Follow this guide to get more information on how to build kde from sources (http://kate-editor.org/get-it/). Thanks for your interest

BastianBalthazarreBux

It's a really nice start, it would be even greater with the following:

  • resizeable panel for SQL Output
  • Using the same font as the window, may be with possibility to select a different one
  • support for multiple query with one selection
  • parameters in query for example like python %(param)s. When the query is executed the parameter will be asked with a dialog.
  • MMentos

    Hi Bastian, - what do you mean with "resizable panel"? all kate panels are resizable by default (the splitter is between the statusbar and the panel). - ok, i will restore the the normal font by default. the possibility to configure fonts and colors for blobs and nulls is already planned for the next release - multiple query support is provided internally by the sql driver. mysql supports multiple queries putting a ; after each query, odbc not. But i can try emulate this behavior parsing text with a regexp, and detect queries manually. Good idea? - yesss, i already have this idea. also, with a possibility to enter parameters manually or from an input file (for multiple insert statements, for example). Really thanks for your suggestions!

    BastianBalthazarreBux

    Hi Bastian, - "resizable panel"? <<< My Bad :p - ok, i will restore the the normal font by default. the possibility to configure fonts and colors for blobs and nulls is already planned for the next release <<< yay - multiple query support is provided internally by the sql driver. mysql supports multiple queries putting a ; after each query, odbc not. But i can try emulate this behavior parsing text with a regexp, and detect queries manually. Good idea? <<< Actually you will need to parse anyway to grab the parameters right? then it could be a good idea, otherwise the complexity added is not worth it. For example phpMyAdmin botch it some times and it's a mature project. Actually I've tried with a QMYSQL connection, it give me the error: 30 Jun 2010 09:59:59: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT * FROM tab_users' at line 2 QMYSQL3: Unable to prepare statement with this text selected: UPDATE tab_users set id = 1231231231 where id = 1231231231; SELECT * FROM tab_users; One strange thing is that the class who give the error is QMYSQL3 when I've used a QMYSQL connection, maybe it's only inherited or maybe it's a bug - yesss, i already have this idea. also, with a possibility to enter parameters manually or from an input file (for multiple insert statements, for example). <<< yay Really thanks for your suggestions! ... and to you for this plugin

    milianw

    hey, really cool :) if you polish it more, you can get this upstream into kdelibs, so that it can be pushed to the masses with 4.6. Contact us developers at kwrite-devel@kde.org and/or #kate on freenode IRC. Hope to hear from you, bye

    rADOn

    I have been waiting for this for a looong time. Thank you.

    freinhard

    Thank you so much for that plugin! Built and works!

    locke87

    I really like your effort. That's really improving my workflow when I don't have to login on a remote phpmyadmin :)

    Pling
    0 Affiliates
    Details
    license
    version 0.2
    updated
    added
    downloads 24h 0
    mediaviews 24h 0
    pageviews 24h 3

    Other Text Editors:

    klat
    jori
    last update date: 21 years ago

    Score 5.0

    ktexteditor-yankbuffer
    metallman
    last update date: 19 years ago

    Score 5.0

    CUTE
    heiko
    last update date: 21 years ago

    Score 5.0

    LogDay
    Zarahk
    last update date: 19 years ago

    Score 5.0

    katedataedit
    pradu
    last update date: 18 years ago

    Score 5.0

    ktexteditor-key-recorder
    jo-link-noir
    last update date: 10 years ago

    Score 5.0



    System Tags