HySoaKa / node-red-contrib-postgrestor

Yet another Node-RED node to query PostgreSQL
GNU Affero General Public License v3.0
10 stars 17 forks source link

Example with split and rows value? #17

Open bdbais opened 4 years ago

bdbais commented 4 years ago

Hi could you put on package a complete example with rows splitted and printed? I'm trying to split them but it doesn't works.

Database and query are working well!

msg.payload : string[124838]
"{"command":"SELECT","rowCount":468,"oid":null,"rows":[{"id":1,"gene_rei":"CSF2RB","descrizione":"colony stimulating factor 2 receptor beta common subunit","gene_mim":"","created_date":"2020-06-13T12:20:30.283Z","modified_date":"2020-06-13T12:20:30.283Z","created_by_id":1,"fenotipo_id":null,"modified_by_id":1,"esoni":"","lunghezza":""},{"id":2,"gene_rei":"True","descrizione":"colony stimulating factor 2 receptor beta common subunit","gene_mim":"","created_date":"2020-06-13T12:20:30.317Z","modified_date":"2020-06-13T12:20:30.371Z","created_by_id":1,"fenotipo_id":null,"modified_by_id":1,"esoni":"","lunghezza":""},{"id":34,"gene_rei":"RAB7A","descrizione":"Malattia di Charcot-Marie-Tooth di tipo 1B","gene_mim":"602298","created_date":"2020-06-13T12:20:35.291Z","modified_date":"2020-06-13T12:20:37.552Z","created_by_id":1,"fenotipo_id":null,"modified_by_id":1,"esoni":"","lunghezza":""},{"id":5,"gene_rei":"ATP1A1","descrizione":"Malattia di Charcot-Marie-Tooth di tipo 2 (Am J Hum Genet. 2018 ..."

I used 'change' and Move msg.rows in msg.payload

but when I split them and print:

23/6/2020, 15:19:58node: 517bb5f1.c9d4fc
msg.payload : undefined
undefined
bdbais commented 4 years ago

Okay resolved:

msg.payload.rows instead msg.rows