This is generic question about how to code cleen and beauty with your plug-in.
My question is about what best coding pattern to integrate db interaction?
Due to asynckronous, interactions with db, generally looks like:
How is possible to instantiate vars with db query results, for example to split complex task in smallest functions?
How is it possible something like:
main task function( ) {
function to extract values from 1st table;
function to extract values from 2nd table;
do something with both previous functions;
}
This is generic question about how to code cleen and beauty with your plug-in. My question is about what best coding pattern to integrate db interaction? Due to asynckronous, interactions with db, generally looks like:
function addItem(first, last, acctNum) {
}
Examples often show query results in console.logs
How is possible to instantiate vars with db query results, for example to split complex task in smallest functions?
How is it possible something like:
main task function( ) { function to extract values from 1st table; function to extract values from 2nd table; do something with both previous functions; }
or
var result = function to extract data from table;
Thank you for help!
result