https://github.com/pyramation/pgsql-parser-openfaas
https://github.com/pyramation/pgsql-parser-openfaas
ast nodejs openfaas parser pgsql
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pyramation/pgsql-parser-openfaas
- Owner: pyramation
- Created: 2018-10-05T23:18:32.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-08T22:34:38.000Z (almost 7 years ago)
- Last Synced: 2025-03-13T02:03:52.665Z (4 months ago)
- Topics: ast, nodejs, openfaas, parser, pgsql
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- 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;"}
$
```