Stephan Jaekel
f657432be3
always ignore empty Q objects, if the new Q is empty, the old one will be returned.
2010-05-14 14:35:27 +02:00
Stephan Jaekel
4972bdb383
ignore empty Q objects when combining Q objects.
2010-05-14 14:02:39 +02:00
Florian Schlachter
9df725165b
Added a possibility to define a base class for fields from a DictField (instead of using BaseField). This is important if you want to use field-based query abilities like StringField's startswith/endswith/contains. Just define `basecls´ when defining your DictField. Example:
...
class Test(Document):
name = StringField()
translations = DictField(basecls=StringField)
Without basecls defined:
> Test.objects(translations__german__startswith='Deutsch')
[]
With basecls set to StringField:
> Test.objects(translations__german__startswith='Deutsch')
[<Test: Test object>]
2010-05-14 13:35:45 +02:00
Harry Marr
edfda6ad5b
BinaryField returns str not unicode
2010-04-17 21:24:06 +01:00
Florian Schlachter
48facec524
Fixes tiny documentation error. Adds possibility to add custom validation methods to fields, e. g.:
...
class Customer(Document):
country = StringField(validation=lambda value: value in ['DE', 'AT', 'CH'])
Replaced some str() with unicode() for i18n reasons.
2010-04-16 16:59:34 +02:00
Florian Schlachter
0a074e52e0
Merge remote branch 'hmarr/master'
...
Conflicts:
mongoengine/fields.py
2010-04-15 23:10:34 +02:00
Timothée Peignier
a39685d98c
make get_or_create returns a tuple with the retrieved or created object and a boolean specifying whether a new object was created
2010-04-12 16:21:29 +01:00
Florian Schlachter
2304dac8e3
added GeoLocationField with auto index-creation for GEO2D
2010-03-30 00:04:39 +02:00
Deepak Thukral
fbcf58c48f
updated documentation
2010-03-29 11:25:17 +02:00
Deepak Thukral
8f4a579df9
DoesNotExist and MultipleObjectsReturned now contributes Document class
2010-03-28 22:22:36 +02:00
Matt Dennewitz
a4d2f22fd2
added 'geo_indexes' to TopLevelDocumentMetaclass; added GeoPointField, a glorified [lat float, lng float] container; added geo lookup operators to QuerySet; added initial geo tests
2010-03-23 00:14:01 -05:00
Harry Marr
00c8d7e6f5
Bump to v0.3
2010-03-17 16:50:13 +00:00
Harry Marr
5b42578cb1
Added ~ field name substitution to mapreduce funcs
2010-03-17 14:06:31 +00:00
Harry Marr
25a0a5364a
Deprecated 'name' arg for fields in favour of 'db_field'
2010-03-17 13:47:23 +00:00
Harry Marr
047cc218a6
Merge branch 'mapreduce' of git://github.com/blackbrrr/mongoengine
...
Conflicts:
mongoengine/queryset.py
2010-03-17 12:31:08 +00:00
Harry Marr
39fc862676
Merge branch 'upsert' of git://github.com/blackbrrr/mongoengine
2010-03-17 12:30:18 +00:00
blackbrrr
f156da4ec2
bumped version
2010-03-17 00:50:44 -05:00
blackbrrr
0b62c9d2f6
Merge branch 'master' of git://github.com/hmarr/mongoengine
2010-03-17 00:34:00 -05:00
blackbrrr
acda64a837
fixed field_js merge artifact
2010-03-09 15:31:28 -06:00
blackbrrr
49a001a93a
re-added missing QuerySet._ordering
2010-03-09 15:28:55 -06:00
blackbrrr
22a6ec7794
merged conflicts
2010-03-09 15:19:14 -06:00
blackbrrr
26c6e4997c
added 'upsert' arg to QuerySet.update and QuerySet.update_one
2010-03-08 21:59:54 -06:00
Harry Marr
ac3c857e1a
Added rewind to QuerySet, which is implicitly called when iteration finishes
2010-03-08 22:15:40 +00:00
Harry Marr
95a7b33fb4
Changed how GenericReferenceFields are stored / queried
2010-02-28 23:15:21 +00:00
Harry Marr
5e2c5fa97b
Merge branch 'regex-query-shortcuts'
2010-02-28 17:38:03 +00:00
Harry Marr
265776566e
QuerySet.only field name translation and polymorphism fix
2010-02-26 19:43:26 +00:00
Harry Marr
6e77e32855
Fixed Q object ObjectId comparison issue
2010-02-26 17:13:19 +00:00
Harry Marr
0b1c506626
Added Q object support for regexes (inc. operator shortcuts)
2010-02-26 16:46:07 +00:00
Harry Marr
66520c77f8
Added regex match operators with test
2010-02-26 13:43:45 +00:00
Harry Marr
ab2d019349
Added server-side js docs
2010-02-26 13:23:15 +00:00
Harry Marr
d0e0b291df
Implementation and tests for exec_js field substitution
2010-02-25 17:20:52 +00:00
Harry Marr
200e9eca92
Merge branch 'only_fields' of git://github.com/blackbrrr/mongoengine
2010-02-24 20:23:59 +00:00
Harry Marr
634f771547
QuerySet repr now uses limit and skip
2010-02-24 17:01:31 +00:00
Harry Marr
2996f8919d
Limits of size 0 now return no results
2010-02-24 16:07:26 +00:00
blackbrrr
1b68efe7c7
updated QuerySet.only docstring
2010-02-24 09:52:39 -06:00
blackbrrr
a19a7b976c
updated advanced map/reduce test to include scope; misc cleanup in queryset
2010-02-23 22:26:05 -06:00
Harry Marr
145b0c33fc
Support 1-arg queryset managers, but warn about deprecation
2010-02-23 18:27:14 +00:00
blackbrrr
8b1a39f2c1
added QuerySet.only
2010-02-23 00:24:28 -06:00
blackbrrr
3762a69537
added QuerySet.in_bulk, bulk querying with ObjectIds
2010-02-14 21:02:55 -06:00
blackbrrr
008a62e4e9
updated map/reduce documentation
2010-02-12 16:07:44 -06:00
blackbrrr
9be6c41af7
map/reduce result objects now only have 'key', 'value', and 'object' properties; MapReduceDocument.key_object now returns proper Document subclass; added finalize with Reddit ranking simulation; MapReduceDocuments now yielded;
2010-02-12 14:39:08 -06:00
blackbrrr
5c311eefb1
fixed merge conflict in queryset test
2010-02-12 09:59:09 -06:00
Harry Marr
ea1fe6a538
Fixed set/unset issue with ListFields
2010-02-12 11:21:51 +00:00
Harry Marr
b2588d1c4f
Changed neq to ne, fixed Q object in and nin
2010-02-10 12:35:41 +00:00
blackbrrr
69d3e0c4b6
added map/reduce support via QuerySet.map_reduce. map_reduce operations respect query specs and ordering, but ordering is currently only applied to map/reduce collection. map/reduce may eventually require its own QuerySet to avoid slicing conflicts. results are returned as lists of MapReduceDocument objects, dynamic objects representing the query. tests and documentation included. considered in the neighborhood of 'good start'.
2010-02-09 14:56:15 -06:00
Harry Marr
89f505bb13
Removed pool_size from connect, minor tidyup
2010-02-04 01:44:52 +00:00
Florian Schlachter
59f8c9f38e
make mongoengine more international :) using unicode-strings; str(err) raises errors if it contains non-ascii chars/umlauts
2010-02-02 21:48:47 +01:00
Harry Marr
e05d31eaaf
Added get{,_or_create} docs
2010-01-31 13:47:27 +00:00
Harry Marr
ffc9d7b152
Merge branch 'master' of git://github.com/flosch/mongoengine
...
Added unit test for get_or_create, merged flosch's get with
punteney's get.
Conflicts:
mongoengine/queryset.py
2010-01-31 13:24:50 +00:00
Harry Marr
79604180db
Merge branch 'master' of git://github.com/punteney/mongoengine
2010-01-31 13:11:20 +00:00