English 中文(简体)
• 如何使用时间营地和在Meteor维持插入令?
原标题:How to use timestamps and preserve insertion order in Meteor?
  • 时间:2012-05-05 20:23:20
  •  标签:
  • meteor

如果MongoDB没有具体规定,没有保证在插入令中归还物品,那么在Meeteor保留插入令或设置可靠的时间序列是可能的,那么一份文件是随机生成的,并且人工确定插入的时间取决于客户的锁。

最佳回答

我建议采用一种方法。

Meteor.methods({
  addItem: function (doc) {
    doc.when = new Date;
    return Items.insert(doc);
  }
});

虽然客户将在当地经营,并在<><>>>上设定“<>>>>,但服务器的时间档优先,并向包括原始客户在内的所有用户传播。 您可在doc.time上分类。

作为文件验证和许可的一部分,我们或许会自动增加设置时间点。

问题回答




相关问题
Problems to run examples in Meteor

I m testing Meteor examples and this is what I see when I run meteor in todos examples: Unexpected mongo exit code 100. Restarting. Unexpected mongo exit code 100. Restarting. Unexpected mongo exit ...

Handlebars Exception

Any hints what the following exception might be about? Running on: http://localhost:3000/ No dependency info in bundle. Filesystem monitoring disabled. Errors prevented startup: Exception while ...

How easy to call external Web APIs in Meteor?

Does (or will) Meteor provide a library to handle external Web API calls? E.g. to build a Meteor app that integrates with Facebook Graph API or Google Spreadsheet API.

Meteor - Using collection on client startup

Why this code shows "0"? Shouldn t it return "1"? Messages = new Meteor.Collection("messages"); if (Meteor.is_client) { Meteor.startup(function () { alert(Messages.find().count()); ...

热门标签