WIP
What's PartiQL?
pq
command
pq samples/pokemon.json -q "$(cat<<EOF
SELECT
no AS id,
name,
weight/height/height AS bmi
ORDER BY bmi DESC
LIMIT 10
EOF
)" -t csv
curl -s https://api.github.com/users/fuyutarow/repos | pq -q "$(cat<<EOS
SELECT
owner.login AS user,
stargazers_count AS star,
svn_url AS url,
EOS
)" -t yaml
brew install fuyutarow/tap/pq
Support - [x] JSON - [ ] JSON5 - [x] TOML - [x] YAML - [x] XML
env | jo | pq
env | jo | pq -t yaml
env | jo | pq -t yaml | pq -t toml
sort keys of objects on output
env | jo | pq -S ;:
brew install jo
env | jo | pq "SELECT NAME AS name, USER AS user"
ip
command is only available in Linux and WSL, not in Mac.
ip -j -p | pq "$(cat<<EOS
SELECT
address,
info.family AS inet,
info.local
FROM addr_info AS info
WHERE inet LIKE 'inet%'
EOS
)"
Requirements
- cargo-make for makers
makers install-dev
makers build
makers build:pq ;: for pq commnad
makers test:lib
makers test:pq ;: for pq commnad