diff --git a/README.md b/README.md index f62a158..d408e99 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ pg_query.rs   [![Build Status]][actions] [![Latest Version]][crates.io] [![Docs Badge]][docs] =========== -[Build Status]: https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fpganalyze%2Fpg_query%2Fbadge&label=build&logo=none -[actions]: https://actions-badge.atrox.dev/pganalyze/pg_query/goto +[Build Status]: https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fpganalyze%2Fpg_query.rs%2Fbadge%3Fref%3Dmain&style=flat&label=build&logo=none +[actions]: https://actions-badge.atrox.dev/pganalyze/pg_query.rs/goto?ref=main [Latest Version]: https://img.shields.io/crates/v/pg_query.svg [crates.io]: https://crates.io/crates/pg_query [Docs Badge]: https://docs.rs/pg_query/badge.svg diff --git a/src/lib.rs b/src/lib.rs index 01bb40e..1555f8d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,17 +1,20 @@ //! Rust pg_query   [![Build Status]][actions] [![Latest Version]][crates.io] [![Docs Badge]][docs] //! =========== //! -//! [Build Status]: https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fpaupino%2Fpg_query%2Fbadge&label=build&logo=none -//! [actions]: https://actions-badge.atrox.dev/paupino/pg_query/goto +//! [Build Status]: https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fpganalyze%2Fpg_query.rs%2Fbadge%3Fref%3Dmain&style=flat&label=build&logo=none +//! [actions]: https://actions-badge.atrox.dev/pganalyze/pg_query.rs/goto?ref=main //! [Latest Version]: https://img.shields.io/crates/v/pg_query.svg //! [crates.io]: https://crates.io/crates/pg_query //! [Docs Badge]: https://docs.rs/pg_query/badge.svg //! [docs]: https://docs.rs/pg_query //! -//! PostgreSQL parser that uses the [actual PostgreSQL server source]((https://github.com/pganalyze/libpg_query)) to parse -//! SQL queries and return the internal PostgreSQL parse tree. +//! This Rust library uses the actual PostgreSQL server source to parse SQL queries and return the internal PostgreSQL parse tree. //! -//! Warning! This library is in early stages of development so any APIs exposed are subject to change. +//! It also allows you to normalize queries (replacing constant values with $1, etc.) and parse these normalized queries into a parse tree again. +//! +//! When you build this library, it builds parts of the PostgreSQL server source (see [libpg_query](https://github.com/pganalyze/libpg_query)), and then statically links it into this library. +//! +//! You can find further examples and a longer rationale for the original Ruby implementation [here](https://pganalyze.com/blog/parse-postgresql-queries-in-ruby.html). The Rust version tries to have a very similar API. //! //! ## Getting started //! @@ -19,7 +22,7 @@ //! //! ```toml //! [dependencies] -//! pg_query = "0.7" +//! pg_query = "5.0" //! ``` //! //! # Example: Parsing a query