#sql #sql-query #read

sqlformat

Formats whitespace in a SQL string to make it easier to read

21 releases

0.3.5 Jan 13, 2025
0.3.3 Dec 11, 2024
0.3.2 Nov 22, 2024
0.2.4 Jun 12, 2024
0.1.0 Apr 18, 2020

#41 in Database interfaces

Download history 196009/week @ 2024-12-20 191641/week @ 2024-12-27 370415/week @ 2025-01-03 414861/week @ 2025-01-10 332159/week @ 2025-01-17 359150/week @ 2025-01-24 380257/week @ 2025-01-31 436753/week @ 2025-02-07 416650/week @ 2025-02-14 509720/week @ 2025-02-21 514392/week @ 2025-02-28 507754/week @ 2025-03-07 459074/week @ 2025-03-14 448152/week @ 2025-03-21 427180/week @ 2025-03-28 416050/week @ 2025-04-04

1,854,793 downloads per month
Used in 975 crates (35 directly)

MIT/Apache

120KB
3.5K SLoC

sqlformat

Build Status unsafe forbidden Version Docs

This crate is a port of sql-formatter-plus written in Rust. It is intended to be usable as a pure-Rust library for formatting SQL queries.

There is currently no binary interface. This crate was written for formatting queries to logs within sqlx, but it may be useful to other crates in the Rust ecosystem.

Dependencies

~1.5MB
~34K SLoC