title: return array from tedious
body: <p>Can't return an array. At the exit you need to get each value separately to insert into the database. Maybe somewhere I made a mistake with the callback. Code below.</p>
  
  <pre><code>function executeTest(connection, callback) {
  
      var results = [];
  
      var request = new Request(ted_select, function(error) {
  
          if (error) {
              return callback(error);
          }
          // pass the results array on through the callback
          callback(null, results);
      });
  
      request.on("row", function(rowObject) {
          // populate the results array
          results.push(rowObject);
      });
      connection.execSql(request);
  }
  
  function test(callback) {
      var connection = new Connection(config);
      connection.on('connect', function(err) {
          if (err) {
              console.log(err);
          } else {
              console.log('Connect database');
              executeTest(connection, function(error, results) {
                  // here is the results array from the first query
                  console.log(results);
              });
              setTimeout(function(){connection.close(console.log('Disconnect database'));},10000);
          }
          callback(null, results);
      });
  }
  
  var value = test();
  console.log(value);
  </code></pre>
  
  <p>Thanks.</p>