推荐工具
RoboMongo
推荐书目
50 Tips and Tricks for MongoDB Developers
Related Blogs
Snail in a Turtleneck
tonghuashuai
V2EX  ›  MongoDB

我想在 .mongorc.js 中写一个函数处理时间戳,大家有没有什么好办法啊

  •  
  •   tonghuashuai · Jun 4, 2015 · 4063 views
    This topic created in 4011 days ago, the information mentioned may be changed or developed.
    DBQuery.prototype.h = function (col) {
    this._prettyShell = true;
    this['_' + col] = getTime(this[col]);

    return this
    }

    开始是用上边的写法,发现 BSON 数据不能按 js object 来处理,大家有没有什么好的办法呢?
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1201 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 17:53 · PVG 01:53 · LAX 10:53 · JFK 13:53
    ♥ Do have faith in what you're doing.