code: function convertOptionsToConfig(options) {
      var result = { database: {}, output: {} };
      // Copy all database options to options global variable to override config.
      ['host', 'port', 'database', 'user', 'password', 'schema'].forEach(function (option) {
          if (options[option] !== undefined) {
              result.database[option] = options[option];
              delete options[option];
          }
      });
  
      if (options.nolog !== undefined) {
          result.output.log = !options.nolog; // Reverse of the nolog
          delete options.nolog;
      }
  
      // Override output folder if given.
      if (options.output !== undefined) {
          result.output.folder = options.output;
          delete options.output;
      }
  
      // Override template folder
      if (options.templateName !== undefined) {
          if (options.template === undefined) {
              options.template = {};
          }
          options.template.folder = path.join(__dirname, '..', 'template', options.templateName);
          delete options.templateName;
      }
  
      // Copy remaining non deleted options to root of result.
      lodash.defaults(result, options);
      return result;
  }
docs: Converts options to config params by inserting root level values into correct position in config object.
  For example: { host: '127.0.0.1' } -> { database: { host: '127.0.0.1'} }
  @private
  @param {Object} options - Options from constructor
  @returns {{database: {}, output: {}}}