HttpQL specification v1.0 (https://github.com/hoogw/httpql)

HttpQL specification v1.0 (https;//transparentgov.net/httpql/index.html)

 

 

Some times GraphQL ( creator Facebook 2012  ) and JSON:API ( creator Yehuda Katz  2013),   are more complicated than the problem you are trying to solve. To avoid shoot cannon to kill mosquito. I create a new simple, no opinioned, flexible httpQL (github.com)  to run SQL via http protocol

by

1 comment

 

 

 

 

 

Example SQL : 

 

SELECT count(*) FROM url_imported

where url like '%rest/services%'

 

Building URL component:

                  rest api endpoint:    https://transparentgov.net:3200/restapi

                                                 or 

                                                 http://transparentgov.net:3000/restapi

 

                  table name :  url_imported

                  select = count(*)

                  where = url like '%rest/services%'

                    where clause must encoded as :  where = url+like+%27%25rest%2Fservices%25%27

                    click here to encode any string

                 use '&' concatenate all above component

 

Final http URL : 

              https://transparentgov.net:3200/restapi/url_imported?select=count(*)&where=url+like+%27%25rest%2Fservices%25%27

 

 

Example 2: 

SQL :   SELECT * FROM url_imported where url like '%rest/services%'

URL:  https://transparentgov.net:3200/restapi/url_imported?select=*&where=url+like+%27%25rest%2Fservices%25%27

 

 

answered by