MongoDB Stored Procedure Equivalent

前端 未结 3 834
死守一世寂寞
死守一世寂寞 2020-11-29 23:16

I have a large CSV file containing a list of stores, in which one of the field is ZipCode. I have a separate MongoDB database called ZipCodes, which stores the latitude and

相关标签:
3条回答
  • 2020-11-29 23:57

    The closest thing to an equivalent of a stored procedure in mongodb is stored javascript. A good introduction to stored javascript is available in this article on Mike Dirolf's blog.

    0 讨论(0)
  • 2020-11-30 00:19

    NOTE that according to the reference:

    Do not store application logic in the database. There are performance limitations to running JavaScript inside of MongoDB. Application code also is typically most effective when it shares version control with the application itself.

    So there is not any equivalent for stored procedure in mongodb.

    0 讨论(0)
  • 2020-11-30 00:23

    You could use Triggers and Functions on the cloud with MongoDB Stitch.

    0 讨论(0)
提交回复
热议问题