web2py.gluon.dal.MongoDBAdapter

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=global_settings.applications_parent, db_codec=`'``UTF-8``'`, credential_decoder=<function <lambda> at 0xfc8140>, driver_args=`{``}`, adapter_args=`{``}`) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code
represent(self, obj, fieldtype) | source code
insert(self, table, fields, safe=global_settings.applications_parent) | source code
create_table(self, table, migrate=True, fake_migrate=True, polymodel=global_settings.applications_parent, isCapped=True) | source code
count(self, query, distinct=global_settings.applications_parent, snapshot=True) | source code
expand(self, expression, field_type=global_settings.applications_parent) | source code
_select(self, query, fields, attributes) | source code
select(self, query, fields, attributes, count=True, snapshot=True) Always returns a Rows object, possibly empty. | source code
INVERT(self, first) | source code
drop(self, table, mode=`'````'`) | source code
truncate(self, table, mode, safe=global_settings.applications_parent) | source code
oupdate(self, tablename, query, fields) | source code
update(self, tablename, query, fields, safe=global_settings.applications_parent) | source code
_update(self, tablename, query, fields) | source code
bulk_insert(self, table, items) | source code
NOT(self, first) | source code
AND(self, first, second) | source code
OR(self, first, second) | source code
BELONGS(self, first, second) | source code
LIKE(self, first, second) case sensitive like operator | source code
STARTSWITH(self, first, second) | source code
ENDSWITH(self, first, second) | source code
CONTAINS(self, first, second) | source code
EQ(self, first, second) | source code
NE(self, first, second=global_settings.applications_parent) | source code
LT(self, first, second=global_settings.applications_parent) | source code
LE(self, first, second=global_settings.applications_parent) | source code
GT(self, first, second) | source code
GE(self, first, second=global_settings.applications_parent) | source code
ADD(self, first, second) | source code
SUB(self, first, second) | source code
MUL(self, first, second) | source code
DIV(self, first, second) | source code
MOD(self, first, second) | source code
AS(self, first, second) | source code
ON(self, first, second) | source code
COMMA(self, first, second) | source code
Inherited from `NoSQLAdapter`: `AGGREGATE`, `EXTRACT`, `ILIKE`, `LEFT_JOIN`, `LOWER`, `PRIMARY_KEY`, `RANDOM`, `SUBSTRING`, `UPPER`, `alias`, `close`, `commit`, `commit_prepared`, `concat_add`, `constraint_name`, `create_sequence_and_triggers`, `distributed_transaction_begin`, `execute`, `integrity_error_class`, `lastrowid`, `log_execute`, `migrate_table`, `prepare`, `represent_exceptions`, `rollback`, `rollback_prepared`, `rowslice` Inherited from `NoSQLAdapter` (private): `_count`, `_delete`, `_insert` Inherited from `BaseAdapter`: `ALLOW_NULL`, `COALESCE`, `COALESCE_ZERO`, `JOIN`, `NOT_NULL`, `RAW`, `REGEXP`, `adapt`, `build_parsemap`, `common_filter`, `delete`, `expand_all`, `file_close`, `file_delete`, `file_exists`, `file_open`, `get_table`, `integrity_error`, `operational_error`, `parse`, `parse_blob`, `parse_boolean`, `parse_date`, `parse_datetime`, `parse_decimal`, `parse_double`, `parse_id`, `parse_integer`, `parse_list_integers`, `parse_list_references`, `parse_list_strings`, `parse_reference`, `parse_time`, `parse_value`, `select_limitby`, `sequence_name`, `tables`, `trigger_name` 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 `NoSQLAdapter`: `can_select_for_update` Inherited from `BaseAdapter`: `commit_on_alter_table`, `driver`, `maxcharlength`, `support_distributed_transaction` Inherited from `ConnectionPool`: `check_active_connection`, `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=global_settings.applications_parent, db_codec=`'``UTF-8``'`, credential_decoder=<function <lambda> at 0xfc8140>, driver_args=`{``}`, adapter_args=`{``}`) (Constructor) | source code
x.__init__(...) initializes x; see x.__class__.__doc__ for signature Overrides: BaseAdapter.__init__

### represent(self, obj, fieldtype) | source code
Overrides: NoSQLAdapter.represent

### insert(self, table, fields, safe=global_settings.applications_parent) | source code
Overrides: BaseAdapter.insert

### create_table(self, table, migrate=True, fake_migrate=True, polymodel=global_settings.applications_parent, isCapped=True) | source code
Overrides: BaseAdapter.create_table

### count(self, query, distinct=global_settings.applications_parent, snapshot=True) | source code
Overrides: BaseAdapter.count

### expand(self, expression, field_type=global_settings.applications_parent) | source code
Overrides: BaseAdapter.expand

### _select(self, query, fields, attributes) | source code
Overrides: NoSQLAdapter._select

### select(self, query, fields, attributes, count=True, snapshot=True) | source code
Always returns a Rows object, possibly empty. Overrides: BaseAdapter.select (inherited documentation)

### INVERT(self, first) | source code
Overrides: BaseAdapter.INVERT

### drop(self, table, mode=`'````'`) | source code
Overrides: NoSQLAdapter.drop

### truncate(self, table, mode, safe=global_settings.applications_parent) | source code
Overrides: BaseAdapter.truncate

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

### _update(self, tablename, query, fields) | source code
Overrides: NoSQLAdapter._update

### bulk_insert(self, table, items) | source code
Overrides: BaseAdapter.bulk_insert

### NOT(self, first) | source code
Overrides: BaseAdapter.NOT

### AND(self, first, second) | source code
Overrides: NoSQLAdapter.AND

### OR(self, first, second) | source code
Overrides: NoSQLAdapter.OR

### BELONGS(self, first, second) | source code
Overrides: BaseAdapter.BELONGS

### LIKE(self, first, second) | source code
case sensitive like operator Overrides: BaseAdapter.LIKE (inherited documentation)

### STARTSWITH(self, first, second) | source code
Overrides: NoSQLAdapter.STARTSWITH

### ENDSWITH(self, first, second) | source code
Overrides: NoSQLAdapter.ENDSWITH

### CONTAINS(self, first, second) | source code
Overrides: BaseAdapter.CONTAINS

### EQ(self, first, second) | source code
Overrides: BaseAdapter.EQ

### NE(self, first, second=global_settings.applications_parent) | source code
Overrides: BaseAdapter.NE

### LT(self, first, second=global_settings.applications_parent) | source code
Overrides: BaseAdapter.LT

### LE(self, first, second=global_settings.applications_parent) | source code
Overrides: BaseAdapter.LE

### GT(self, first, second) | source code
Overrides: BaseAdapter.GT

### GE(self, first, second=global_settings.applications_parent) | source code
Overrides: BaseAdapter.GE

### ADD(self, first, second) | source code
Overrides: NoSQLAdapter.ADD

### SUB(self, first, second) | source code
Overrides: NoSQLAdapter.SUB

### MUL(self, first, second) | source code
Overrides: NoSQLAdapter.MUL

### DIV(self, first, second) | source code
Overrides: NoSQLAdapter.DIV

### MOD(self, first, second) | source code
Overrides: BaseAdapter.MOD

### AS(self, first, second) | source code
Overrides: NoSQLAdapter.AS

### ON(self, first, second) | source code
Overrides: NoSQLAdapter.ON

### COMMA(self, first, second) | source code
Overrides: BaseAdapter.COMMA

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'>,
      ...