Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pyramation/pgsql-parser-openfaas
https://github.com/pyramation/pgsql-parser-openfaas
ast nodejs openfaas parser pgsql
Last synced: 19 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/pyramation/pgsql-parser-openfaas
- Owner: pyramation
- Created: 2018-10-05T23:18:32.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-08T22:34:38.000Z (over 6 years ago)
- Last Synced: 2024-11-10T05:16:30.689Z (about 2 months ago)
- Topics: ast, nodejs, openfaas, parser, pgsql
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# use pgsql parser via openfaas!
This makes a openfaas function for https://github.com/pyramation/pg-query-parser
Docker Hub: https://hub.docker.com/r/pyramation/pgsql-parser/
Example usage/test:
```sh
make test
echo "select 1" | faas-cli invoke pgsql-parser --gateway http://127.0.0.1:31112 --content-type application/sql
{"contentType":"application/json","content":[{"RawStmt":{"stmt":{"SelectStmt":{"targetList":[{"ResTarget":{"val":{"A_Const":{"val":{"Integer":{"ival":1}},"location":7}},"location":7}}],"op":0}}}}]}make test-ast
echo '[{"RawStmt":{"stmt":{"SelectStmt":{"targetList":[{"ResTarget":{"val":{"A_Const":{"val":{"Integer":{"ival":1}},"location":7}},"location":7}}],"op":0}}}}]' | faas-cli invoke pgsql-parser --gateway http://127.0.0.1:31112 --content-type application/json
{"contentType":"text/plain","content":"SELECT 1;"}
$
```