Skip to content

Commit

Permalink
Rename to query-json
Browse files Browse the repository at this point in the history
  • Loading branch information
davesnx committed Sep 14, 2020
1 parent b454cf8 commit eb4a554
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ jobs:
- name: Create archives for Github release
run: |
cd _release/platform-darwin-x64
mv q.exe q
mv q.exe query-json
zip -r ../../query-json-darwin-x64.zip .
cd ../..
cd _release/platform-linux-x64
mv q.exe q
mv q.exe query-json
zip -r ../../query-json-linux-x64.zip .
cd ../..
Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
**query-json (q)** is a [faster](#Performance) and simpler re-implementation of the [jq language](https://github.com/stedolan/jq/wiki/jq-Language-Description) in [Reason Native](https://reasonml.github.io/docs/en/native) and compiled to binary thanks to OCaml. **q**, allows you to write small programs to operate on top of json files in a cute syntax:

```bash
q ".store.books | filter(.price > 10)" stores.json
query-json ".store.books | filter(.price > 10)" stores.json
```

This would access to `"store"` field inside the **stores.json**, access to `"books"` field, (since it's an array) it will run a filter on each item and if `"price"` field is bigger than 10 will keep that item on the list, and finally print the resultant list.
Expand Down Expand Up @@ -71,6 +71,16 @@ yarn global add @davesnx/query-json
### Download zip files from [GitHub](https://github.com/davesnx/query-json/releases)
### Usage
```bash
query-json '.' pokemons.json
query-json --kind=inline '.' '{ "wooop": { "siiie": 1 } }'
# I have aliased query-json to be "q" for short.
alias q="query-json"
```

## Performance

[This report](./benchmarks/report.md) is not a exaustive performance report of both tools, it's a overview for the percived performance of the user. Here I don't profile each tool and trying to see what are the bootlenecks, since I asume that both tools have the penalty of parsing a JSON file. Simply run a bash script and analyze the results.
Expand Down
4 changes: 2 additions & 2 deletions bin/Info.re
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
let version = "0.3.7";
let description = "query-json is a faster and simpler re-implementation of jq in Reason Native, available under 'q'";
let version = "0.4.0";
let description = "query-json is a faster and simpler re-implementation of jq in Reason Native";

let repo = "https://github.com/davesnx/query-json";
let bugUrl = repo ++ "/issues";
2 changes: 1 addition & 1 deletion esy.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@davesnx/query-json",
"version": "0.3.7",
"version": "0.4.0",
"description": "faster and simpler re-implementation of jq in Reason Native",
"author": "davesnx <[email protected]>",
"license": "MIT",
Expand Down

0 comments on commit eb4a554

Please sign in to comment.