Crate sql_minifier

source ·
Expand description

This crate provides bindings for the Sirius executable. All the parameters of sirius should be accessible from this crate.

§SQL minifier

This crate provides a simple SQL minifier. It removes comments and unnecessary whitespaces from SQL files.

§Installation

Add the following to your Cargo.toml file:

[dependencies]
sql_minifier = "0.1.1"

or use the following command:

cargo add sql_minifier

§Usage

use sql_minifier::prelude::*;
minify_sql_files!("test_data/test_file_1.sql");

Modules§

Macros§

  • This macro will minify all the SQL files passed as arguments and save them with the same name but with ‘_minified.sql’ appended to the original filename So if the file name is ‘file.sql’, the minified file will be ‘file_minified.sql’