Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

161
Vistas
Call MongoDB stored function from pymongo

I have the following function stored in mongodb:

db.system.js.save({
    _id: "testFunc",
    value: function() {
        return db.clients.find_one({}, {"_id" : False});
    }
});

How do I call the function above from python using pymongo? I have already tried db.eval('testFunc') and it doesn't work. The method is deprecated.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

eval, system_js etc. are all deprecated.

While you can still create javascript functions on the server, it comes with a clear warning:

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.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda