Skip to content

small JavaScript module to format SQL queries with more readable line breaks etc. Will be configurable to allow the module's user to add their own keywords

License

Notifications You must be signed in to change notification settings

avizaviz/format-sql

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

format-sql

small JavaScript module to format SQL queries with more readable line breaks etc. Will be configurable to allow the module's user to add their own keywords

Installation

npm install format-sql --save

Usage

var sql = "SELECT employeeId, givenName, familialName FROM dbo.Employee WHERE familialName LIKE '%son%' ORDER BY familialName asc, givenName asc", formatted = formatSql.formatQuery(sql);

console.log('sql', sql, 'formatted', formatted);

Tests

To-Do: add some tests!

Contributing

Currently don't have a style guide or a roadmap

Release History

  • 0.1.0 Initial Release

About

small JavaScript module to format SQL queries with more readable line breaks etc. Will be configurable to allow the module's user to add their own keywords

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%