https://github.com/freysie/sql-formatting
Popular SQL formatters bridged from JS and Perl to Swift.
https://github.com/freysie/sql-formatting
formatter sql swift
Last synced: 9 months ago
JSON representation
Popular SQL formatters bridged from JS and Perl to Swift.
- Host: GitHub
- URL: https://github.com/freysie/sql-formatting
- Owner: freysie
- License: mit
- Created: 2021-11-05T19:22:29.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-03-09T21:27:52.000Z (over 2 years ago)
- Last Synced: 2024-03-09T22:25:16.549Z (over 2 years ago)
- Topics: formatter, sql, swift
- Language: Swift
- Homepage: https://freyaalminde.github.io/documentation/sqlformatting
- Size: 214 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SQL Formatting
Format SQL source on Apple platforms using [SQL Formatter](https://github.com/zeroturnaround/sql-formatter), [pgFormatter](https://github.com/darold/pgFormatter), and [pg-minify](https://github.com/vitaly-t/pg-minify).
## Installation
```swift
.package(url: "https://github.com/freysie/sql-formatting.git", branch: "main")
```
```swift
import SQLFormatting
```
## Usage
```swift
SQLFormatter.formattedString(from: "…")
SQLFormatter.formattedString(from: "…", indent: "\t", uppercase: true)
SQLFormatter.extendedFormattedString(from: "…")
SQLFormatter.minifiedString(from: "…")
SQLFormatter.minifiedString(from: "…", compress: true)
```