Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

pascalmartin/sqlformater

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Performs formatting of basic SQL statements (DML + query).

Direct conversion in javascript of this hibernate java code from http://grepcode.com/file/repo1.maven.org/maven2/org.hibernate/hibernate-core/4.3.6.Final/org/hibernate/engine/jdbc/internal/BasicFormatterImpl.java#BasicFormatterImpl

Installation

$ npm install sqlformatter

###Examples

var sqlformatter = require('sqlformatter')
var sql = "select * from dual";

console.log(sqlformatter.format(sql));

Output:

 select
     *
 from
     dual

###Tests

To run the test suite, first install the dependancies, then run npm test:

$ npm install
$ npm test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.