Giter Club home page Giter Club logo

sqlpad's Introduction

SqlPad

A Node.js web app for writing and running SQL queries and visualizing the results. Supports Postgres, MySQL, SQL Server, Crate and Vertica.

SqlPad Query Editor

SqlPad is meant to be run on an internal network for a single team. All connections added to the app can be used by all individuals with access to the SqlPad server. All queries written can be run and edited by everyone on the server.

If you want to be bold and daring, you can expose your SqlPad instance to the outside world. Please make sure you fully understand the risks associated with doing this and use SSL.

Installation & Usage

First, install Node.js and then

npm install sqlpad -g

For more info visit the project page at http://rickbergfalk.github.io/sqlpad/.

Tips

If you have highlighted just part of your query, only that part will be executed when you click Run Query.

Configuration

Port

By default SqlPad will use port 80. This my be overridden via cli parameter --port or environment variable SQLPAD_PORT.

Encryption Passphrase

SqlPad uses very simple encryption when storing database connection passwords. A custom encryption passphrase may be set via cli parameter --passphrase or environment variable SQLPAD_PASSPHRASE.

Query result record limit

To change the maximum records returned by a SQL query, add a new item with key queryResultMaxRows and set the value to the max number of rows you would like returned. If the key is missing or set to a non-number, SqlPad will return a maximum of 50,000 rows.

Disable CSV download

To disable CSV downloads, visit the "Configuration" page and add a new item with key allowCsvDownload and value false. If the key is missing or set to any other value, CSV downloads will be enabled.

Show Schema Copy Buttons

Some databases (like Vertica) require the fully qualified table and column names within a SQL statement. This can be a hassle to remember or type when you have long and complicated names. For convenience, you can enable fully-qualified-name copy buttons that appear in the schema sidebar. When hovering over an item in the schema tree, a copy button will appear. Click it and the schema name, table name, and column name will be copied to your clipboard.

To enable the schema copy buttons, add a new configuration item with key showSchemaCopyButton with value true.

Development Setup

If you want to hack on SqlPad, here's a guide as to what my workflow has been like:

First clone or download this repo. Then install dependencies.

npm install

Install browserify to compile client-side scripts

npm install browserify -g

Optionally install watchify to automatically browserify your client-side scripts

npm install watchify -g

To start SqlPad on port 3000 with datafiles in ./db run

npm start

To bundle client-side scripts run

npm run bundle

or to auto-browserify as changes happen

npm run watchify

License

MIT

sqlpad's People

Contributors

rickbergfalk avatar nbrustein avatar dudemelo avatar dcelasun avatar daveloyall avatar joshdvir avatar

Watchers

James Cloos avatar Carabineiro 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.