News for hackers. Stuff that matters.
Re:Ask HN: I was made redundant yesterday, and I want some c... by derekp7 on Friday March 01, 2019 @08:38PM (#19286915)
Here's something that could be relatively easy (there may be a good library out there already, I haven't looked to hard for it though). Create a node.js module that takes as input the results of an SQL one-to-many join, along with a description of the key fields in each level, and outputs the results in a nested JSON object. So for an example, an output of a customer <= invoices <= invoice_detail would have an array of objects containing customer info, each which has an array of child objects one for each invoice, and the invoice objects have a child object array for each line item.

Would be nice if it was abstracted enough to work with any database driver, and also have bindings for the node Oracle, Postgres, and MySQL drivers.

Re:Ask HN: I was made redundant yesterday, and I want some c... by natalyarostova on Friday March 01, 2019 @10:19PM (#19287283)
I think you could do this very easily using the Pandas API in Python.