Comments (2)
Hmm. I think your use case (returning a query cursor from a method) is not supported by Meteor. In your case you can have a simple subscription to collect the data so you can each
over it. Perhaps you can start the publication from the Method. I see a potential problem that you can each
over an array but not over a string, but let me know if the advice of using a subscription in your case works.
from meteor-promise.
Excuse me, the Meteor.methods()
don't support cursor
.
Correct my example like this
// Server
Meteor.methods({
getData: function(){
var data = [];
var myCollection = MyCollection.find(); // 10000 docs
myCollection.forEach(function(obj){
// do something
data.push(obj);
})
return data;
}
})
But it still don't show loading...
.
from meteor-promise.
Related Issues (20)
- Could I return array form Meteor.methods()? HOT 1
- Replacing to okgrow:promise should we update our current promisses? HOT 7
- Promise.all like for Meteor.subscribe - #readyPromise() HOT 5
- Provide HTTP.callPromise on the server? HOT 4
- okgrow vs deanius meteor-promise? HOT 2
- Feature request: Meteor.applyPromise HOT 1
- Support for IE8 ? HOT 1
- Getting "TypeError: Object [object Object] has no method 'callPromise'" HOT 5
- Wrap the collection methods (insert,update,elete)?
- Getting errors running tests in Meteor 1.3-rc.2 HOT 3
- Demo / Docs Is Down HOT 4
- Test
- cosmos:browserify dependency HOT 3
- Omits query fields in data-loading method HOT 1
- not compatable with Meteor 1.6
- DevTools failed to parse SourceMap
- publish latest? HOT 1
- This package is still maintenance?
- How to Synchronous call on the Server (return result)?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meteor-promise.