[DOCS-6584] Explain where function is executed for Javascript function on server Created: 12/Nov/15  Updated: 30/Oct/23  Resolved: 03/Nov/17

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Bug Priority: Minor - P4
Reporter: Docs Collector User (Inactive) Assignee: Stennie Steneker (Inactive)
Resolution: Done Votes: 0
Labels: mts
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Location: https://docs.mongodb.org/manual/tutorial/store-javascript-function-on-server/
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0
Referrer: https://www.google.rs
Screen Resolution: 1920 x 1080
repo: docs
source: tutorial/store-javascript-function-on-server


Issue Links:
Depends
is depended on by DOCS-6585 Comment on: "manual/tutorial/store-ja... Closed
Participants:
Days since reply: 6 years, 14 weeks, 5 days ago
Story Points: 0.2

 Description   

When I call a function, where is execution of that function?
For example:
I have the database on the one computer, server is on the other, i have api call to server from third, and when I call second computer on this way:

myFunction(db.person.find(

{ name: 'Mike' }

))

I must get first object and then to call again database to execute function or what?

I want to select some data from that object(argument) and I want call only one time database, can I do that ?
Can I write function to do select exactly from the place where is database and get data ? Simply, only one call and processing(filtering) in the level of database by my embedded function!



 Comments   
Comment by Stennie Steneker (Inactive) [ 03/Nov/17 ]

Queries are executed on the MongoDB server. For server-side data manipulation the recommended approach is using the Aggregation Framework.

Note that the DOCS project is for reporting documentation errata or suggestions. For appropriate channels for MongoDB-related support discussion please refer to Technical Support options in the MongoDB documentation.

Generated at Thu Feb 08 07:52:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.