Creates Rx observable from query
- Uses pooling
- Requires pgsql environment variables to be set
$ npm i -S mysql-query-observable
import createObservableFromQuery from 'mysql-query-observable'
createObservableFromQuery(`
SELECT * FROM item ORDER BY id ASC LIMIT 2
`)
.toArray()
.subscribe(data => console.log(data)) // [{item1}, {item2}]