pymongo::database::SystemJS Class Reference

List of all members.

Public Member Functions

def __delattr__
def __getattr__
def __init__
def __setattr__
def list

Detailed Description

Helper class for dealing with stored JavaScript.

Definition at line 581 of file database.py.


Member Function Documentation

def pymongo::database::SystemJS::__delattr__ (   self,
  name 
)

Definition at line 616 of file database.py.

def pymongo::database::SystemJS::__getattr__ (   self,
  name 
)

Definition at line 619 of file database.py.

def pymongo::database::SystemJS::__init__ (   self,
  database 
)
Get a system js helper for the database `database`.

An instance of :class:`SystemJS` is automatically created for
each :class:`Database` instance as :attr:`Database.system_js`,
manual instantiation of this class should not be necessary.

:class:`SystemJS` instances allow for easy manipulation and
access to server-side JavaScript:

.. doctest::

  >>> db.system_js.add1 = "function (x) { return x + 1; }"
  >>> db.system.js.find({"_id": "add1"}).count()
  1
  >>> db.system_js.add1(5)
  6.0
  >>> del db.system_js.add1
  >>> db.system.js.find({"_id": "add1"}).count()
  0

.. note:: Requires server version **>= 1.1.1**

.. versionadded:: 1.5

Definition at line 585 of file database.py.

def pymongo::database::SystemJS::__setattr__ (   self,
  name,
  code 
)

Definition at line 613 of file database.py.

def pymongo::database::SystemJS::list (   self  ) 
Get a list of the names of the functions stored in this database.

.. versionadded:: 1.9

Definition at line 623 of file database.py.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines


pymongo
Author(s): Bhaskara Marthi
autogenerated on Fri Jan 11 10:09:06 2013