-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating capped collection in Meteor #1478
Comments
Hi @mattuuh7. There's an underscored (internal, not documented, not guaranteed to stick around in future releases) api for this right now; to create a capped collection on the server, you can do this:
|
Thanks! |
@mattuuh7, Hi there, consider reading these nuances about live updates to capped collection: https://github.com/meteor/meteor/blob/devel/packages/mongo-livedata/mongo_driver.js#L1161 |
FWIW, on 1.3.2.4, the link is now at https://github.com/meteor/meteor/blob/release-1.3.2.4/packages/mongo/mongo_driver.js#L1281 |
Note - this seems to be broken after Meteor 1.11 and the update to mongodb driver 3.6.0 :
This runs fine the very first time, when the collection doesn't actually exist. After that, you'll get an exception:
I suspect it's because of the "Changes in behavior of Db.prototype.createCollection" section in |
As suggested in the Meteor forums, the following workaround works:
|
Is there an existing API for creating capped collection in Meteor? Thanks.
The text was updated successfully, but these errors were encountered: