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
  • 6 years ago
  • 2 hours ago
  • 6 years ago

Installs

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