A zero-dependency Ruby gem for colorized SQL formatting and PostgreSQL error prettification.
Niceql is a Ruby gem that formats SQL queries with colorized syntax highlighting and prettifies PostgreSQL error messages. It solves the problem of unreadable SQL code and cryptic database errors by transforming them into clean, visually structured output that's easier to debug and understand.
Ruby and Rails developers who work with SQL databases, particularly PostgreSQL, and need better tools for writing and debugging SQL queries in their applications.
Developers choose Niceql because it's a lightweight, zero-dependency solution that significantly improves SQL readability and error debugging without requiring complex setup or external dependencies.
niceql gem repo. Nice, colorized SQL formatting in ruby.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Works standalone without requiring any additional libraries, making it lightweight and easy to integrate into any Ruby project, as highlighted in the README's feature list.
Prettifies PostgreSQL error messages by aligning them with corresponding SQL query lines, significantly improving debugging clarity, as demonstrated in the before/after images.
Offers configurable indentation, bracket placement, and color schemes to match personal preferences, with examples provided in the configuration section.
Provides optional seamless integration with Rails via a separate gem (rails_sql_prettifier) for easy SQL debugging in ActiveRecord queries, as noted in the README.
Only detects uppercased SQL verbs with simple indentation and parsing options, which may not handle all SQL syntax or dialects effectively, as admitted in the limitations section.
ActiveRecord integration requires installing an additional gem (rails_sql_prettifier), adding complexity to setup since version 0.5.0, as warned in the README's attention note.
Strongly discouraged to enable the pg_adapter_with_nicesql setting in production due to potential overhead, limiting real-time use in live environments, as explicitly stated in the configuration.