Yuri Astrakhan a824e8468c
Cleanup format arguments (#2650)
Inlined format args make code more readable, and code more compact.

I ran this clippy command to fix most cases, and then cleaned up a few trailing commas and uncaught edge cases.

```
cargo clippy --bins --examples  --benches --tests --lib --workspace --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2023-07-31 13:27:04 -07:00
..
2023-07-31 13:27:04 -07:00
2023-07-03 14:37:37 -07:00
2020-11-12 07:21:54 -08:00

JSON Example

Setup

  1. Declare the database URL

    export DATABASE_URL="postgres://postgres:password@localhost/json"
    
  2. Create the database.

    $ sqlx db create
    
  3. Run sql migrations

    $ sqlx migrate run
    

Usage

Add a person

echo '{ "name": "John Doe", "age": 30 }' | cargo run -- add

or with extra keys

echo '{ "name": "Jane Doe", "age": 25, "array": ["string", true, 0] }' | cargo run -- add

List all people

cargo run