Skip to main content

Formater SQL written in Rust

Reason this release was yanked:

Deprecated

Project description

sqlformater

sqlformater is a command-line tool (CLI) built in Rust, designed to automatically format SQL scripts. It supports individual files or entire directories and allows customized configuration via settings files.

🚀 Getting Started

Install with Cargo :

cargo install --git https://github.com/LugolBis/sqlformater.git

Usage :

sqlformater <PATHS> [OPTIONS]

📂 : Specify the files or folders to format

You can provide one or more of the following:

  • One or more folder paths: formats all .sql files in the subdirectories.
  • One or more .sql files: formats specific individual files.
  • . or *: selects the current directory and all its subdirectories.

⚙️ Available Options

Option Description
-logs_path=<FOLDER_PATH>,
--logs_path=<FOLDER_PATH>
Specifies the folder where logs will be saved.
-settings_path=<PATH>,
--settings_path=<PATH>
Path to the configuration file or the folder that contains it.
-verbose,
--verbose
Enables verbose mode to display detailed execution information.
-status,
--status
Shows diagnostic information: settings, logs, etc.
-help,
--help
Displays general help.
-help-settings,
--help-settings
Displays information about available configuration settings.

📘 Examples

Format all SQL files in the current directory and subdirectories:

sqlformater .

Format two specific files:

sqlformater tutu/queries/init.sql tutu/queries/update_users.sql

Format all files in a folder with a specific config file:

sqlformater home/tutu/migrations --settings_path=./config/settings.json

Enable verbose mode:

sqlformater * --verbose

🔧 Configuration

You can customize the formatter's behavior via a configuration file. To see the available settings:

sqlformater --help-settings

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

sqlformater-0.1.0-cp312-cp312-win_amd64.whl (2.4 MB view details)

Uploaded CPython 3.12Windows x86-64

sqlformater-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

sqlformater-0.1.0-cp310-cp310-macosx_11_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file sqlformater-0.1.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for sqlformater-0.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5da43f1d6b22bb4761c5fe02f2d770e33d2a8447d130ccada64cd85b036be4a5
MD5 503c8910d4e8823345386ce692c09b6c
BLAKE2b-256 c14d61879978751d757a9205b489cd96bd36342db192e5ba69e1b9e3ff961e84

See more details on using hashes here.

File details

Details for the file sqlformater-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for sqlformater-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1dae2f2bf3cc1ca0c5cd1acb1874105856918bd77fba12c3fe68974df916d6ce
MD5 fff60d805646d34b23a673adcc7062ef
BLAKE2b-256 50d9fa1ff30e43787b343b36fec3b7d036cfc3f4dc8562856bc73d5d4a71974d

See more details on using hashes here.

File details

Details for the file sqlformater-0.1.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for sqlformater-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7421b3b91b9e5f7fec5f1462857c56446a77192bf5755a73b9e38dbb5df4533e
MD5 9d1f47458cb6b0794316460036ad95cf
BLAKE2b-256 adc67ccb81985950aa395dab215e2546ff4a268fa560a22d8c3bb1ace656194b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page