--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Here is what I am talking about, look at return select_statement, I assign it the data but ss still comes back!
{
"allProducts" : "select * from products"
}
This way, any of your modules that need the queries can just require the json file, and have an object whose property values correspond to the SQL strings, eg
var queries = require('./queries.json');
db.query(queries.allProducts, callback);