docs: function createConnectionPromise(key, options) {
    
    debug('createConnectionPromise','start');
  
    //create promise that resolves to a connection
    var promise = new Promise((resolve,reject)=>{
      //create a new mssql connection
      let connection = new mssql.Connection(options,(err)=>handleConnectionCallback(err, resolve, reject, key, connection));
      connection.close = ()=>promise.then((conn)=>conn.close()).catch(()=>{ delete promises[key]; delete connections[key] });
      connection.query = (templateParts, ...params)=>promise.then((conn)=>query(conn,{},templateParts,params));
      connection.queryStream = (templateParts, ...params)=>promise.then((conn)=>query(conn,{stream:true},templateParts,params));
      connection.output = require('../parameters/output');
      connection.input = require('../parameters/input');
  
      debug('createConnectionPromise','success');
    });
  
    //add mssql types to promise - convenience access
    assign(promise, mssql.TYPES); //add mssql types to promise being returned
    promise.MAX = mssql.MAX;
    
    //back reference to cache
    promise._mssqlngKey = key;
  
    //extended methods
    promise.close = ()=>promise.then((conn)=>conn.close()).catch(()=>{ delete promises[key]; delete connections[key] });
    promise.query = (templateParts, ...params)=>promise.then((conn)=>query(conn,{},templateParts,params));
    promise.queryStream = (templateParts, ...params)=>promise.then((conn)=>query(conn,{stream:true},templateParts,params));
    promise.output = require('../parameters/output');
    promise.input = require('../parameters/input');
  
    debug('createConnectionPromise','success');
    return promise;
  }