alternative for db.eval() in MongoDB 3.0

5,213 views
Skip to first unread message

Devender Yadav

unread,
May 27, 2015, 5:09:19 AM5/27/15
to mongod...@googlegroups.com
db.eval() method is deprecated in 3.0 version. what is the alternative for this?

-Devender

Stephen Steneker

unread,
May 28, 2015, 2:57:48 PM5/28/15
to mongod...@googlegroups.com, dev...@gmail.com
On Wednesday, 27 May 2015 02:09:19 UTC-7, Devender Yadav wrote:
db.eval() method is deprecated in 3.0 version. what is the alternative for this?

Hi Devender,

Deprecation means that the server-side $eval command is still available in MongoDB 3.0 but is planned for removal in a future release. There are a number of issues with the $eval command (see the summary from Dan Passette on https://jira.mongodb.org/browse/SERVER-17453).

The alternative is to implement the equivalent queries/operations using the normal MongoDB query language and client driver API.

Note: this is specific to the $eval command. Server-side JavaScript for Map/Reduce and $where is still supported.

Regards,
Stephen

Liam Cameron

unread,
Mar 4, 2016, 3:23:01 AM3/4/16
to mongodb-user, dev...@gmail.com
Hi Stephen,

Will the deprecation of $eval lead to the deprecation of the pymongo.database.SystemJS class as well? 
Please have a look at my post regarding this, here: https://groups.google.com/forum/#!topic/mongodb-user/BSi_v-J05P0

Thanks in advance.
Liam
Reply all
Reply to author
Forward
0 new messages