Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array parameters passed via msg.payload to alasql node not working #16

Closed
tmdoit-zz opened this issue Jun 20, 2018 · 2 comments
Closed
Assignees

Comments

@tmdoit-zz
Copy link
Contributor

Array of parameters passed in msg.payload is treated by alasql in insert as one parameter, ie.:
[{"id":"c1a70029.98ea7","type":"alasql","z":"2d89d4b5.a581bc","name":"","query":"CREATE TABLE ArticleGroups (Code string, Name string);","x":250,"y":1120,"wires":[["67e913ab.e7446c"]]},{"id":"af2252b0.09bc6","type":"inject","z":"2d89d4b5.a581bc","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":1120,"wires":[["c1a70029.98ea7"]]},{"id":"67e913ab.e7446c","type":"function","z":"2d89d4b5.a581bc","name":"","func":"msg.payload = [\"fd\",\"df\"];\nreturn msg;","outputs":1,"noerr":0,"x":400,"y":1120,"wires":[["23c7e6be.9f2bea"]]},{"id":"23c7e6be.9f2bea","type":"alasql","z":"2d89d4b5.a581bc","name":"","query":"INSERT INTO ArticleGroups VALUES (?,?);\nSELECT * FROM ArticleGroups;","x":550,"y":1120,"wires":[["d4e3b5c3.4e4e28","d43d6056.198fb"]]},{"id":"d4e3b5c3.4e4e28","type":"alasql","z":"2d89d4b5.a581bc","name":"","query":"DROP TABLE ArticleGroups;","x":710,"y":1120,"wires":[[]]},{"id":"d43d6056.198fb","type":"debug","z":"2d89d4b5.a581bc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":700,"y":1060,"wires":[]}]

@tmdoit-zz tmdoit-zz changed the title Array parameters from msg.payload not working Array parameters passed via msg.payload to alasql node not working Jun 20, 2018
@tmdoit-zz
Copy link
Contributor Author

tmdoit-zz commented Jun 20, 2018

I've found the problem which is already fixed: 2e7aff6.
Please update node-red package.

@mathiasrw
Copy link
Member

Its not updated? crazy, Will look into this today.

@mathiasrw mathiasrw self-assigned this Jun 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants