← Volver al índice de módulos

ndb_mongodb

This module provides a non-db connector to interact with MongoDB NoSQL server from configuration file. You can read more about MongoDB at http://www.mongodb.org.
🛠️ Utilidades y Varios Kamailio 6.1 2 parámetros 12 funciones

Descripción general

This module provides a non-db connector to interact with MongoDB NoSQL server from configuration file. You can read more about MongoDB at http://www.mongodb.org. It can connect to many MongoDB servers and store the results in different containers.

Documentación oficial: https://www.kamailio.org/docs/modules/stable/modules/ndb_mongodb.html
Código fuente: https://github.com/kamailio/kamailio/tree/master/src/modules/ndb_mongodb

Parámetros de configuración

ParámetroTipoDescripción
server str 3.1. server (str)
server str Specify the details to connect to MongoDB server. It takes a list of attribute=value separated by semicolon, the attributes can be name and uri. Name is a generic identifier to be used with module fun

Funciones exportadas

mongodb_cmd(srvname, dbname, cname, command, replyid)

4.2. mongodb_cmd_simple(srvname, dbname, cname, command, replyid) 4.3. mongodb_find(srvname, dbname, cname, command, replyid) 4.4. mongodb_find_one(srvname, dbname, cname, command, replyid) 4.5. mongodb_next(replyid) 4.6. mongodb_free(replyid)

mongodb_cmd_simple(srvname, dbname, cname, command, replyid)

4.3. mongodb_find(srvname, dbname, cname, command, replyid) 4.4. mongodb_find_one(srvname, dbname, cname, command, replyid) 4.5. mongodb_next(replyid) 4.6. mongodb_free(replyid)

mongodb_find(srvname, dbname, cname, command, replyid)

4.4. mongodb_find_one(srvname, dbname, cname, command, replyid) 4.5. mongodb_next(replyid) 4.6. mongodb_free(replyid)

mongodb_find_one(srvname, dbname, cname, command, replyid)

4.5. mongodb_next(replyid) 4.6. mongodb_free(replyid)

mongodb_next(replyid)

4.6. mongodb_free(replyid)

mongodb_free(replyid)

4.1. mongodb_cmd(srvname, dbname, cname, command, replyid)

mongodb_cmd(srvname, dbname, cname, command, replyid)

Send a valid command to MongoDB server identified by srvname. The reply will be stored in a local container identified by replyid. All the parameters can be strings with pseudo-variables that are evaluated at runtime.

mongodb_cmd_simple(srvname, dbname, cname, command, replyid)

Send a valid command to MongoDB server identified by srvname. The reply will be stored in a local container identified by replyid. All the parameters can be strings with pseudo-variables that are evaluated at runtime.

mongodb_find(srvname, dbname, cname, command, replyid)

Send a find command to MongoDB server identified by srvname. The reply will be stored in a local container identified by replyid. All the parameters can be strings with pseudo-variables that are evaluated at runtime.

mongodb_find_one(srvname, dbname, cname, command, replyid)

Similar to mongodb_find(...), but it stops searching after first match, returning the result with one object - faster when expecting to have a single match. Parameters and behaviour are the same as for mongodb_find(...).

mongodb_next(replyid)

Moves to next document in a MongoDB reply. This function can be used after a successful mongodb_cmd() or mongodb_find(). It returns true if there is a shift to document. The current document becomes available via $mongodb(key) variable.

mongodb_free(replyid)

Frees data in a previous reply from memory. After this function call, accessing to a freed replyid returns null value.

Autores y contribuidores

Daniel-Constantin Mierla <miconda@gmail.com>

Copyright © 2014 asipto.com

Módulos relacionados

auth_web3 auth_xkeys avp avpops benchmark blst call_control call_obj