minimongo

How to update property in multiple objects in an array for one document in Meteor collection/minimongo?

若如初见. 提交于 2019-12-10 10:07:19
问题 My question is almost a duplicate of this question. The difference is that I am using minimongo within the Meteor framework/platform. Given this document: { "_id" : ObjectId("4d2d8deff4e6c1d71fc29a07"), "user_id" : "714638ba-2e08-2168-2b99-00002f3d43c0", "events" : [ { "handled" : { "name": "Mike", "visible": false }, "profile" : 10, "data" : "....." } { "handled" : { "name": "Shaun", "visible": false }, "profile" : 10, "data" : "....." } { "handled" : { "name": "Glen", "visible": true },

Query from minimongo of large number of records stucks and hangs browser

喜你入骨 提交于 2019-12-08 15:40:50
问题 I am building a page for admin in angular-meteor . I have published all the records from a collection: " posts " and have taken the subscription of all the records on front end. $meteor.subscribe('posts'); In the controller, if I select the cursors of all records from minimongo it works fine like: $scope.posts = $meteor.collection(Posts); But I want to display pagination, so for that I want limited records at a time like: $scope.posts = $meteor.collection(function(){ return Posts.find( {}, {

How to make minimongo.js works in browser?

醉酒当歌 提交于 2019-12-06 05:12:05
问题 The github presentation of minimongo states it as Client-side mongo database with server sync over http There is a also a minimongo-standalone providing a minimongo.min.js which states : You could also just download the minimongo.min.js, place it on your server, and reference it in your source. For browsers <script src="/js/minimongo.min.js"></script> I previously used d3.js which is packaged in a way so the .js file works both in web-browsers as a lib and on nodes as a npm packages. So I

How to update property in multiple objects in an array for one document in Meteor collection/minimongo?

自古美人都是妖i 提交于 2019-12-05 22:18:39
My question is almost a duplicate of this question . The difference is that I am using minimongo within the Meteor framework/platform. Given this document: { "_id" : ObjectId("4d2d8deff4e6c1d71fc29a07"), "user_id" : "714638ba-2e08-2168-2b99-00002f3d43c0", "events" : [ { "handled" : { "name": "Mike", "visible": false }, "profile" : 10, "data" : "....." } { "handled" : { "name": "Shaun", "visible": false }, "profile" : 10, "data" : "....." } { "handled" : { "name": "Glen", "visible": true }, "profile" : 20, "data" : "....." } ]} How do I query for a particular user and update all the objects in

Can meteor mongo driver handle $each and $position operators?

人走茶凉 提交于 2019-12-04 22:45:39
I work on a meteor application with meteor bundle up to date. I want to reposition an item within a mongo document array. To achieve that, I $pull it out of the array, and then $push it at a specific index position according to mongoDB documentation . MyCollection.update({_id: my_doc.id}, { $push: { my_array: { $each:[my_item.id], $position:index } } } ) Meteor/Mongo throws the following error: update failed: MongoError: Can't canonicalize query: BadValue unknown top level operator: $each I first implemented this client side. I assumed it didn't work because of minimongo limitations. I wrote a

How can I integrate SlickGrid with Meteor.js reactive collections?

柔情痞子 提交于 2019-12-04 20:07:38
问题 SlickGrid focuses on displaying the data from a table or array, which is great. Meteor focuses on manipulating the data, but uses Minimongo. How can SlickGrid integrate with Minimonogo collections and preserve its fast display and large data handling capabilities? My current way of doing it feels wrong and is somewhat ugly. I have a separate array for SlickGrid and writing some glue code to handle update events: Sorting: Handled by Meteor, triggers a full refresh (re-setting data) add/update

How to make minimongo.js works in browser?

佐手、 提交于 2019-12-04 10:05:02
The github presentation of minimongo states it as Client-side mongo database with server sync over http There is a also a minimongo-standalone providing a minimongo.min.js which states : You could also just download the minimongo.min.js, place it on your server, and reference it in your source. For browsers <script src="/js/minimongo.min.js"></script> I previously used d3.js which is packaged in a way so the .js file works both in web-browsers as a lib and on nodes as a npm packages. So I tried locally with my newly downloaded minimongo.js to build a classic webpage with indexeddb in Chrome as

Mongo geospatial index and Meteor

ε祈祈猫儿з 提交于 2019-12-03 11:53:37
问题 I am wondering if it is possible to use a mongodb geospatial index with Meteor architecture. Minimongo does not implement geospatial indices, but does this mean that we cannot use this mongo feature on the server side? For example, with the todos app, if we use location on the todo, will it be possible to do: // Publish complete set of lists to all clients. Meteor.publish('todos', function (lon,lat) { return Todos.find({loc: {$near:[lon,lat]}}).limit(2); }); And on the client side : Meteor