Version bump to 0.1 beta

This commit is contained in:
Harry Marr 2010-01-02 21:34:48 +00:00
parent 62bda75112
commit b89982fd99
3 changed files with 10 additions and 10 deletions

View File

@ -1,4 +1,4 @@
Copyright (c) 2009 Harry Marr Copyright (c) 2009-2010 Harry Marr
Permission is hereby granted, free of charge, to any person Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation obtaining a copy of this software and associated documentation

View File

@ -293,9 +293,9 @@ Limiting and skipping results
----------------------------- -----------------------------
Just as with traditional ORMs, you may limit the number of results returned, or Just as with traditional ORMs, you may limit the number of results returned, or
skip a number or results in you query. skip a number or results in you query.
:meth:`mongoengine.queryset.QuerySet.limit` and :meth:`~mongoengine.queryset.QuerySet.limit` and
:meth:`mongoengine.queryset.QuerySet.skip` and methods are available on :meth:`~mongoengine.queryset.QuerySet.skip` and methods are available on
:class:`mongoengine.queryset.QuerySet` objects, but the prefered syntax for :class:`~mongoengine.queryset.QuerySet` objects, but the prefered syntax for
achieving this is using array-slicing syntax:: achieving this is using array-slicing syntax::
# Only the first 5 people # Only the first 5 people
@ -317,8 +317,8 @@ Javascript code that is executed on the database server.
Counting results Counting results
^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
Just as with limiting and skipping results, there is a method on Just as with limiting and skipping results, there is a method on
:class:`mongoengine.queryset.QuerySet` objects -- :class:`~mongoengine.queryset.QuerySet` objects --
:meth:`mongoengine.queryset.QuerySet.count`, but there is also a more Pythonic :meth:`~mongoengine.queryset.QuerySet.count`, but there is also a more Pythonic
way of achieving this:: way of achieving this::
num_users = len(User.objects) num_users = len(User.objects)
@ -326,7 +326,7 @@ way of achieving this::
Further aggregation Further aggregation
^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^
You may sum over the values of a specific field on documents using You may sum over the values of a specific field on documents using
:meth:`mongoengine.queryset.QuerySet.sum`:: :meth:`~mongoengine.queryset.QuerySet.sum`::
yearly_expense = Employee.objects.sum('salary') yearly_expense = Employee.objects.sum('salary')
@ -335,13 +335,13 @@ You may sum over the values of a specific field on documents using
the sum. the sum.
To get the average (mean) of a field on a collection of documents, use To get the average (mean) of a field on a collection of documents, use
:meth:`mongoengine.queryset.QuerySet.average`:: :meth:`~mongoengine.queryset.QuerySet.average`::
mean_age = User.objects.average('age') mean_age = User.objects.average('age')
As MongoDB provides native lists, MongoEngine provides a helper method to get a As MongoDB provides native lists, MongoEngine provides a helper method to get a
dictionary of the frequencies of items in lists across an entire collection -- dictionary of the frequencies of items in lists across an entire collection --
:meth:`mongoengine.queryset.QuerySet.item_frequencies`. An example of its use :meth:`~mongoengine.queryset.QuerySet.item_frequencies`. An example of its use
would be generating "tag-clouds":: would be generating "tag-clouds"::
class Article(Document): class Article(Document):

View File

@ -12,7 +12,7 @@ __all__ = (document.__all__ + fields.__all__ + connection.__all__ +
__author__ = 'Harry Marr' __author__ = 'Harry Marr'
VERSION = (0, 1, 0, 'alpha') VERSION = (0, 1, 0, 'beta')
def get_version(): def get_version():
version = '%s.%s' % (VERSION[0], VERSION[1]) version = '%s.%s' % (VERSION[0], VERSION[1])