Plugin for Sublime Text 3 that helps you work directly with postgresql database functions and run pgTAP tests. Trello board
Warning: If you are experiencing problems or have suggestions please file an issue.
- Creates a local temporary copy of all database functions from a specified database.
- Save a Function to the database with output.
- Ability to Run a pgTAP test, or all open test files.
- Pgplsql highlighting, and pgTAP output panel highlighting.
- Quick Switch between file and test with CMD+.
- Quick Create new plpgsql functions with CMD+ALT+o.
- Common Completions and Snippets for
plpgsql
files
- Invoke via Ctrl+Shift+D (menu:
Tools
->Postgresql Function Editor
->Set Databse Info
) - set database option values
- Invoke via F1 or
Tools
->Postgresql Function Editor
->Load Database Functions
- Loads the database functions in the side bar seperated by folders which one for each schema.
- Invoke via F2 or
Tools
->Postgresql Function Editor
->Save Database Function
- Saves the function to the database and opens a panel with the command output.
Run pgTAP Test(s)
- Invoke via F3 or
Tools
->Postgresql Function Editor
->Run pgTAP Test
- Saves the function to the database and opens a panel with the test output.
- Invoke via F4 or
Tools
->Postgresql Function Editor
->Run All Opened Tests
- Saves the active function to the database and opens a panel with the test output for all open test.
- Invoke via CMD+. or CMD+Ctrl+. for same pane vertical split.
- Attempts to switch to or create the alternating file/test based on the schema and function name.
- this expects either a
public
/testing
schema, orfoo
andfoo_testing
schemas as an example.
- Invoke via CMD+ALT+o
- Also visible in the tool and right-click menus.
- Brings up a list of schemas, and then allows you to specify the exact function you would like. Then use F2 to save this function into the current database.
- Sublime Text 3 and Package Manager,
- pgTAP for pgTAP testing
- passwordless access to database either through hba_conf file or .pgpass file.
- install package manager
- clone repo for pfe in packages directory
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages
git clone https://github.com/danmanstx/pfe.git
- before closing sublime add
pfe
to yourinstalled packages
located here:
Sublime text --> Preferences --> Package Settings --> Package Control --> Settings - User
COMING SOON install with Package Control
Sample options below.
Go to Preferences
-> Package Settings
-> Postgresql Function Editor
->Settings - User
and add this to the file or copy and edit from Settings - Default
:
{
"function_folder": "/tmp/postgresFunctions",
"host": "localhost",
"database": "database",
"user": "postgresql",
"port": "5432",
}
- Initial release
- Inspired by Suran Systems Textmate Postgresql Bundle.
- Quick Switching Inspired by Ruby Test.
- Quick File Creation Inspired By Sublime Quick File Creator
- No more ruby or gems! Thanks to Traveling Ruby
- Add more plpgsql snippets for better autocompletion.
- Add ability to save recently used databases.
- Add linux/Windows Traveling Ruby Packages.
- Creation of atom plugin because sublime's future is uncertain.
Copyright © 2015 Danny Peters, @danmanstx
Licensed under the GNU GPL license.