examples/node/results.js
function(results) {
        if (results) {
            var isRows = !!results.rows;
            var numResults = (results.rows ? results.rows.length : (results.columns[0] || []).length);
            
            console.log("====== " + numResults + " RESULTS (preview: " + !!results.preview + ") ======");
            
            // If it is in column-major form, transpose it.
            if (!isRows) {
                results = transpose(results);
            }
            
            printRows(results);
        }
    }
function(results) {
        if (results) {
            var isRows = !!results.rows;
            var numResults = (results.rows ? results.rows.length : (results.columns[0] || []).length);
            
            console.log("====== " + numResults + " RESULTS (preview: " + !!results.preview + ") ======");
            
            // If it is in column-major form, transpose it.
            if (!isRows) {
                results = transpose(results);
            }
            
            printRows(results);
        }
    }
function ( results ) { if ( results ) { var isRows = ! ! results . rows ; var numResults = ( results . rows ? results . rows . length : ( results . columns [ 0 ] || [ ] ) . length ) ; console . log ( "====== " + numResults + " RESULTS (preview: " + ! ! results . preview + ") ======" ) ; // If it is in column-major form, transpose it. if ( ! isRows ) { results = transpose ( results ) ; } printRows ( results ) ; } }
Print the results
Print the results