You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 22, 2019. It is now read-only.
I can't seen to find a way of sorting my collection. I know collection.sorted returns all the values in my collection, sorted by id, but I would like to sort using another field in my collection.
Is there a built in way of doing this?
Thanks!
The text was updated successfully, but these errors were encountered:
No, there is not. This is intentional. MeteorJS is tied to MongoDB on both the client and server. There's nothing approximating MongoDB in iOS, and for serious applications you'll really want to use Core Data, Realm, SQLite or perhaps Couchbase Mobile as your iOS datastore. In this more advanced scenario, SwiftDDP would handle the communication - method calls, pubs and subs - between your client and your mobile datastore. You can see examples of this in the Todos examples.
MeteorCollection is intended to provide scaffolding to create more powerful collections backed by other datastores by providing a built-in object that responds to server changes. While it has a few convenience methods, it's not a full-fledged client datastore like minimongo.
That said, what you're trying to do is super easy. Just subclass MeteorCollection and add a method that does what you're trying to do. Have a look at the MeteorCollection code to get an idea of how it works. It's really not complicated.
Hi There,
I can't seen to find a way of sorting my collection. I know collection.sorted returns all the values in my collection, sorted by id, but I would like to sort using another field in my collection.
Is there a built in way of doing this?
Thanks!
The text was updated successfully, but these errors were encountered: