common.database.mongoAccess.mongo3
index
/var/lib/jenkins/workspace/resmon_monitor_doc/common/database/mongoAccess/mongo3.py

 
Modules
       
pymongo

 
Classes
       
builtins.object
DB

 
class DB(builtins.object)
    Class handling with MongoDB database
 
  Methods defined here:
__init__(self, user=None, pswd=None, host=None, port=None, base=None)
Initialize class DB with given options:
user - MongoDB user authorization (default: lucky_pomerange)
pswd - MongoDB password authorization (default: pass)
host - host on whith database exists
port - port number (default: 27017)
base - MongoDB database name (default: myDatabase)
__str__(self, collName)
Return String containing information about user, host, port, base,
collection, and database elements
find(self, filtr, collName)
Method finds elements in base
filtr - array-lik {'k':v}
insert(self, item, collName)
Insert element inside collection
item - array-like {'k1':v1,'k2':v2,...}
remove(self, filtr, collName)
Remove element defined by filtr {'k':v}
removeCollection(self, collName)
Delete all collection
remove_many(self, filtr, collName)
Remove all elements defined by filtr {'k':v}
select(self, collName)
Method return all collection elements
update(self, filtr, item, collName)
Update element in collection.
filtr is given as dict {"key":val}
item is array {"k1":v1, "k2":v2,...}

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)