format-sql

WebJar for format-sql

License

License

MIT
Categories

Categories

ORM Data
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

format-sql
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

format-sql
WebJar for format-sql
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/SethRAH/format-sql

Download format-sql

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/format-sql/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>format-sql</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/format-sql/
implementation 'org.webjars.npm:format-sql:0.1.0'
// https://jarcasting.com/artifacts/org.webjars.npm/format-sql/
implementation ("org.webjars.npm:format-sql:0.1.0")
'org.webjars.npm:format-sql:jar:0.1.0'
<dependency org="org.webjars.npm" name="format-sql" rev="0.1.0">
  <artifact name="format-sql" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='format-sql', version='0.1.0')
)
libraryDependencies += "org.webjars.npm" % "format-sql" % "0.1.0"
[org.webjars.npm/format-sql "0.1.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

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

Versions

Version
0.1.0