Skip to content
Tako Lee edited this page Aug 26, 2014 · 33 revisions

There are 2 components in SQL Formatter as a Service(SQL FaaS).

1. SQL Formatter widget

SQL formatter widget can be easily embedded to your site within 3 minutes by copy the short code I give you into your website's HTML. After that, a Format SQL label will be appeared at the left/right side:

sql formatter widget sql formatter label

After click this label, you can format SQL in this panel:

sql formatter widget sql formatter panel

Here is an online demo.

If you prefer, you can even use a simple text link to launch sql formatter.

This SQL formatter widget is based on our widely acclaimed tool: Instant sql formatter which had been online 5 years and tidy more than 1 million SQLs worldwide.

Contact us to request a free account to use this SQL formatter widget.

2. API

You can integrate this service into your application and web site by using sql formatter API.

URL: http://www.gudusoft.com/format.php

METHOD: POST

Content-Type: application/x-www-form-urlencoded.

Simple request sent to server:

 rqst_input_sql=select+*+from+dual

And you will get formatted sql in json format like this:

{
  "rspn_http_status" : 200,
  "rspn_capacity" : 0,
  "rspn_db_vendor" : "generic",
  "rspn_output_fmt" : "",
  "rspn_parse_sql_status" : 0,
  "rspn_parse_sql_message" : "success",
  "rspn_formatted_sql" : "SELECT *\nFROM   DUAL \n"
}

Check API manual.

2.1 Examples use this API
2.1.1 cURL
curl --data "rqst_input_sql=select+*+from+dual" http://www.gudusoft.com/format.php

3. Privacy Policy

When you format SQL using this service, your SQL will be sent to our server, and analzyed by our back-end program. If you would prefer to avoid transmitting your SQL across the network, please download sql formatter desktop version or add-in for SSMS and VS.

4. Sites who use this service

Clone this wiki locally