aboutsummaryrefslogblamecommitdiffstats
path: root/.mongoshrc.js
blob: 9533ee802fa79b2e934533b4c012aea6c4949b70 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11






                                     



                                                                         
                                                                                                       
                        
                                                                               
                        
                                                                  

    







                          
"use strict";

config.set("editor", "vim");
config.set("enableTelemetry", false);
config.set("inspectDepth", 8);
config.set("historyLength", 5000);

{
  const hostnameSymbol = Symbol("hostname");
  prompt = () => {
    if (!db[hostnameSymbol]) db[hostnameSymbol] = db.serverStatus().host;
    return `\x1b[38;5;63m${ISODate().toLocaleTimeString()} \x1b[38;5;24m${db.getName()}\x1b[38;5;24m@${
      db[hostnameSymbol]
    }\x1b[38;5;22m Uptime:${db.serverStatus().uptime}\x1b[38;5;26m Documents:${
      db.stats().objects
    }\x1b[38;5;109m V:${db.version()} \n \x1b[38;5;30m>>>\x1b[0m`;
  };
}

function get_mangas() {
  return db.mangas.find();
}

function get_animes() {
  return db.animes.find();
}