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
  • 10 years ago
  • 55 minutes ago
  • 10 years ago

Installs

  • Total 3K
  • Win 2K
  • Mac 671
  • Linux 513
Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3
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