<commit_before>var NanoProxyDbFunctions = require("./NanoProxyDbFunctions.js");

var NanoProxy = function(nano, prefix) {
  this.nano = nano;
  this.prefix = prefix;

  this.db = new NanoProxyDbFunctions(nano, prefix);

  this.config = this.nano.config;
};

NanoProxy.prototype.use = function(name) {
  return this.db.use(name);
};

NanoProxy.prototype.scope = NanoProxy.prototype.use;

NanoProxy.prototype.request = function(opts, callback) {
  throw new Error("Not implemented");
};

NanoProxy.prototype.relax = NanoProxy.prototype.request;
NanoProxy.prototype.dinosaur = NanoProxy.prototype.request;

NanoProxy.prototype.updates = function(params, callback) {
  return this.nano.updates(params, callback);
};

NanoProxy.prototype.followUpdates = function(params, callback) {
  return this.nano.followUpdates(params, callback);
};

module.exports = NanoProxy;
<commit_msg>Implement nano.request<commit_after>var NanoProxyDbFunctions = require("./NanoProxyDbFunctions.js");

var NanoProxy = function(nano, prefix) {
  this.nano = nano;
  this.prefix = prefix;

  this.db = new NanoProxyDbFunctions(nano, prefix);

  this.config = this.nano.config;
};

NanoProxy.prototype.use = function(name) {
  return this.db.use(name);
};

NanoProxy.prototype.scope = NanoProxy.prototype.use;

NanoProxy.prototype.request = function(opts, callback) {
  if(opts.db) {
    opts.db = [this.prefix, opts.db].join("_");
  }
  return this.nano.request(opts, callback);
};

NanoProxy.prototype.relax = NanoProxy.prototype.request;
NanoProxy.prototype.dinosaur = NanoProxy.prototype.request;

NanoProxy.prototype.updates = function(params, callback) {
  return this.nano.updates(params, callback);
};

NanoProxy.prototype.followUpdates = function(params, callback) {
  return this.nano.followUpdates(params, callback);
};

module.exports = NanoProxy;

{'fraction_non_alphanumeric': 0.13544511196067724, 'fraction_numerical': 0.0, 'mean_word_length': 5.273972602739726, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6288957', 'n_tokens_mistral': 619, 'n_tokens_neox': 596, 'n_words': 100}