Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryankirkman/sql-es
Use SQL syntax to query a custom REST API with ElasticSearch-like parameters
https://github.com/ryankirkman/sql-es
Last synced: 7 days ago
JSON representation
Use SQL syntax to query a custom REST API with ElasticSearch-like parameters
- Host: GitHub
- URL: https://github.com/ryankirkman/sql-es
- Owner: ryankirkman
- License: mit
- Created: 2015-09-29T23:07:42.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-09T23:26:58.000Z (about 9 years ago)
- Last Synced: 2024-04-23T20:54:40.718Z (9 months ago)
- Language: JavaScript
- Size: 152 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
sql-es
======Use SQL syntax to query a custom REST API with ElasticSearch-like parameters
Install (as a command line util)
================================
`npm install sql-es -g`Usage
=====
`-h` or `--host`: Host template. Note `{product}` in the template below. `sql-es` will substitute in the `table` value from the SQL query. Note for the host that HTTP will be assumed and prepended.`-q` or `--query`: The SQL query
## Usage Example
### Simple
`sql-es -h host.com/product/{product}/search -q 'SELECT * FROM table WHERE id > 3200 LIMIT 10'`Result
======
A JSON string with indentation set to 4. Assumes the result of the POST request will be JSON.Misc
====
This is super hacked to gether and extremely specific to my use case. Good luck using it on your own.Just read the source. It's only ~100 lines.