lib/wrapper.js
function(sql, val, callback) {
  let qry = (typeof sql === 'object') ? sql : mysql.format(sql, val);
  if (!callback && typeof val === 'function') callback = val; // Handle 2 parm scenario

  _pool.getConnection((err, conn) => {
    _pool.query(qry, (err, items, fields) => {
      if (err) return callback(err);

      conn.release();

      callback(err, items);
    });
  });
}
function(sql, val, callback) {
  let qry = (typeof sql === 'object') ? sql : mysql.format(sql, val);
  if (!callback && typeof val === 'function') callback = val; // Handle 2 parm scenario

  _pool.getConnection((err, conn) => {
    _pool.query(qry, (err, items, fields) => {
      if (err) return callback(err);

      conn.release();

      callback(err, items);
    });
  });
}
function ( sql , val , callback ) { let qry = ( typeof sql === 'object' ) ? sql : mysql . format ( sql , val ) ; if ( ! callback && typeof val === 'function' ) callback = val ; // Handle 2 parm scenario _pool . getConnection ( ( err , conn ) => { _pool . query ( qry , ( err , items , fields ) => { if ( err ) return callback ( err ) ; conn . release ( ) ; callback ( err , items ) ; } ) ; } ) ; }
Exposes the basic query without promise
Exposes the basic query without promise