docs: function getDatabaseConnector(database, options, callback) {
      if (typeof options === "function") {
          callback = options
          options = {}
      }
  
      options = extend({}, defaults, options)
  
      var server = new Server(options.host, options.port, options.serverOptions)
          , databaseConnector = new Db(database, server, options.dbOptions)
  
      databaseConnector.open(authOrReturn)
  
      function authOrReturn(err, db) {
          if (err) {
              return callback(err)
          }
  
          if (options.user || options.password) {
              db.authenticate(options.user, options.password
                  , options.authenticateOptions, returnDb)
          } else {
              callback(null, db)
          }
  
          function returnDb(err, success) {
              if (err) {
                  return callback(err)
              }
  
              if (!success) {
                  return callback(new Error("auth failed"))
              }
  
              callback(null, db)
          }
      }
  }