Package web2py :: Package gluon :: Module dal :: Class MongoDBAdapter |
[hide private]
[frames] | no frames]

# Class MongoDBAdapter

source code

        object --+
                 |
    ConnectionPool --+
                     |
           BaseAdapter --+
                         |
              NoSQLAdapter --+
                             |
                            MongoDBAdapter

Instance Methods | [hide private]
__init__(self, db, uri=`'``mongodb://127.0.0.1:5984/db``'`, pool_size=0, folder=1, db_codec=`'``UTF-8``'`, credential_decoder=<function <lambda> at 0xd739b0>, driver_args=`{``}`, adapter_args=`{``}`) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code
insert(self, table, fields) | source code
count(self, query) | source code
select(self, query, fields, attributes) Always returns a Rows object, even if it may be empty | source code
delete(self, tablename, query) | source code
update(self, tablename, query, fields) | source code
Inherited from `NoSQLAdapter`: `ADD`, `AGGREGATE`, `AND`, `AS`, `DIV`, `ENDSWITH`, `EXTRACT`, `LEFT_JOIN`, `LIKE`, `LOWER`, `MUL`, `ON`, `OR`, `PRIMARY_KEY`, `RANDOM`, `STARTSWITH`, `SUB`, `SUBSTRING`, `UPPER`, `alias`, `close`, `commit`, `commit_prepared`, `concat_add`, `constraint_name`, `create_sequence_and_triggers`, `distributed_transaction_begin`, `drop`, `execute`, `integrity_error_class`, `lastrowid`, `log_execute`, `migrate_table`, `prepare`, `represent`, `represent_exceptions`, `rollback`, `rollback_prepared`, `rowslice` Inherited from `NoSQLAdapter` (private): `_count`, `_delete`, `_insert`, `_select`, `_update` Inherited from `BaseAdapter`: `ALLOW_NULL`, `BELONGS`, `COALESCE_ZERO`, `COMMA`, `CONTAINS`, `EQ`, `GE`, `GT`, `INVERT`, `JOIN`, `LE`, `LT`, `MOD`, `NE`, `NOT`, `NOT_NULL`, `bulk_insert`, `create_table`, `expand`, `file_close`, `file_delete`, `file_exists`, `file_open`, `filter_tenant`, `get_table`, `integrity_error`, `parse`, `select_limitby`, `sequence_name`, `tables`, `trigger_name`, `truncate` Inherited from `BaseAdapter` (private): `_drop`, `_truncate` Inherited from `ConnectionPool`: `find_or_make_work_folder`, `pool_connection` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Static Methods | [hide private]
Inherited from `NoSQLAdapter`: `to_unicode` Inherited from `ConnectionPool`: `close_all_instances`, `set_folder`

Class Variables | [hide private]
| uploads_in_blob = `True`
| types = ``{``'``blob``'``:` <type 'str'>`,` `'``boolean``'``:` <type 'bool'>`,` `'``date``...``
Inherited from `BaseAdapter`: `commit_on_alter_table`, `driver`, `maxcharlength`, `support_distributed_transaction` Inherited from `ConnectionPool`: `pools`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, db, uri=`'``mongodb://127.0.0.1:5984/db``'`, pool_size=0, folder=1, db_codec=`'``UTF-8``'`, credential_decoder=<function <lambda> at 0xd739b0>, driver_args=`{``}`, adapter_args=`{``}`) (Constructor) | source code
x.__init__(...) initializes x; see x.__class__.__doc__ for signature Overrides: BaseAdapter.__init__

### insert(self, table, fields) | source code
Overrides: BaseAdapter.insert

### count(self, query) | source code
Overrides: BaseAdapter.count

### select(self, query, fields, attributes) | source code
Always returns a Rows object, even if it may be empty Overrides: BaseAdapter.select (inherited documentation)

### delete(self, tablename, query) | source code
Overrides: BaseAdapter.delete

### update(self, tablename, query, fields) | source code
Overrides: BaseAdapter.update

Class Variable Details | [hide private]

  ### types Value:
      {'blob': <type 'str'>,
       'boolean': <type 'bool'>,
       'date': <type 'datetime.date'>,
       'datetime': <type 'datetime.datetime'>,
       'double': <type 'float'>,
       'id': <type 'long'>,
       'integer': <type 'long'>,
       'list:integer': <type 'list'>,
      ...