GithubHelp home page GithubHelp logo

koljonen / schema_hacker Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 11 KB

Sublime plugin for opening .sql files corresponding to database objects

License: MIT License

JavaScript 9.99% Python 90.01%

schema_hacker's Introduction

schema_hacker

Sublime plugin for simplifying schema hacking.

PRESS F2

Generate insert

Prerequisites
The F2 function assumes you have a file structure <project_folder>/<schema>/<type>/<objectname>.sql, e.g. <project_folder>/public/TABLES/foo.sql.

Installation
Clone the repo to ~/Library/Application Support/Sublime Text 3/Packages/. You may or may not need to add {"keys": ["f2"], "command": "schema_hacker_open_file"} to your .sublime-keymap file.
To get the insert-function function to work I needed to create a file called ~/Library/Application Support/Sublime Text 3/Packages/User/schema_hacker.sublime_settings containing the following:

{
    "env_var": {
    	// You may or may not need to set PGHOST here, and maybe some other variables?
    	"PGHOST": "ubuntu"
    } 
}

Usage
Just place the cursor on an object name and press F2.
Or place the cursor on a table table and choose Schema Hacker - Generate insert function in the command palette.

schema_hacker's People

Contributors

koljonen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.