Thread: s2x 1.1 released (SQL to Anything)
s2x 1.1 has been released (http://s2x.co) ---------------------------------------------------------------------- s2x ("SQL to Anything") converts SQL functions calls to a variety of formats (JSON, XML, csv, Excel) and returns result sets over HTTP. SQL function names and parameters are passed inside HTTP requests. Multiple calls can be chained into one HTTP request to avoid database round-trips. s2x works with PostgreSQL (8.1+) and Apache (2.2+) on Ubuntu, CentOS and other UNIX systems. GPLv3 http://s2x.co ---------------------------------------------------------------------- Synopsis ======== CREATE FUNCTION listProductNames() RETURNS SETOF varchar AS $$ SELECT name FROM Products; $$ LANGUAGE 'SQL'; GRANT EXECUTE ON FUNCTION listProductNames() TO s2x; curl http://s2x.co/json?listProductNames curl http://s2x.co/listProductNames.json {"listProductNames":[{"name":"Snow blower"},{"name":"Cordless drill"}]} curl http://s2x.co/listProductNames.xml <sql2xml> <function name="listProductNames"> <set> <record><value name="name">Snow blower</value></record> <record><value name="name">Cordless drill</value></record> </set> </function> </sql2xml> curl http://s2x.co/listProductNames.csv curl http://s2x.co/listProductNames.xlsx