9 Commits

Author SHA1 Message Date
Ross Lawley
a8d91a56bf Fixes circular list references
The depth deduciton for _fields was over zealous
now max_depth is honoured/

Fixes #373
2011-11-29 03:43:49 -08:00
Ross Lawley
e80144e9f2 Added multidb support
No change required to upgrade to multiple databases. Aliases are used
to describe the database and these can be manually registered or fall
through to a default alias using connect.

Made get_connection and get_db first class members of the connection class.
Old style _get_connection and _get_db still supported.

Refs: #84 #87 #93 #215
2011-11-22 08:01:14 -08:00
Ross Lawley
7b1860d17b Fixes tree based circular references
Thanks to jpfarias for the fix.
Also normalised the other circular checks.
2011-10-10 09:16:32 -07:00
Ross Lawley
823cf421fa Fixes to circular references.
Removes infinite looping
refs #294
2011-09-29 14:07:30 -07:00
Ross Lawley
87f486c4f1 Added select_related() and refactored dereferencing
Added a dereference class to handle both select_related
 / recursive dereferencing and fetching dereference.

Refs #206
2011-06-27 12:25:49 +01:00
Ross Lawley
0ed79a839d Added delta tracking to documents.
All saves on exisiting items do set / unset operations only on changed fields.
* Note lists and dicts generally do set operations for things like pop() del[key]
  As there is no easy map to unset and explicitly matches the new list / dict

fixes #18
2011-06-14 14:35:38 +01:00
Ross Lawley
4b9bacf731 Added ComplexBaseField
* Handles the efficient lazy dereferencing of DBrefs.
* Handles complex nested values in ListFields and DictFields
* Allows for both strictly declared ListFields and DictFields where the embedded
value must be of a field type or no restrictions where the values can be a mix
of field types / values.
* Handles DBrefences of documents where allow_inheritance = False.
2011-06-09 11:25:24 +01:00
Ross Lawley
ec7effa0ef Added DereferenceBaseField class
Handles the lazy dereferencing of all items in a list / dict.
Improves query efficiency by an order of magnitude.
2011-06-06 11:04:06 +01:00
Ross Lawley
5d778648e6 Inital tests for dereferencing improvements 2011-05-27 11:33:40 +01:00