SollmoStudio / beyond

Beyond: The Scalable Game Server Framework
http://www.beyondframework.com
Apache License 2.0
25 stars 9 forks source link

Add limit option to ScriptableCollection.find method. #132

Closed sgkim126 closed 10 years ago

sgkim126 commented 10 years ago

Currently, ScriptableCollection.find method retruns all matched result. This patch makes the method limit the number of the result.

For example, collection.find(query);' will return all result, but collection.find(query, 3);' will return only three elements of it.

Actually limit doesn't limit the number of document on network. It just reduces the conversion overhead.

kseo commented 10 years ago

Landed manually after cleaning up the commit log.