Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-6584

Explain where function is executed for Javascript function on server

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • Server_Docs_20231030
    • None
    • manual, Server
    • 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!

      Attachments

        Activity

          People

            stephen.steneker@mongodb.com Stennie Steneker (Inactive)
            xgen-internal-docs Docs Collector User (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              6 years, 14 weeks, 5 days ago