code: function get_db (ent, done) {
      var folder = internals.makefolderpath(opts.folder, ent)
      var db = dbmap[folder]
      if (db) {
        return done(null, db)
      }
      internals.ensurefolder(folder, internals.error(done, function () {
        db = dbmap[folder]
        if (db) {
          return done(null, db)
        }
        try {
          db = dbmap[folder] = LevelQuery(Levelup(folder, opts))
          db.query.use(JsonqueryEngine())
        }
        catch (e) {
          db = dbmap[folder]
          if (db) {
            return done(null, db)
          }
          return done(e)
        }
        return done(null, db)
      }))
    }
docs: Get the levelup reference