Meteor-Community-Packages / meteor-schema-index

Control some MongoDB indexing with schema options
MIT License
38 stars 17 forks source link

update to rawCollection().createIndex() over meteor _ensureIndex #12

Closed Pushplaybang closed 10 months ago

Pushplaybang commented 7 years ago

Hey there,

Should we update to use the documented rawCollection().createIndex() rather than the undocumented meteor method ._ensureIndex()?

faisalhasnain commented 7 years ago

@aldeed If you can update, it would be great. It would be a small change.

aldeed commented 6 years ago

@Pushplaybang @faisalhasnain Is there some reason to do this now other than because relying on private props is discouraged in general? I ask because this works, has always worked, and will likely work for a long time, and as far as I can tell, the documented functions are not synchronous.

See https://github.com/meteor/meteor/blob/4a97d0551fbbc9827ddd101b162322dc03c5905d/packages/mongo/mongo_driver.js#L787-L807

I would like to change it but I'd just have to reimplement that Futures code.

StorytellerCZ commented 10 months ago

Updating to use the official Metoer API.