ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

My​Sublime​QL

by biannetta ST2

A Sublime Text 2 plugin to autocomplete for SQL scripts using a mysql connection to provide database table/column names

Details

  • 2013.12.12.17.35.06
  • github.​com
  • github.​com
  • 11 years ago
  • 57 minutes ago
  • 11 years ago

Installs

  • Total 3K
  • Win 2K
  • Mac 671
  • Linux 513
Jul 27 Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

MySublimeQL

A Sublime Text 2 plugin to provide autocompletions in SQL scripts using table/column names from a connected database. MySublimeQL leverages the MySQLdb Python Module to query for completions

Installing

With Package Control If you have Package Control installed you can install via the Install Package option.

With Git: Clone this repository into the ST2 Package folder

Without Git: Download the latest source and move the directory into the ST2 Package folder

Using

Create a new document and set its sytanx to SQL then start typing. A list of table names from the connected schema will start to appear in the autocompletions list. Following SQL conventions, if you type TALBE_NAME followed by a dot (.) autocomplete will display a listing of the columns in the TABLE_NAME.

Switching Schemas

You can cycle through a listing of database connections as defined in your users settings by using the following command:

  • Switch Schema: ctrl+shift+q

A list of avaliable connections will appear in the quick view menu from which you can select the desired connection. Once selected, the autocompletions will rebuild themselves based on the new database tabels/columns

Configuration

MySqublimeQL requires a set of connection parameters that can be defined as follows:

{
    "connections":
    [
        {
            "name": "Schema Name",
            "host": "localhost",
            "user": "username",
            "pass": "password",
            "db"  : "database"
        }
    ],
    "default_schema": "Schema Name"
}

The default schema is set to the name of the schema configuration object that MySublimeQL will default its completion lists