Permalink
Browse files

Updated documentation to stop errors/warning in generation

  • Loading branch information...
1 parent 9a6dce6 commit 0c33c69fb878d0ef912553210daef3a064bcc3e2 @jeffjenkins committed Dec 11, 2010
Showing with 604 additions and 439 deletions.
  1. +23 −0 docs/api/exceptions.txt
  2. +1 −0 docs/api/index.txt
  3. +0 −7 docs/api/schema/document.txt
  4. +0 −14 docs/api/schema/fields.txt
  5. +1 −1 docs/build/html/.buildinfo
  6. +23 −0 docs/build/html/_sources/api/exceptions.txt
  7. +1 −0 docs/build/html/_sources/api/index.txt
  8. +0 −7 docs/build/html/_sources/api/schema/document.txt
  9. +1 −15 docs/build/html/_sources/api/schema/fields.txt
  10. +2 −0 docs/build/html/_sources/examples/index.txt
  11. +3 −6 docs/build/html/_sources/index.txt
  12. +8 −14 docs/build/html/_sources/tutorial.txt
  13. +172 −0 docs/build/html/api/exceptions.html
  14. +5 −5 docs/build/html/api/expressions/index.html
  15. +55 −44 docs/build/html/api/expressions/query.html
  16. +18 −29 docs/build/html/api/expressions/query_expressions.html
  17. +21 −10 docs/build/html/api/expressions/update_expressions.html
  18. +10 −7 docs/build/html/api/index.html
  19. +11 −48 docs/build/html/api/schema/document.html
  20. +61 −51 docs/build/html/api/schema/fields.html
  21. +5 −7 docs/build/html/api/schema/index.html
  22. +18 −5 docs/build/html/api/session.html
  23. +17 −5 docs/build/html/examples/index.html
  24. +25 −20 docs/build/html/genindex.html
  25. +11 −11 docs/build/html/index.html
  26. BIN docs/build/html/objects.inv
  27. +5 −5 docs/build/html/py-modindex.html
  28. +5 −5 docs/build/html/search.html
  29. +1 −1 docs/build/html/searchindex.js
  30. +14 −19 docs/build/html/tutorial.html
  31. +2 −2 docs/conf.py
  32. +2 −0 docs/examples/index.txt
  33. +2 −5 docs/index.txt
  34. +8 −14 docs/tutorial.txt
  35. +3 −3 examples/examples.py
  36. +7 −8 examples/tutorial.py
  37. +0 −5 mongoalchemy/document.py
  38. +8 −1 mongoalchemy/exceptions.py
  39. +11 −15 mongoalchemy/fields.py
  40. +34 −25 mongoalchemy/query.py
  41. +10 −25 mongoalchemy/query_expression.py
View
23 docs/api/exceptions.txt
@@ -0,0 +1,23 @@
+Exceptions
+========================================================
+
+Field Exceptions
+--------------------------------
+
+.. autoclass:: mongoalchemy.exceptions.BadValueException
+ :members:
+ :undoc-members:
+
+.. autoclass:: mongoalchemy.exceptions.BadFieldSpecification
+ :members:
+ :undoc-members:
+
+
+Document Exceptions
+------------------------------------
+
+.. autoexception:: mongoalchemy.document.DocumentException
+.. autoexception:: mongoalchemy.document.MissingValueException
+.. autoexception:: mongoalchemy.document.ExtraValueException
+.. autoexception:: mongoalchemy.document.FieldNotRetrieved
+
View
1 docs/api/index.txt
@@ -10,6 +10,7 @@ Contents:
session
schema/index
expressions/index
+ exceptions
.. automodule:: mongoalchemy
:members:
View
7 docs/api/schema/document.txt
@@ -17,10 +17,3 @@
:members:
:undoc-members:
-Exceptions
-----------------------------------------------------------
-.. autoexception:: mongoalchemy.document.DocumentException
-.. autoexception:: mongoalchemy.document.MissingValueException
-.. autoexception:: mongoalchemy.document.ExtraValueException
-.. autoexception:: mongoalchemy.document.FieldNotRetrieved
-
View
14 docs/api/schema/fields.txt
@@ -96,17 +96,3 @@ Computed Field Objects
:undoc-members:
.. autofunction:: mongoalchemy.fields.computed_field
- :members:
- :undoc-members:
-
-Exceptions
-------------------------------------------------------------
-
-.. autoclass:: mongoalchemy.fields.BadValueException
- :members:
- :undoc-members:
-
-.. autoclass:: mongoalchemy.fields.BadFieldSpecification
- :members:
- :undoc-members:
-
View
2 docs/build/html/.buildinfo
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
-config: 7976cd9fdcf5cccd17bcdcf6b19903d8
+config: 03b0d7f77a8c4beb6dbc7e56f80fee5f
tags: fbb0d17656682115ca4d033fb2f83ba1
View
23 docs/build/html/_sources/api/exceptions.txt
@@ -0,0 +1,23 @@
+Exceptions
+========================================================
+
+Field Exceptions
+--------------------------------
+
+.. autoclass:: mongoalchemy.exceptions.BadValueException
+ :members:
+ :undoc-members:
+
+.. autoclass:: mongoalchemy.exceptions.BadFieldSpecification
+ :members:
+ :undoc-members:
+
+
+Document Exceptions
+------------------------------------
+
+.. autoexception:: mongoalchemy.document.DocumentException
+.. autoexception:: mongoalchemy.document.MissingValueException
+.. autoexception:: mongoalchemy.document.ExtraValueException
+.. autoexception:: mongoalchemy.document.FieldNotRetrieved
+
View
1 docs/build/html/_sources/api/index.txt
@@ -10,6 +10,7 @@ Contents:
session
schema/index
expressions/index
+ exceptions
.. automodule:: mongoalchemy
:members:
View
7 docs/build/html/_sources/api/schema/document.txt
@@ -17,10 +17,3 @@
:members:
:undoc-members:
-Exceptions
-----------------------------------------------------------
-.. autoexception:: mongoalchemy.document.DocumentException
-.. autoexception:: mongoalchemy.document.MissingValueException
-.. autoexception:: mongoalchemy.document.ExtraValueException
-.. autoexception:: mongoalchemy.document.FieldNotRetrieved
-
View
16 docs/build/html/_sources/api/schema/fields.txt
@@ -95,18 +95,4 @@ Computed Field Objects
:members:
:undoc-members:
-.. autoclass:: mongoalchemy.fields.ComputedFieldValue
- :members:
- :undoc-members:
-
-Exceptions
-------------------------------------------------------------
-
-.. autoclass:: mongoalchemy.fields.BadValueException
- :members:
- :undoc-members:
-
-.. autoclass:: mongoalchemy.fields.BadFieldSpecification
- :members:
- :undoc-members:
-
+.. autofunction:: mongoalchemy.fields.computed_field
View
2 docs/build/html/_sources/examples/index.txt
@@ -2,3 +2,5 @@
Examples
=================================
+No examples yet. There are however code snippets throughout the documentation
+and a few files here: https://github.com/jeffjenkins/MongoAlchemy/tree/master/examples
View
9 docs/build/html/_sources/index.txt
@@ -14,6 +14,7 @@ Contents:
tutorial
api/index
+ examples/index
Introduction
-----------------------------
@@ -65,7 +66,7 @@ Examples
... bio = StringField(max_length=1000, required=False)
...
... # A computed field decorator allows values
- ... @ComputedField(SetField(StringField()), deps=[bio])
+ ... @computed_field(SetField(StringField()), deps=[bio])
... def keywords(obj):
... return set(obj.get('bio','').split(' '))
...
@@ -93,12 +94,8 @@ Examples
... # into the database
... session.insert(me)
>>>
- >>> # this is a QueryField object which can be used to construct queries,
- ... # as below. It can be used directly, but this is shorter
- ... f = User.f
- >>>
>>> # Get a user with me's email address and MongoAlchemy in their bio (via keywords)
- ... db_user = session.query(User).filter(f.email == 'jeff@qcircles.net').in_(f.keywords, 'MongoAlchemy').one()
+ ... db_user = session.query(User).filter(User.email == 'jeff@qcircles.net').in_(User.keywords, 'MongoAlchemy').one()
>>>
>>> db_user == me
True
View
22 docs/build/html/_sources/tutorial.txt
@@ -89,7 +89,7 @@ add some of the cast of `Community`:
Querying
------------------------------
- >>> for donor in session.query(BloodDonor).filter(BloodDonor.f.first_name == 'Jeff'):
+ >>> for donor in session.query(BloodDonor).filter(BloodDonor.first_name == 'Jeff'):
>>> print donor
Jeff Jenkins (male; Age: 28; Type: O+)
Jeff Winger (male; Age: 38; Type: O+)
@@ -98,31 +98,25 @@ The above code uses the :func:`~mongoalchemy.session.Session.query` method of
the ``session`` object to start a query on the BloodDonor collection. The
filter function on a query object allows constraints to be added to the
results returned. In this case all donors who have the name Jeff are being
-printed. The :attr:`~mongoalchemy.document.Document.f` attribute of a
-Document subclass is used to access the names of fields in such a way that
-they generate query expressions which ``filter`` can use. ``f`` is only
-needed for the outermost document type, so if the name were actually a
-sub-document it might look like ``BloodDonor.f.name.first``.
+printed. The attributes of a Document subclass are used to access the names
+of fields in such a way that they generate query expressions which ``filter``
+can use.
Multiple filters can be applied by chaining calls to filter or by adding
comma-separated query expressions inside a single call. The following two
examples return the same results:
- >>> bdf = BloodDonor.f
>>> query = session.query(BloodDonor)
- >>> for donor in query.filter(bdf.first_name == 'Jeff', bdf.age < 30):
+ >>> for donor in query.filter(BloodDonor.first_name == 'Jeff', BloodDonor.age < 30):
>>> print donor
Jeff Jenkins (male; Age: 28; Type: O+)
>>> query = session.query(BloodDonor)
- >>> for donor in query.filter(bdf.first_name == 'Jeff').filter(bdf.age < 30):
+ >>> for donor in query.filter(BloodDonor.first_name == 'Jeff').filter(BloodDonor.age < 30):
>>> print donor
Jeff Jenkins (male; Age: 28; Type: O+)
-The first thing to notice is that the ``f`` field of a document can be assigned to
-a shorter name for convenience.
-
Instead of getting elements by iterating on the query, the :func:`~mongoalchemy.query.Query.one`
and :func:`~mongoalchemy.query.Query.first` methods can be used. ``one`` returns the first
result and raises an exception if there is not exactly one returned result. ``first`` returns
@@ -138,8 +132,8 @@ rather than updating results by loading an object and re-inserting it).
Here's an example where my age changed and it turned out I had the wrong
blood type:
->>> query = session.query(BloodDonor).filter(bdf.first_name == 'Jeff', bdf.last_name == 'Jenkins')
->>> query.inc(bdf.age, 1).set(bdf.blood_type, 'O-').execute()
+>>> query = session.query(BloodDonor).filter(BloodDonor.first_name == 'Jeff', BloodDonor.last_name == 'Jenkins')
+>>> query.inc(BloodDonor.age, 1).set(BloodDonor.blood_type, 'O-').execute()
>>> query.one()
Jeff Jenkins (male; Age: 29; Type: O-)
View
172 docs/build/html/api/exceptions.html
@@ -0,0 +1,172 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Exceptions &mdash; MongoAlchemy v0.6 documentation</title>
+ <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '../',
+ VERSION: '0.6',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="../_static/jquery.js"></script>
+ <script type="text/javascript" src="../_static/underscore.js"></script>
+ <script type="text/javascript" src="../_static/doctools.js"></script>
+ <link rel="top" title="MongoAlchemy v0.6 documentation" href="../index.html" />
+ <link rel="up" title="API documentation" href="index.html" />
+ <link rel="next" title="Examples" href="../examples/index.html" />
+ <link rel="prev" title="Update Expressions" href="expressions/update_expressions.html" />
+ </head>
+ <body>
+ <div class="related">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ accesskey="I">index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="../examples/index.html" title="Examples"
+ accesskey="N">next</a> |</li>
+ <li class="right" >
+ <a href="expressions/update_expressions.html" title="Update Expressions"
+ accesskey="P">previous</a> |</li>
+ <li><a href="../index.html">MongoAlchemy v0.6 documentation</a> &raquo;</li>
+ <li><a href="index.html" accesskey="U">API documentation</a> &raquo;</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body">
+
+ <div class="section" id="exceptions">
+<h1>Exceptions<a class="headerlink" href="#exceptions" title="Permalink to this headline">¶</a></h1>
+<div class="section" id="field-exceptions">
+<h2>Field Exceptions<a class="headerlink" href="#field-exceptions" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="mongoalchemy.exceptions.BadValueException">
+<em class="property">class </em><tt class="descclassname">mongoalchemy.exceptions.</tt><tt class="descname">BadValueException</tt><big>(</big><em>name</em>, <em>value</em>, <em>reason</em>, <em>cause=None</em><big>)</big><a class="headerlink" href="#mongoalchemy.exceptions.BadValueException" title="Permalink to this definition">¶</a></dt>
+<dd><p>An exception which is raised when there is something wrong with a
+value</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="mongoalchemy.exceptions.BadFieldSpecification">
+<em class="property">class </em><tt class="descclassname">mongoalchemy.exceptions.</tt><tt class="descname">BadFieldSpecification</tt><a class="headerlink" href="#mongoalchemy.exceptions.BadFieldSpecification" title="Permalink to this definition">¶</a></dt>
+<dd><p>An exception that is raised when there is an error in creating a
+field</p>
+</dd></dl>
+
+</div>
+<div class="section" id="document-exceptions">
+<h2>Document Exceptions<a class="headerlink" href="#document-exceptions" title="Permalink to this headline">¶</a></h2>
+<dl class="exception">
+<dt id="mongoalchemy.document.DocumentException">
+<em class="property">exception </em><tt class="descclassname">mongoalchemy.document.</tt><tt class="descname">DocumentException</tt><a class="headerlink" href="#mongoalchemy.document.DocumentException" title="Permalink to this definition">¶</a></dt>
+<dd><p>Base for all document-related exceptions</p>
+</dd></dl>
+
+<dl class="exception">
+<dt id="mongoalchemy.document.MissingValueException">
+<em class="property">exception </em><tt class="descclassname">mongoalchemy.document.</tt><tt class="descname">MissingValueException</tt><a class="headerlink" href="#mongoalchemy.document.MissingValueException" title="Permalink to this definition">¶</a></dt>
+<dd><p>Raised when a required field isn&#8217;t set</p>
+</dd></dl>
+
+<dl class="exception">
+<dt id="mongoalchemy.document.ExtraValueException">
+<em class="property">exception </em><tt class="descclassname">mongoalchemy.document.</tt><tt class="descname">ExtraValueException</tt><a class="headerlink" href="#mongoalchemy.document.ExtraValueException" title="Permalink to this definition">¶</a></dt>
+<dd><p>Raised when a value is passed in with no corresponding field</p>
+</dd></dl>
+
+<dl class="exception">
+<dt id="mongoalchemy.document.FieldNotRetrieved">
+<em class="property">exception </em><tt class="descclassname">mongoalchemy.document.</tt><tt class="descname">FieldNotRetrieved</tt><a class="headerlink" href="#mongoalchemy.document.FieldNotRetrieved" title="Permalink to this definition">¶</a></dt>
+<dd><p>If a partial document is loaded from the database and a field which
+wasn&#8217;t retrieved is accessed this exception is raised</p>
+</dd></dl>
+
+</div>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar">
+ <div class="sphinxsidebarwrapper">
+ <h3><a href="../index.html">Table Of Contents</a></h3>
+ <ul>
+<li><a class="reference internal" href="#">Exceptions</a><ul>
+<li><a class="reference internal" href="#field-exceptions">Field Exceptions</a></li>
+<li><a class="reference internal" href="#document-exceptions">Document Exceptions</a></li>
+</ul>
+</li>
+</ul>
+
+ <h4>Previous topic</h4>
+ <p class="topless"><a href="expressions/update_expressions.html"
+ title="previous chapter">Update Expressions</a></p>
+ <h4>Next topic</h4>
+ <p class="topless"><a href="../examples/index.html"
+ title="next chapter">Examples</a></p>
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="../_sources/api/exceptions.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+<div id="searchbox" style="display: none">
+ <h3>Quick search</h3>
+ <form class="search" action="../search.html" method="get">
+ <input type="text" name="q" size="18" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="../genindex.html" title="General Index"
+ >index</a></li>
+ <li class="right" >
+ <a href="../py-modindex.html" title="Python Module Index"
+ >modules</a> |</li>
+ <li class="right" >
+ <a href="../examples/index.html" title="Examples"
+ >next</a> |</li>
+ <li class="right" >
+ <a href="expressions/update_expressions.html" title="Update Expressions"
+ >previous</a> |</li>
+ <li><a href="../index.html">MongoAlchemy v0.6 documentation</a> &raquo;</li>
+ <li><a href="index.html" >API documentation</a> &raquo;</li>
+ </ul>
+ </div>
+ <div class="footer">
+ &copy; Copyright 2010, Jeffrey Jenkins.
+ Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.3.
+ </div>
+ </body>
+</html>
View
10 docs/build/html/api/expressions/index.html
@@ -7,13 +7,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Expression Language — Querying and Updating &mdash; MongoAlchemy v0.5 documentation</title>
+ <title>Expression Language — Querying and Updating &mdash; MongoAlchemy v0.6 documentation</title>
<link rel="stylesheet" href="../../_static/default.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../',
- VERSION: '0.5',
+ VERSION: '0.6',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@@ -22,7 +22,7 @@
<script type="text/javascript" src="../../_static/jquery.js"></script>
<script type="text/javascript" src="../../_static/underscore.js"></script>
<script type="text/javascript" src="../../_static/doctools.js"></script>
- <link rel="top" title="MongoAlchemy v0.5 documentation" href="../../index.html" />
+ <link rel="top" title="MongoAlchemy v0.6 documentation" href="../../index.html" />
<link rel="up" title="API documentation" href="../index.html" />
<link rel="next" title="Query Objects" href="query.html" />
<link rel="prev" title="fields" href="../schema/fields.html" />
@@ -43,7 +43,7 @@
<li class="right" >
<a href="../schema/fields.html" title="fields"
accesskey="P">previous</a> |</li>
- <li><a href="../../index.html">MongoAlchemy v0.5 documentation</a> &raquo;</li>
+ <li><a href="../../index.html">MongoAlchemy v0.6 documentation</a> &raquo;</li>
<li><a href="../index.html" accesskey="U">API documentation</a> &raquo;</li>
</ul>
</div>
@@ -118,7 +118,7 @@
<li class="right" >
<a href="../schema/fields.html" title="fields"
>previous</a> |</li>
- <li><a href="../../index.html">MongoAlchemy v0.5 documentation</a> &raquo;</li>
+ <li><a href="../../index.html">MongoAlchemy v0.6 documentation</a> &raquo;</li>
<li><a href="../index.html" >API documentation</a> &raquo;</li>
</ul>
</div>
View
99 docs/build/html/api/expressions/query.html
@@ -7,13 +7,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Query Objects &mdash; MongoAlchemy v0.5 documentation</title>
+ <title>Query Objects &mdash; MongoAlchemy v0.6 documentation</title>
<link rel="stylesheet" href="../../_static/default.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../',
- VERSION: '0.5',
+ VERSION: '0.6',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@@ -22,7 +22,7 @@
<script type="text/javascript" src="../../_static/jquery.js"></script>
<script type="text/javascript" src="../../_static/underscore.js"></script>
<script type="text/javascript" src="../../_static/doctools.js"></script>
- <link rel="top" title="MongoAlchemy v0.5 documentation" href="../../index.html" />
+ <link rel="top" title="MongoAlchemy v0.6 documentation" href="../../index.html" />
<link rel="up" title="Expression Language — Querying and Updating" href="index.html" />
<link rel="next" title="Mongo Query Expression Language" href="query_expressions.html" />
<link rel="prev" title="Expression Language — Querying and Updating" href="index.html" />
@@ -43,7 +43,7 @@
<li class="right" >
<a href="index.html" title="Expression Language — Querying and Updating"
accesskey="P">previous</a> |</li>
- <li><a href="../../index.html">MongoAlchemy v0.5 documentation</a> &raquo;</li>
+ <li><a href="../../index.html">MongoAlchemy v0.6 documentation</a> &raquo;</li>
<li><a href="../index.html" >API documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Expression Language — Querying and Updating</a> &raquo;</li>
</ul>
@@ -64,9 +64,14 @@
query or do an update based on it.</p>
<p>In general a query object should be created via <tt class="docutils literal"><span class="pre">Session.query</span></tt>,
not directly.</p>
-<p><strong>Parameters</strong>:
-* type: A subclass of class:<cite>mongoalchemy.document.Document</cite>
-* db: The <a class="reference internal" href="../session.html#mongoalchemy.session.Session" title="mongoalchemy.session.Session"><tt class="xref py py-class docutils literal"><span class="pre">Session</span></tt></a> which this query is associated with.</p>
+<dl class="docutils">
+<dt><strong>Parameters</strong>:</dt>
+<dd><ul class="first last simple">
+<li>type: A subclass of class:<cite>mongoalchemy.document.Document</cite></li>
+<li>db: The <a class="reference internal" href="../session.html#mongoalchemy.session.Session" title="mongoalchemy.session.Session"><tt class="xref py py-class docutils literal"><span class="pre">Session</span></tt></a> which this query is associated with.</li>
+</ul>
+</dd>
+</dl>
<dl class="method">
<dt id="mongoalchemy.query.Query.get_fields">
<tt class="descname">get_fields</tt><big>(</big><big>)</big><a class="headerlink" href="#mongoalchemy.query.Query.get_fields" title="Permalink to this definition">¶</a></dt>
@@ -85,25 +90,27 @@
<dl class="method">
<dt id="mongoalchemy.query.Query.limit">
<tt class="descname">limit</tt><big>(</big><em>limit</em><big>)</big><a class="headerlink" href="#mongoalchemy.query.Query.limit" title="Permalink to this definition">¶</a></dt>
-<dd><p>Sets the limit on the number of documents returned
-<strong>Parameters</strong>:</p>
-<blockquote>
-<ul class="simple">
+<dd><p>Sets the limit on the number of documents returned</p>
+<dl class="docutils">
+<dt><strong>Parameters</strong>:</dt>
+<dd><ul class="first last simple">
<li>limit: the number of documents to return</li>
</ul>
-</blockquote>
+</dd>
+</dl>
</dd></dl>
<dl class="method">
<dt id="mongoalchemy.query.Query.skip">
<tt class="descname">skip</tt><big>(</big><em>skip</em><big>)</big><a class="headerlink" href="#mongoalchemy.query.Query.skip" title="Permalink to this definition">¶</a></dt>
-<dd><p>Sets the number of documents to skip in the result
-<strong>Parameters</strong>:</p>
-<blockquote>
-<ul class="simple">
+<dd><p>Sets the number of documents to skip in the result</p>
+<dl class="docutils">
+<dt><strong>Parameters</strong>:</dt>
+<dd><ul class="first last simple">
<li>skip: the number of documents to skip</li>
</ul>
-</blockquote>
+</dd>
+</dl>
</dd></dl>
<dl class="method">
@@ -133,26 +140,28 @@
<dt id="mongoalchemy.query.Query.hint_asc">
<tt class="descname">hint_asc</tt><big>(</big><em>qfield</em><big>)</big><a class="headerlink" href="#mongoalchemy.query.Query.hint_asc" title="Permalink to this definition">¶</a></dt>
<dd><p>Applies a hint for the query that it should use a
-(<tt class="docutils literal"><span class="pre">qfield</span></tt>, ASCENDING) index when performing the query.
-<strong>Parameters</strong>:</p>
-<blockquote>
-<ul class="simple">
+(<tt class="docutils literal"><span class="pre">qfield</span></tt>, ASCENDING) index when performing the query.</p>
+<dl class="docutils">
+<dt><strong>Parameters</strong>:</dt>
+<dd><ul class="first last simple">
<li>qfield: the instance of <tt class="xref py py-class docutils literal"><span class="pre">mongoalchemy.QueryField</span></tt> to use as the key.</li>
</ul>
-</blockquote>
+</dd>
+</dl>
</dd></dl>
<dl class="method">
<dt id="mongoalchemy.query.Query.hint_desc">
<tt class="descname">hint_desc</tt><big>(</big><em>qfield</em><big>)</big><a class="headerlink" href="#mongoalchemy.query.Query.hint_desc" title="Permalink to this definition">¶</a></dt>
<dd><p>Applies a hint for the query that it should use a
-(<tt class="docutils literal"><span class="pre">qfield</span></tt>, DESCENDING) index when performing the query.
-<strong>Parameters</strong>:</p>
-<blockquote>
-<ul class="simple">
+(<tt class="docutils literal"><span class="pre">qfield</span></tt>, DESCENDING) index when performing the query.</p>
+<dl class="docutils">
+<dt><strong>Parameters</strong>:</dt>
+<dd><ul class="first last simple">
<li>qfield: the instance of <tt class="xref py py-class docutils literal"><span class="pre">mongoalchemy.QueryField</span></tt> to use as the key.</li>
</ul>
-</blockquote>
+</dd>
+</dl>
</dd></dl>
<dl class="method">
@@ -171,9 +180,9 @@
<dl class="method">
<dt id="mongoalchemy.query.Query.distinct">
<tt class="descname">distinct</tt><big>(</big><em>key</em><big>)</big><a class="headerlink" href="#mongoalchemy.query.Query.distinct" title="Permalink to this definition">¶</a></dt>
-<dd><dl class="docutils">
-<dt>Execute this query and return all of the unique values of </dt>
-<dd><tt class="docutils literal"><span class="pre">key</span></tt>.</dd>
+<dd><p>Execute this query and return all of the unique values
+of <tt class="docutils literal"><span class="pre">key</span></tt>.</p>
+<dl class="docutils">
<dt><strong>Parameters</strong>:</dt>
<dd><ul class="first last simple">
<li>key: the instance of <tt class="xref py py-class docutils literal"><span class="pre">mongoalchemy.QueryField</span></tt> to use as the distinct key.</li>
@@ -186,7 +195,7 @@
<dt id="mongoalchemy.query.Query.filter">
<tt class="descname">filter</tt><big>(</big><em>*query_expressions</em><big>)</big><a class="headerlink" href="#mongoalchemy.query.Query.filter" title="Permalink to this definition">¶</a></dt>
<dd><p>Apply the given query expressions to this query object</p>
-<p><strong>Example</strong>: <tt class="docutils literal"><span class="pre">s.query(SomeObj).filter(SomeObj.f.age</span> <span class="pre">&gt;</span> <span class="pre">10,</span> <span class="pre">SomeObj.f.blood_type</span> <span class="pre">==</span> <span class="pre">'O')</span></tt></p>
+<p><strong>Example</strong>: <tt class="docutils literal"><span class="pre">s.query(SomeObj).filter(SomeObj.age</span> <span class="pre">&gt;</span> <span class="pre">10,</span> <span class="pre">SomeObj.blood_type</span> <span class="pre">==</span> <span class="pre">'O')</span></tt></p>
<dl class="docutils">
<dt><strong>Parameters</strong>:</dt>
<dd><ul class="first last simple">
@@ -227,7 +236,7 @@
<dl class="docutils">
<dt><strong>Parameters</strong>:</dt>
<dd><ul class="first last simple">
-<li>fields: Instances of :class:<tt class="docutils literal"><span class="pre">mongoalchemy.query.QueryField</span></tt> specifying which fields to return</li>
+<li>fields: Instances of :class:<tt class="docutils literal"><span class="pre">mongoalchemy.query.QueryField</span></tt> specifying which fields to return</li>
</ul>
</dd>
</dl>
@@ -266,7 +275,7 @@
<tt class="descname">or_</tt><big>(</big><em>first_qe</em>, <em>*qes</em><big>)</big><a class="headerlink" href="#mongoalchemy.query.Query.or_" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a $not expression to the query, negating the query expressions
given. The <tt class="docutils literal"><span class="pre">|</span> <span class="pre">operator</span></tt> on query expressions does the same thing</p>
-<p><strong>Examples</strong>: <tt class="docutils literal"><span class="pre">query.or_(SomeDocClass.f.age</span> <span class="pre">==</span> <span class="pre">18,</span> <span class="pre">SomeDocClass.f.age</span> <span class="pre">==</span> <span class="pre">17)</span></tt> becomes <tt class="docutils literal"><span class="pre">{'$or'</span> <span class="pre">:</span> <span class="pre">[{</span> <span class="pre">'age'</span> <span class="pre">:</span> <span class="pre">18</span> <span class="pre">},</span> <span class="pre">{</span> <span class="pre">'age'</span> <span class="pre">:</span> <span class="pre">17</span> <span class="pre">}]}</span></tt></p>
+<p><strong>Examples</strong>: <tt class="docutils literal"><span class="pre">query.or_(SomeDocClass.age</span> <span class="pre">==</span> <span class="pre">18,</span> <span class="pre">SomeDocClass.age</span> <span class="pre">==</span> <span class="pre">17)</span></tt> becomes <tt class="docutils literal"><span class="pre">{'$or'</span> <span class="pre">:</span> <span class="pre">[{</span> <span class="pre">'age'</span> <span class="pre">:</span> <span class="pre">18</span> <span class="pre">},</span> <span class="pre">{</span> <span class="pre">'age'</span> <span class="pre">:</span> <span class="pre">17</span> <span class="pre">}]}</span></tt></p>
<dl class="docutils">
<dt><strong>Parameters</strong>:</dt>
<dd><ul class="first last simple">
@@ -279,27 +288,29 @@
<dl class="method">
<dt id="mongoalchemy.query.Query.in_">
<tt class="descname">in_</tt><big>(</big><em>qfield</em>, <em>*values</em><big>)</big><a class="headerlink" href="#mongoalchemy.query.Query.in_" title="Permalink to this definition">¶</a></dt>
-<dd><p>Check to see that the value of <tt class="docutils literal"><span class="pre">qfield</span></tt> is one of <tt class="docutils literal"><span class="pre">values</span></tt>
-<strong>Parameters</strong>:</p>
-<blockquote>
-<ul class="simple">
+<dd><p>Check to see that the value of <tt class="docutils literal"><span class="pre">qfield</span></tt> is one of <tt class="docutils literal"><span class="pre">values</span></tt></p>
+<dl class="docutils">
+<dt><strong>Parameters</strong>:</dt>
+<dd><ul class="first last simple">
<li>qfield: Instances of <a class="reference internal" href="query_expressions.html#mongoalchemy.query_expression.QueryExpression" title="mongoalchemy.query_expression.QueryExpression"><tt class="xref py py-class docutils literal"><span class="pre">mongoalchemy.query_expression.QueryExpression</span></tt></a></li>
<li>values: Values should be python values which <tt class="docutils literal"><span class="pre">qfield</span></tt> understands</li>
</ul>
-</blockquote>
+</dd>
+</dl>
</dd></dl>
<dl class="method">
<dt id="mongoalchemy.query.Query.nin">
<tt class="descname">nin</tt><big>(</big><em>qfield</em>, <em>*values</em><big>)</big><a class="headerlink" href="#mongoalchemy.query.Query.nin" title="Permalink to this definition">¶</a></dt>
-<dd><p>Check to see that the value of <tt class="docutils literal"><span class="pre">qfield</span></tt> is not one of <tt class="docutils literal"><span class="pre">values</span></tt>
-<strong>Parameters</strong>:</p>
-<blockquote>
-<ul class="simple">
+<dd><p>Check to see that the value of <tt class="docutils literal"><span class="pre">qfield</span></tt> is not one of <tt class="docutils literal"><span class="pre">values</span></tt></p>
+<dl class="docutils">
+<dt><strong>Parameters</strong>:</dt>
+<dd><ul class="first last simple">
<li>qfield: Instances of <a class="reference internal" href="query_expressions.html#mongoalchemy.query_expression.QueryExpression" title="mongoalchemy.query_expression.QueryExpression"><tt class="xref py py-class docutils literal"><span class="pre">mongoalchemy.query_expression.QueryExpression</span></tt></a></li>
<li>values: Values should be python values which <tt class="docutils literal"><span class="pre">qfield</span></tt> understands</li>
</ul>
-</blockquote>
+</dd>
+</dl>
</dd></dl>
<dl class="method">
@@ -435,7 +446,7 @@
<li class="right" >
<a href="index.html" title="Expression Language — Querying and Updating"
>previous</a> |</li>
- <li><a href="../../index.html">MongoAlchemy v0.5 documentation</a> &raquo;</li>
+ <li><a href="../../index.html">MongoAlchemy v0.6 documentation</a> &raquo;</li>
<li><a href="../index.html" >API documentation</a> &raquo;</li>
<li><a href="index.html" >Expression Language — Querying and Updating</a> &raquo;</li>
</ul>
View
47 docs/build/html/api/expressions/query_expressions.html
@@ -7,13 +7,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Mongo Query Expression Language &mdash; MongoAlchemy v0.5 documentation</title>
+ <title>Mongo Query Expression Language &mdash; MongoAlchemy v0.6 documentation</title>
<link rel="stylesheet" href="../../_static/default.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../',
- VERSION: '0.5',
+ VERSION: '0.6',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@@ -22,7 +22,7 @@
<script type="text/javascript" src="../../_static/jquery.js"></script>
<script type="text/javascript" src="../../_static/underscore.js"></script>
<script type="text/javascript" src="../../_static/doctools.js"></script>
- <link rel="top" title="MongoAlchemy v0.5 documentation" href="../../index.html" />
+ <link rel="top" title="MongoAlchemy v0.6 documentation" href="../../index.html" />
<link rel="up" title="Expression Language — Querying and Updating" href="index.html" />
<link rel="next" title="Update Expressions" href="update_expressions.html" />
<link rel="prev" title="Query Objects" href="query.html" />
@@ -43,7 +43,7 @@
<li class="right" >
<a href="query.html" title="Query Objects"
accesskey="P">previous</a> |</li>
- <li><a href="../../index.html">MongoAlchemy v0.5 documentation</a> &raquo;</li>
+ <li><a href="../../index.html">MongoAlchemy v0.6 documentation</a> &raquo;</li>
<li><a href="../index.html" >API documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Expression Language — Querying and Updating</a> &raquo;</li>
</ul>
@@ -60,28 +60,17 @@
<h2>Query Fields<a class="headerlink" href="#query-fields" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="mongoalchemy.query_expression.QueryField">
-<em class="property">class </em><tt class="descclassname">mongoalchemy.query_expression.</tt><tt class="descname">QueryField</tt><big>(</big><em>name</em>, <em>type</em>, <em>parent=None</em><big>)</big><a class="headerlink" href="#mongoalchemy.query_expression.QueryField" title="Permalink to this definition">¶</a></dt>
+<em class="property">class </em><tt class="descclassname">mongoalchemy.query_expression.</tt><tt class="descname">QueryField</tt><big>(</big><em>type</em>, <em>parent=None</em><big>)</big><a class="headerlink" href="#mongoalchemy.query_expression.QueryField" title="Permalink to this definition">¶</a></dt>
<dd><dl class="method">
-<dt id="mongoalchemy.query_expression.QueryField.get_name">
-<tt class="descname">get_name</tt><big>(</big><big>)</big><a class="headerlink" href="#mongoalchemy.query_expression.QueryField.get_name" title="Permalink to this definition">¶</a></dt>
-<dd><p>Gets the MongoDB field name for the <a class="reference internal" href="../schema/fields.html#mongoalchemy.fields.Field" title="mongoalchemy.fields.Field"><tt class="xref py py-class docutils literal"><span class="pre">mongoalchemy.fields.Field</span></tt></a>
-this QueryField is wrapping</p>
-</dd></dl>
-
-<dl class="method">
<dt id="mongoalchemy.query_expression.QueryField.get_type">
<tt class="descname">get_type</tt><big>(</big><big>)</big><a class="headerlink" href="#mongoalchemy.query_expression.QueryField.get_type" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the underlying <a class="reference internal" href="../schema/fields.html#mongoalchemy.fields.Field" title="mongoalchemy.fields.Field"><tt class="xref py py-class docutils literal"><span class="pre">mongoalchemy.fields.Field</span></tt></a></p>
</dd></dl>
-<dl class="attribute">
-<dt id="mongoalchemy.query_expression.QueryField.f">
-<tt class="descname">f</tt><a class="headerlink" href="#mongoalchemy.query_expression.QueryField.f" title="Permalink to this definition">¶</a></dt>
-<dd><p><tt class="docutils literal"><span class="pre">f</span></tt> provides acces to the sub-fields of this field. They can
-also be accessed directly if they do not interfere with an
-attribute of <tt class="xref py py-class docutils literal"><span class="pre">QueryField</span></tt>.</p>
-<p><strong>Example</strong>: <tt class="docutils literal"><span class="pre">SomeDoc.f.outer_field.f.inner_field</span></tt> is the same as <tt class="docutils literal"><span class="pre">SomeDoc.f.outer_field.inner_field</span></tt></p>
-</dd></dl>
+<dl class="method">
+<dt id="mongoalchemy.query_expression.QueryField.get_absolute_name">
+<tt class="descname">get_absolute_name</tt><big>(</big><big>)</big><a class="headerlink" href="#mongoalchemy.query_expression.QueryField.get_absolute_name" title="Permalink to this definition">¶</a></dt>
+<dd></dd></dl>
<dl class="method">
<dt id="mongoalchemy.query_expression.QueryField.in_">
@@ -103,7 +92,7 @@
<dd><p>Creates a query expression where <tt class="docutils literal"><span class="pre">this</span> <span class="pre">field</span> <span class="pre">==</span> <span class="pre">value</span></tt></p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
-<p class="last">The prefered usage is via an operator: <tt class="docutils literal"><span class="pre">User.f.name</span> <span class="pre">==</span> <span class="pre">value</span></tt></p>
+<p class="last">The prefered usage is via an operator: <tt class="docutils literal"><span class="pre">User.name</span> <span class="pre">==</span> <span class="pre">value</span></tt></p>
</div>
</dd></dl>
@@ -113,7 +102,7 @@
<dd><p>Creates a query expression where <tt class="docutils literal"><span class="pre">this</span> <span class="pre">field</span> <span class="pre">&lt;</span> <span class="pre">value</span></tt></p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
-<p class="last">The prefered usage is via an operator: <tt class="docutils literal"><span class="pre">User.f.name</span> <span class="pre">&lt;</span> <span class="pre">value</span></tt></p>
+<p class="last">The prefered usage is via an operator: <tt class="docutils literal"><span class="pre">User.name</span> <span class="pre">&lt;</span> <span class="pre">value</span></tt></p>
</div>
</dd></dl>
@@ -123,7 +112,7 @@
<dd><p>Creates a query expression where <tt class="docutils literal"><span class="pre">this</span> <span class="pre">field</span> <span class="pre">&lt;=</span> <span class="pre">value</span></tt></p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
-<p class="last">The prefered usage is via an operator: <tt class="docutils literal"><span class="pre">User.f.name</span> <span class="pre">&lt;=</span> <span class="pre">value</span></tt></p>
+<p class="last">The prefered usage is via an operator: <tt class="docutils literal"><span class="pre">User.name</span> <span class="pre">&lt;=</span> <span class="pre">value</span></tt></p>
</div>
</dd></dl>
@@ -133,7 +122,7 @@
<dd><p>Creates a query expression where <tt class="docutils literal"><span class="pre">this</span> <span class="pre">field</span> <span class="pre">!=</span> <span class="pre">value</span></tt></p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
-<p class="last">The prefered usage is via an operator: <tt class="docutils literal"><span class="pre">User.f.name</span> <span class="pre">!=</span> <span class="pre">value</span></tt></p>
+<p class="last">The prefered usage is via an operator: <tt class="docutils literal"><span class="pre">User.name</span> <span class="pre">!=</span> <span class="pre">value</span></tt></p>
</div>
</dd></dl>
@@ -143,7 +132,7 @@
<dd><p>Creates a query expression where <tt class="docutils literal"><span class="pre">this</span> <span class="pre">field</span> <span class="pre">&gt;</span> <span class="pre">value</span></tt></p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
-<p class="last">The prefered usage is via an operator: <tt class="docutils literal"><span class="pre">User.f.name</span> <span class="pre">&gt;</span> <span class="pre">value</span></tt></p>
+<p class="last">The prefered usage is via an operator: <tt class="docutils literal"><span class="pre">User.name</span> <span class="pre">&gt;</span> <span class="pre">value</span></tt></p>
</div>
</dd></dl>
@@ -153,7 +142,7 @@
<dd><p>Creates a query expression where <tt class="docutils literal"><span class="pre">this</span> <span class="pre">field</span> <span class="pre">&gt;=</span> <span class="pre">value</span></tt></p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
-<p class="last">The prefered usage is via an operator: <tt class="docutils literal"><span class="pre">User.f.name</span> <span class="pre">&gt;=</span> <span class="pre">value</span></tt></p>
+<p class="last">The prefered usage is via an operator: <tt class="docutils literal"><span class="pre">User.name</span> <span class="pre">&gt;=</span> <span class="pre">value</span></tt></p>
</div>
</dd></dl>
@@ -177,10 +166,10 @@
<tt class="descname">or_</tt><big>(</big><em>expression</em><big>)</big><a class="headerlink" href="#mongoalchemy.query_expression.QueryExpression.or_" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds the given expression to this instance&#8217;s MongoDB <tt class="docutils literal"><span class="pre">$or</span></tt>
expression, starting a new one if one does not exst</p>
-<p><strong>Example</strong>: <tt class="docutils literal"><span class="pre">(User.f.name</span> <span class="pre">==</span> <span class="pre">'Jeff').or_(User.f.name</span> <span class="pre">==</span> <span class="pre">'Jack')</span></tt></p>
+<p><strong>Example</strong>: <tt class="docutils literal"><span class="pre">(User.name</span> <span class="pre">==</span> <span class="pre">'Jeff').or_(User.name</span> <span class="pre">==</span> <span class="pre">'Jack')</span></tt></p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
-<p class="last">The prefered usageis via an operator: <tt class="docutils literal"><span class="pre">User.f.name</span> <span class="pre">==</span> <span class="pre">'Jeff'</span> <span class="pre">|</span> <span class="pre">User.f.name</span> <span class="pre">==</span> <span class="pre">'Jack'</span></tt></p>
+<p class="last">The prefered usageis via an operator: <tt class="docutils literal"><span class="pre">User.name</span> <span class="pre">==</span> <span class="pre">'Jeff'</span> <span class="pre">|</span> <span class="pre">User.name</span> <span class="pre">==</span> <span class="pre">'Jack'</span></tt></p>
</div>
</dd></dl>
@@ -247,7 +236,7 @@
<li class="right" >
<a href="query.html" title="Query Objects"
>previous</a> |</li>
- <li><a href="../../index.html">MongoAlchemy v0.5 documentation</a> &raquo;</li>
+ <li><a href="../../index.html">MongoAlchemy v0.6 documentation</a> &raquo;</li>
<li><a href="../index.html" >API documentation</a> &raquo;</li>
<li><a href="index.html" >Expression Language — Querying and Updating</a> &raquo;</li>
</ul>
View
31 docs/build/html/api/expressions/update_expressions.html
@@ -7,13 +7,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Update Expressions &mdash; MongoAlchemy v0.5 documentation</title>
+ <title>Update Expressions &mdash; MongoAlchemy v0.6 documentation</title>
<link rel="stylesheet" href="../../_static/default.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../',
- VERSION: '0.5',
+ VERSION: '0.6',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@@ -22,8 +22,9 @@
<script type="text/javascript" src="../../_static/jquery.js"></script>
<script type="text/javascript" src="../../_static/underscore.js"></script>
<script type="text/javascript" src="../../_static/doctools.js"></script>
- <link rel="top" title="MongoAlchemy v0.5 documentation" href="../../index.html" />
+ <link rel="top" title="MongoAlchemy v0.6 documentation" href="../../index.html" />
<link rel="up" title="Expression Language — Querying and Updating" href="index.html" />
+ <link rel="next" title="Exceptions" href="../exceptions.html" />
<link rel="prev" title="Mongo Query Expression Language" href="query_expressions.html" />
</head>
<body>
@@ -37,9 +38,12 @@
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
+ <a href="../exceptions.html" title="Exceptions"
+ accesskey="N">next</a> |</li>
+ <li class="right" >
<a href="query_expressions.html" title="Mongo Query Expression Language"
accesskey="P">previous</a> |</li>
- <li><a href="../../index.html">MongoAlchemy v0.5 documentation</a> &raquo;</li>
+ <li><a href="../../index.html">MongoAlchemy v0.6 documentation</a> &raquo;</li>
<li><a href="../index.html" >API documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Expression Language — Querying and Updating</a> &raquo;</li>
</ul>
@@ -168,14 +172,15 @@
<dl class="class">
<dt id="mongoalchemy.query.RemoveQuery">
<em class="property">class </em><tt class="descclassname">mongoalchemy.query.</tt><tt class="descname">RemoveQuery</tt><big>(</big><em>type</em>, <em>session</em><big>)</big><a class="headerlink" href="#mongoalchemy.query.RemoveQuery" title="Permalink to this definition">¶</a></dt>
-<dd><p>Execute a remove query to remove the matched objects from the database
-<strong>Parameters</strong>:</p>
-<blockquote>
-<ul class="simple">
+<dd><p>Execute a remove query to remove the matched objects from the database</p>
+<dl class="docutils">
+<dt><strong>Parameters</strong>:</dt>
+<dd><ul class="first last simple">
<li>type: A subclass of class:<cite>mongoalchemy.document.Document</cite></li>
<li>db: The <a class="reference internal" href="../session.html#mongoalchemy.session.Session" title="mongoalchemy.session.Session"><tt class="xref py py-class docutils literal"><span class="pre">Session</span></tt></a> which this query is associated with.</li>
</ul>
-</blockquote>
+</dd>
+</dl>
<dl class="method">
<dt id="mongoalchemy.query.RemoveQuery.set_safe">
<tt class="descname">set_safe</tt><big>(</big><em>is_safe</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#mongoalchemy.query.RemoveQuery.set_safe" title="Permalink to this definition">¶</a></dt>
@@ -242,6 +247,9 @@
<h4>Previous topic</h4>
<p class="topless"><a href="query_expressions.html"
title="previous chapter">Mongo Query Expression Language</a></p>
+ <h4>Next topic</h4>
+ <p class="topless"><a href="../exceptions.html"
+ title="next chapter">Exceptions</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/api/expressions/update_expressions.txt"
@@ -274,9 +282,12 @@
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
+ <a href="../exceptions.html" title="Exceptions"
+ >next</a> |</li>
+ <li class="right" >
<a href="query_expressions.html" title="Mongo Query Expression Language"
>previous</a> |</li>
- <li><a href="../../index.html">MongoAlchemy v0.5 documentation</a> &raquo;</li>
+ <li><a href="../../index.html">MongoAlchemy v0.6 documentation</a> &raquo;</li>
<li><a href="../index.html" >API documentation</a> &raquo;</li>
<li><a href="index.html" >Expression Language — Querying and Updating</a> &raquo;</li>
</ul>
View
17 docs/build/html/api/index.html
@@ -7,13 +7,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>API documentation &mdash; MongoAlchemy v0.5 documentation</title>
+ <title>API documentation &mdash; MongoAlchemy v0.6 documentation</title>
<link rel="stylesheet" href="../_static/default.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
- VERSION: '0.5',
+ VERSION: '0.6',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@@ -22,7 +22,7 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
- <link rel="top" title="MongoAlchemy v0.5 documentation" href="../index.html" />
+ <link rel="top" title="MongoAlchemy v0.6 documentation" href="../index.html" />
<link rel="next" title="Session" href="session.html" />
<link rel="prev" title="MongoAlchemy Tutorial" href="../tutorial.html" />
</head>
@@ -42,7 +42,7 @@
<li class="right" >
<a href="../tutorial.html" title="MongoAlchemy Tutorial"
accesskey="P">previous</a> |</li>
- <li><a href="../index.html">MongoAlchemy v0.5 documentation</a> &raquo;</li>
+ <li><a href="../index.html">MongoAlchemy v0.6 documentation</a> &raquo;</li>
</ul>
</div>
@@ -61,7 +61,6 @@
<li class="toctree-l2"><a class="reference internal" href="schema/document.html"><tt class="docutils literal"><span class="pre">document</span></tt></a><ul>
<li class="toctree-l3"><a class="reference internal" href="schema/document.html#document-objects"><tt class="docutils literal"><span class="pre">Document</span></tt> Objects</a></li>
<li class="toctree-l3"><a class="reference internal" href="schema/document.html#index-objects"><tt class="docutils literal"><span class="pre">Index</span></tt> Objects</a></li>
-<li class="toctree-l3"><a class="reference internal" href="schema/document.html#exceptions">Exceptions</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="schema/fields.html"><tt class="docutils literal"><span class="pre">fields</span></tt></a><ul>
@@ -71,7 +70,6 @@
<li class="toctree-l3"><a class="reference internal" href="schema/fields.html#mapping-type-fields">Mapping Type Fields</a></li>
<li class="toctree-l3"><a class="reference internal" href="schema/fields.html#document-field-objects">Document Field Objects</a></li>
<li class="toctree-l3"><a class="reference internal" href="schema/fields.html#computed-field-objects">Computed Field Objects</a></li>
-<li class="toctree-l3"><a class="reference internal" href="schema/fields.html#exceptions">Exceptions</a></li>
</ul>
</li>
</ul>
@@ -87,6 +85,11 @@
<li class="toctree-l2"><a class="reference internal" href="expressions/update_expressions.html#remove-queries">Remove Queries</a></li>
</ul>
</li>
+<li class="toctree-l1"><a class="reference internal" href="exceptions.html">Exceptions</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="exceptions.html#field-exceptions">Field Exceptions</a></li>
+<li class="toctree-l2"><a class="reference internal" href="exceptions.html#document-exceptions">Document Exceptions</a></li>
+</ul>
+</li>
</ul>
</div>
<span class="target" id="module-mongoalchemy"></span></div>
@@ -140,7 +143,7 @@
<li class="right" >
<a href="../tutorial.html" title="MongoAlchemy Tutorial"
>previous</a> |</li>
- <li><a href="../index.html">MongoAlchemy v0.5 documentation</a> &raquo;</li>
+ <li><a href="../index.html">MongoAlchemy v0.6 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
View
59 docs/build/html/api/schema/document.html
@@ -7,13 +7,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>document &mdash; MongoAlchemy v0.5 documentation</title>
+ <title>document &mdash; MongoAlchemy v0.6 documentation</title>
<link rel="stylesheet" href="../../_static/default.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../',
- VERSION: '0.5',
+ VERSION: '0.6',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@@ -22,7 +22,7 @@
<script type="text/javascript" src="../../_static/jquery.js"></script>
<script type="text/javascript" src="../../_static/underscore.js"></script>
<script type="text/javascript" src="../../_static/doctools.js"></script>
- <link rel="top" title="MongoAlchemy v0.5 documentation" href="../../index.html" />
+ <link rel="top" title="MongoAlchemy v0.6 documentation" href="../../index.html" />
<link rel="up" title="Schema — Document-Object Mapper and Schema Definitions" href="index.html" />
<link rel="next" title="fields" href="fields.html" />
<link rel="prev" title="Schema — Document-Object Mapper and Schema Definitions" href="index.html" />
@@ -43,7 +43,7 @@
<li class="right" >
<a href="index.html" title="Schema — Document-Object Mapper and Schema Definitions"
accesskey="P">previous</a> |</li>
- <li><a href="../../index.html">MongoAlchemy v0.5 documentation</a> &raquo;</li>
+ <li><a href="../../index.html">MongoAlchemy v0.6 documentation</a> &raquo;</li>
<li><a href="../index.html" >API documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Schema — Document-Object Mapper and Schema Definitions</a> &raquo;</li>
</ul>
@@ -79,8 +79,8 @@
<li><p class="first">retrieved_fields: The names of the fields returned when loading a partial object. This argument should not be explicitly set by subclasses</p>
</li>
<li><dl class="first docutils">
-<dt>**kwargs: The values for all of the fields in the document. Any additional fields will raise a <a class="reference internal" href="#mongoalchemy.document.ExtraValueException" title="mongoalchemy.document.ExtraValueException"><tt class="xref py py-class docutils literal"><span class="pre">ExtraValueException</span></tt></a> and </dt>
-<dd><p class="first last">any missing (but required) fields will raise a <a class="reference internal" href="#mongoalchemy.document.MissingValueException" title="mongoalchemy.document.MissingValueException"><tt class="xref py py-class docutils literal"><span class="pre">MissingValueException</span></tt></a>. Both types of exceptions are subclasses of <a class="reference internal" href="#mongoalchemy.document.DocumentException" title="mongoalchemy.document.DocumentException"><tt class="xref py py-class docutils literal"><span class="pre">DocumentException</span></tt></a>.</p>
+<dt>**kwargs: The values for all of the fields in the document. Any additional fields will raise a <a class="reference internal" href="../exceptions.html#mongoalchemy.document.ExtraValueException" title="mongoalchemy.document.ExtraValueException"><tt class="xref py py-class docutils literal"><span class="pre">ExtraValueException</span></tt></a> and </dt>
+<dd><p class="first last">any missing (but required) fields will raise a <a class="reference internal" href="../exceptions.html#mongoalchemy.document.MissingValueException" title="mongoalchemy.document.MissingValueException"><tt class="xref py py-class docutils literal"><span class="pre">MissingValueException</span></tt></a>. Both types of exceptions are subclasses of <a class="reference internal" href="../exceptions.html#mongoalchemy.document.DocumentException" title="mongoalchemy.document.DocumentException"><tt class="xref py py-class docutils literal"><span class="pre">DocumentException</span></tt></a>.</p>
</dd>
</dl>
</li>
@@ -105,18 +105,10 @@
<a class="reference internal" href="#mongoalchemy.document.Document.get_extra_fields" title="mongoalchemy.document.Document.get_extra_fields"><tt class="xref py py-func docutils literal"><span class="pre">get_extra_fields()</span></tt></a></p>
</dd></dl>
-<dl class="attribute">
-<dt id="mongoalchemy.document.Document.f">
-<tt class="descname">f</tt><a class="headerlink" href="#mongoalchemy.document.Document.f" title="Permalink to this definition">¶</a></dt>
-<dd><p>The <tt class="docutils literal"><span class="pre">f</span></tt> attribute of a document class allows the creation of
-<tt class="xref py py-class docutils literal"><span class="pre">QueryField</span></tt> objects to be used in query
-expressions, updates, loading partial documents, and a number of other
-places.</p>
-<div class="admonition-see-also admonition seealso">
-<p class="first admonition-title">See also</p>
-<p class="last"><a class="reference internal" href="../expressions/query_expressions.html#mongoalchemy.query_expression.QueryExpression" title="mongoalchemy.query_expression.QueryExpression"><tt class="xref py py-class docutils literal"><span class="pre">QueryExpression</span></tt></a>, <a class="reference internal" href="../expressions/query.html#mongoalchemy.query.Query" title="mongoalchemy.query.Query"><tt class="xref py py-class docutils literal"><span class="pre">Query</span></tt></a></p>
-</div>
-</dd></dl>
+<dl class="method">
+<dt id="mongoalchemy.document.Document.get_dirty_ops">
+<tt class="descname">get_dirty_ops</tt><big>(</big><big>)</big><a class="headerlink" href="#mongoalchemy.document.Document.get_dirty_ops" title="Permalink to this definition">¶</a></dt>
+<dd></dd></dl>
<dl class="method">
<dt id="mongoalchemy.document.Document.get_extra_fields">
@@ -282,34 +274,6 @@
</dd></dl>
</div>
-<div class="section" id="exceptions">
-<h2>Exceptions<a class="headerlink" href="#exceptions" title="Permalink to this headline">¶</a></h2>
-<dl class="exception">
-<dt id="mongoalchemy.document.DocumentException">
-<em class="property">exception </em><tt class="descclassname">mongoalchemy.document.</tt><tt class="descname">DocumentException</tt><a class="headerlink" href="#mongoalchemy.document.DocumentException" title="Permalink to this definition">¶</a></dt>
-<dd><p>Base for all document-related exceptions</p>
-</dd></dl>
-
-<dl class="exception">
-<dt id="mongoalchemy.document.MissingValueException">
-<em class="property">exception </em><tt class="descclassname">mongoalchemy.document.</tt><tt class="descname">MissingValueException</tt><a class="headerlink" href="#mongoalchemy.document.MissingValueException" title="Permalink to this definition">¶</a></dt>
-<dd><p>Raised when a required field isn&#8217;t set</p>
-</dd></dl>
-
-<dl class="exception">
-<dt id="mongoalchemy.document.ExtraValueException">
-<em class="property">exception </em><tt class="descclassname">mongoalchemy.document.</tt><tt class="descname">ExtraValueException</tt><a class="headerlink" href="#mongoalchemy.document.ExtraValueException" title="Permalink to this definition">¶</a></dt>
-<dd><p>Raised when a value is passed in with no corresponding field</p>
-</dd></dl>
-
-<dl class="exception">
-<dt id="mongoalchemy.document.FieldNotRetrieved">
-<em class="property">exception </em><tt class="descclassname">mongoalchemy.document.</tt><tt class="descname">FieldNotRetrieved</tt><a class="headerlink" href="#mongoalchemy.document.FieldNotRetrieved" title="Permalink to this definition">¶</a></dt>
-<dd><p>If a partial document is loaded from the database and a field which
-wasn&#8217;t retrieved is accessed this exception is raised</p>
-</dd></dl>
-
-</div>
</div>
@@ -323,7 +287,6 @@
<li><a class="reference internal" href="#"><tt class="docutils literal"><span class="pre">document</span></tt></a><ul>
<li><a class="reference internal" href="#document-objects"><tt class="docutils literal"><span class="pre">Document</span></tt> Objects</a></li>
<li><a class="reference internal" href="#index-objects"><tt class="docutils literal"><span class="pre">Index</span></tt> Objects</a></li>
-<li><a class="reference internal" href="#exceptions">Exceptions</a></li>
</ul>
</li>
</ul>
@@ -371,7 +334,7 @@
<li class="right" >
<a href="index.html" title="Schema — Document-Object Mapper and Schema Definitions"
>previous</a> |</li>
- <li><a href="../../index.html">MongoAlchemy v0.5 documentation</a> &raquo;</li>
+ <li><a href="../../index.html">MongoAlchemy v0.6 documentation</a> &raquo;</li>
<li><a href="../index.html" >API documentation</a> &raquo;</li>
<li><a href="index.html" >Schema — Document-Object Mapper and Schema Definitions</a> &raquo;</li>
</ul>
View
112 docs/build/html/api/schema/fields.html
@@ -7,13 +7,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>fields &mdash; MongoAlchemy v0.5 documentation</title>
+ <title>fields &mdash; MongoAlchemy v0.6 documentation</title>
<link rel="stylesheet" href="../../_static/default.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../',
- VERSION: '0.5',
+ VERSION: '0.6',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@@ -22,7 +22,7 @@
<script type="text/javascript" src="../../_static/jquery.js"></script>
<script type="text/javascript" src="../../_static/underscore.js"></script>
<script type="text/javascript" src="../../_static/doctools.js"></script>
- <link rel="top" title="MongoAlchemy v0.5 documentation" href="../../index.html" />
+ <link rel="top" title="MongoAlchemy v0.6 documentation" href="../../index.html" />
<link rel="up" title="Schema — Document-Object Mapper and Schema Definitions" href="index.html" />
<link rel="next" title="Expression Language — Querying and Updating" href="../expressions/index.html" />
<link rel="prev" title="document" href="document.html" />
@@ -43,7 +43,7 @@
<li class="right" >
<a href="document.html" title="document"
accesskey="P">previous</a> |</li>
- <li><a href="../../index.html">MongoAlchemy v0.5 documentation</a> &raquo;</li>
+ <li><a href="../../index.html">MongoAlchemy v0.6 documentation</a> &raquo;</li>
<li><a href="../index.html" >API documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Schema — Document-Object Mapper and Schema Definitions</a> &raquo;</li>
</ul>
@@ -75,25 +75,25 @@
In particular, <tt class="docutils literal"><span class="pre">field.unwrap(field.wrap(obj))</span></tt> == obj should always be true.</p>
<ul>
<li><dl class="first docutils">
-<dt><a class="reference internal" href="#mongoalchemy.fields.Field.validate_wrap" title="mongoalchemy.fields.Field.validate_wrap"><tt class="xref py py-func docutils literal"><span class="pre">Field.validate_wrap()</span></tt></a> &#8212; Raises a <a class="reference internal" href="#mongoalchemy.fields.BadValueException" title="mongoalchemy.fields.BadValueException"><tt class="xref py py-class docutils literal"><span class="pre">BadValueException</span></tt></a> if calling <a class="reference internal" href="#mongoalchemy.fields.Field.wrap" title="mongoalchemy.fields.Field.wrap"><tt class="xref py py-func docutils literal"><span class="pre">wrap()</span></tt></a> will fail. This function should be fast, as it will be called whenever a value </dt>
+<dt><a class="reference internal" href="#mongoalchemy.fields.Field.validate_wrap" title="mongoalchemy.fields.Field.validate_wrap"><tt class="xref py py-func docutils literal"><span class="pre">Field.validate_wrap()</span></tt></a> &#8212; Raises a <tt class="xref py py-class docutils literal"><span class="pre">BadValueException</span></tt> if calling <a class="reference internal" href="#mongoalchemy.fields.Field.wrap" title="mongoalchemy.fields.Field.wrap"><tt class="xref py py-func docutils literal"><span class="pre">wrap()</span></tt></a> will fail. This function should be fast, as it will be called whenever a value </dt>
<dd><p class="first last">is set on a document for this type of field.</p>
</dd>
</dl>
</li>
-<li><p class="first"><a class="reference internal" href="#mongoalchemy.fields.Field.validate_unwrap" title="mongoalchemy.fields.Field.validate_unwrap"><tt class="xref py py-func docutils literal"><span class="pre">Field.validate_unwrap()</span></tt></a> &#8212; Raises a <a class="reference internal" href="#mongoalchemy.fields.BadValueException" title="mongoalchemy.fields.BadValueException"><tt class="xref py py-class docutils literal"><span class="pre">BadValueException</span></tt></a> if calling <a class="reference internal" href="#mongoalchemy.fields.Field.unwrap" title="mongoalchemy.fields.Field.unwrap"><tt class="xref py py-func docutils literal"><span class="pre">unwrap()</span></tt></a> will fail.</p>
+<li><p class="first"><a class="reference internal" href="#mongoalchemy.fields.Field.validate_unwrap" title="mongoalchemy.fields.Field.validate_unwrap"><tt class="xref py py-func docutils literal"><span class="pre">Field.validate_unwrap()</span></tt></a> &#8212; Raises a <tt class="xref py py-class docutils literal"><span class="pre">BadValueException</span></tt> if calling <a class="reference internal" href="#mongoalchemy.fields.Field.unwrap" title="mongoalchemy.fields.Field.unwrap"><tt class="xref py py-func docutils literal"><span class="pre">unwrap()</span></tt></a> will fail.</p>
</li>
</ul>
<p>To just check whether something is valid for wrapping or unwrapping, each field has a
<a class="reference internal" href="#mongoalchemy.fields.Field.is_valid_wrap" title="mongoalchemy.fields.Field.is_valid_wrap"><tt class="xref py py-func docutils literal"><span class="pre">Field.is_valid_wrap()</span></tt></a> and an <a class="reference internal" href="#mongoalchemy.fields.Field.is_valid_unwrap" title="mongoalchemy.fields.Field.is_valid_unwrap"><tt class="xref py py-func docutils literal"><span class="pre">Field.is_valid_unwrap()</span></tt></a> function which call
their respective validation function, returning True if a
-<a class="reference internal" href="#mongoalchemy.fields.BadValueException" title="mongoalchemy.fields.BadValueException"><tt class="xref py py-class docutils literal"><span class="pre">BadValueException</span></tt></a> is not raised.</p>
+<tt class="xref py py-class docutils literal"><span class="pre">BadValueException</span></tt> is not raised.</p>
<p>The documentation for each <a class="reference internal" href="#mongoalchemy.fields.Field" title="mongoalchemy.fields.Field"><tt class="xref py py-class docutils literal"><span class="pre">Field</span></tt></a> class will largely just be giving the input and
output types for <a class="reference internal" href="#mongoalchemy.fields.Field.wrap" title="mongoalchemy.fields.Field.wrap"><tt class="xref py py-func docutils literal"><span class="pre">wrap()</span></tt></a> and <a class="reference internal" href="#mongoalchemy.fields.Field.unwrap" title="mongoalchemy.fields.Field.unwrap"><tt class="xref py py-func docutils literal"><span class="pre">unwrap()</span></tt></a>.</p>
<div class="section" id="field-objects">
<h2>Field Objects<a class="headerlink" href="#field-objects" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="mongoalchemy.fields.Field">
-<em class="property">class </em><tt class="descclassname">mongoalchemy.fields.</tt><tt class="descname">Field</tt><big>(</big><em>required=True</em>, <em>default=UNSET</em>, <em>db_field=None</em>, <em>allow_none=False</em><big>)</big><a class="headerlink" href="#mongoalchemy.fields.Field" title="Permalink to this definition">¶</a></dt>
+<em class="property">class </em><tt class="descclassname">mongoalchemy.fields.</tt><tt class="descname">Field</tt><big>(</big><em>required=True</em>, <em>default=UNSET</em>, <em>db_field=None</em>, <em>allow_none=False</em>, <em>on_update='$set'</em><big>)</big><a class="headerlink" href="#mongoalchemy.fields.Field" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt><strong>Parameters</strong>:</dt>
<dd><ul class="first last simple">
@@ -104,6 +104,11 @@
</ul>
</dd>
</dl>
+<dl class="method">
+<dt id="mongoalchemy.fields.Field.dirty_ops">
+<tt class="descname">dirty_ops</tt><big>(</big><em>instance</em><big>)</big><a class="headerlink" href="#mongoalchemy.fields.Field.dirty_ops" title="Permalink to this definition">¶</a></dt>
+<dd></dd></dl>
+
<dl class="attribute">
<dt id="mongoalchemy.fields.Field.db_field">
<tt class="descname">db_field</tt><a class="headerlink" href="#mongoalchemy.fields.Field.db_field" title="Permalink to this definition">¶</a></dt>
@@ -146,7 +151,7 @@
<dt id="mongoalchemy.fields.Field.validate_wrap">
<tt class="descname">validate_wrap</tt><big>(</big><em>value</em>, <em>*args</em>, <em>**kwds</em><big>)</big><a class="headerlink" href="#mongoalchemy.fields.Field.validate_wrap" title="Permalink to this definition">¶</a></dt>
<dd><p>Called before wrapping. Calls <a class="reference internal" href="#mongoalchemy.fields.Field.is_valid_wrap" title="mongoalchemy.fields.Field.is_valid_wrap"><tt class="xref py py-func docutils literal"><span class="pre">is_valid_wrap()</span></tt></a> and
-raises a <a class="reference internal" href="#mongoalchemy.fields.BadValueException" title="mongoalchemy.fields.BadValueException"><tt class="xref py py-class docutils literal"><span class="pre">BadValueException</span></tt></a> if validation fails</p>
+raises a <tt class="xref py py-class docutils literal"><span class="pre">BadValueException</span></tt> if validation fails</p>
<dl class="docutils">
<dt><strong>Parameters</strong>: </dt>
<dd><ul class="first last simple">
@@ -160,7 +165,7 @@
<dt id="mongoalchemy.fields.Field.validate_unwrap">
<tt class="descname">validate_unwrap</tt><big>(</big><em>value</em>, <em>*args</em>, <em>**kwds</em><big>)</big><a class="headerlink" href="#mongoalchemy.fields.Field.validate_unwrap" title="Permalink to this definition">¶</a></dt>
<dd><p>Called before unwrapping. Calls <a class="reference internal" href="#mongoalchemy.fields.Field.is_valid_unwrap" title="mongoalchemy.fields.Field.is_valid_unwrap"><tt class="xref py py-func docutils literal"><span class="pre">is_valid_unwrap()</span></tt></a> and raises
-a <a class="reference internal" href="#mongoalchemy.fields.BadValueException" title="mongoalchemy.fields.BadValueException"><tt class="xref py py-class docutils literal"><span class="pre">BadValueException</span></tt></a> if validation fails</p>
+a <tt class="xref py py-class docutils literal"><span class="pre">BadValueException</span></tt> if validation fails</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><tt class="docutils literal"><span class="pre">is_valid_unwrap</span></tt> calls <tt class="docutils literal"><span class="pre">is_valid_wrap</span></tt>, so any class without
@@ -375,25 +380,27 @@
<dl class="method">
<dt id="mongoalchemy.fields.TupleField.wrap">
<tt class="descname">wrap</tt><big>(</big><em>value</em><big>)</big><a class="headerlink" href="#mongoalchemy.fields.TupleField.wrap" title="Permalink to this definition">¶</a></dt>
-<dd><p>Validate and then wrap <tt class="docutils literal"><span class="pre">value</span></tt> for insertion.
-<strong>Parameters</strong></p>
-<blockquote>
-<ul class="simple">
+<dd><p>Validate and then wrap <tt class="docutils literal"><span class="pre">value</span></tt> for insertion.</p>
+<dl class="docutils">
+<dt><strong>Parameters</strong></dt>
+<dd><ul class="first last simple">
<li>value: the tuple (or list) to wrap</li>
</ul>
-</blockquote>
+</dd>
+</dl>
</dd></dl>
<dl class="method">
<dt id="mongoalchemy.fields.TupleField.unwrap">
<tt class="descname">unwrap</tt><big>(</big><em>value</em><big>)</big><a class="headerlink" href="#mongoalchemy.fields.TupleField.unwrap" title="Permalink to this definition">¶</a></dt>
-<dd><p>Validate and then unwrap <tt class="docutils literal"><span class="pre">value</span></tt> for object creation.
-<strong>Parameters</strong></p>
-<blockquote>
-<ul class="simple">
+<dd><p>Validate and then unwrap <tt class="docutils literal"><span class="pre">value</span></tt> for object creation.</p>
+<dl class="docutils">
+<dt><strong>Parameters</strong></dt>
+<dd><ul class="first last simple">
<li>value: list returned from the database.</li>
</ul>
-</blockquote>
+</dd>
+</dl>
</dd></dl>
</dd></dl>
@@ -435,7 +442,8 @@
<dl class="method">
<dt id="mongoalchemy.fields.EnumField.wrap">
<tt class="descname">wrap</tt><big>(</big><em>value</em><big>)</big><a class="headerlink" href="#mongoalchemy.fields.EnumField.wrap" title="Permalink to this definition">¶</a></dt>
-<dd><p>Validate and wrap value using the wrapping function from <tt class="docutils literal"><span class="pre">EnumField.item_type</span></tt></p>
+<dd><p>Validate and wrap value using the wrapping function from
+<tt class="docutils literal"><span class="pre">EnumField.item_type</span></tt></p>
</dd></dl>
<dl class="method">
@@ -477,7 +485,7 @@
<dl class="class">
<dt id="mongoalchemy.fields.AnythingField">
-<em class="property">class </em><tt class="descclassname">mongoalchemy.fields.</tt><tt class="descname">AnythingField</tt><big>(</big><em>required=True</em>, <em>default=UNSET</em>, <em>db_field=None</em>, <em>allow_none=False</em><big>)</big><a class="headerlink" href="#mongoalchemy.fields.AnythingField" title="Permalink to this definition">¶</a></dt>
+<em class="property">class </em><tt class="descclassname">mongoalchemy.fields.</tt><tt class="descname">AnythingField</tt><big>(</big><em>required=True</em>, <em>default=UNSET</em>, <em>db_field=None</em>, <em>allow_none=False</em>, <em>on_update='$set'</em><big>)</big><a class="headerlink" href="#mongoalchemy.fields.AnythingField" title="Permalink to this definition">¶</a></dt>
<dd><p>A field that passes through whatever is set with no validation. Useful
for free-form objects</p>
<dl class="docutils">
@@ -717,10 +725,25 @@
<em class="property">class </em><tt class="descclassname">mongoalchemy.document.</tt><tt class="descname">DocumentField</tt><big>(</big><em>document_class</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#mongoalchemy.document.DocumentField" title="Permalink to this definition">¶</a></dt>
<dd><p>A field which wraps a <tt class="xref py py-class docutils literal"><span class="pre">Document</span></tt></p>
<dl class="method">
+<dt id="mongoalchemy.document.DocumentField.dirty_ops">
+<tt class="descname">dirty_ops</tt><big>(</big><em>instance</em><big>)</big><a class="headerlink" href="#mongoalchemy.document.DocumentField.dirty_ops" title="Permalink to this definition">¶</a></dt>
+<dd></dd></dl>
+
+<dl class="method">
+<dt id="mongoalchemy.document.DocumentField.subfields">
+<tt class="descname">subfields</tt><big>(</big><big>)</big><a class="headerlink" href="#mongoalchemy.document.DocumentField.subfields" title="Permalink to this definition">¶</a></dt>
+<dd></dd></dl>
+
+<dl class="method">
+<dt id="mongoalchemy.document.DocumentField.sub_type">
+<tt class="descname">sub_type</tt><big>(</big><big>)</big><a class="headerlink" href="#mongoalchemy.document.DocumentField.sub_type" title="Permalink to this definition">¶</a></dt>
+<dd></dd></dl>
+
+<dl class="method">
<dt id="mongoalchemy.document.DocumentField.is_valid_unwrap">
<tt class="descname">is_valid_unwrap</tt><big>(</big><em>value</em>, <em>fields=None</em><big>)</big><a class="headerlink" href="#mongoalchemy.document.DocumentField.is_valid_unwrap" title="Permalink to this definition">¶</a></dt>
<dd><p>Called before wrapping. Calls <tt class="xref py py-func docutils literal"><span class="pre">is_valid_unwrap()</span></tt> and
-raises a <a class="reference internal" href="#mongoalchemy.fields.BadValueException" title="mongoalchemy.fields.BadValueException"><tt class="xref py py-class docutils literal"><span class="pre">BadValueException</span></tt></a> if validation fails</p>
+raises a <tt class="xref py py-class docutils literal"><span class="pre">BadValueException</span></tt> if validation fails</p>
<dl class="docutils">
<dt><strong>Parameters</strong>: </dt>
<dd><ul class="first last simple">
@@ -767,7 +790,7 @@
<h2>Computed Field Objects<a class="headerlink" href="#computed-field-objects" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="mongoalchemy.fields.ComputedField">
-<em class="property">class </em><tt class="descclassname">mongoalchemy.fields.</tt><tt class="descname">ComputedField</tt><big>(</big><em>computed_type</em>, <em>deps=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#mongoalchemy.fields.ComputedField" title="Permalink to this definition">¶</a></dt>
+<em class="property">class </em><tt class="descclassname">mongoalchemy.fields.</tt><tt class="descname">ComputedField</tt><big>(</big><em>computed_type</em>, <em>fun</em>, <em>deps=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#mongoalchemy.fields.ComputedField" title="Permalink to this definition">¶</a></dt>
<dd><p>A computed field is generated based on an object&#8217;s other values.</p>
<p>the unwrap function takes a dictionary of K/V pairs of the
dependencies. Since dependencies are declared in the class
@@ -789,6 +812,16 @@
</dd>
</dl>
<dl class="method">
+<dt id="mongoalchemy.fields.ComputedField.dirty_ops">
+<tt class="descname">dirty_ops</tt><big>(</big><em>instance</em><big>)</big><a class="headerlink" href="#mongoalchemy.fields.ComputedField.dirty_ops" title="Permalink to this definition">¶</a></dt>
+<dd></dd></dl>
+
+<dl class="method">
+<dt id="mongoalchemy.fields.ComputedField.compute_value">
+<tt class="descname">compute_value</tt><big>(</big><em>doc</em><big>)</big><a class="headerlink" href="#mongoalchemy.fields.ComputedField.compute_value" title="Permalink to this definition">¶</a></dt>
+<dd></dd></dl>
+
+<dl class="method">
<dt id="mongoalchemy.fields.ComputedField.validate_wrap">
<tt class="descname">validate_wrap</tt><big>(</big><em>value</em>, <em>*args</em>, <em>**kwds</em><big>)</big><a class="headerlink" href="#mongoalchemy.fields.ComputedField.validate_wrap" title="Permalink to this definition">¶</a></dt>
<dd><p>Check that <tt class="docutils literal"><span class="pre">value</span></tt> is valid for unwrapping with <tt class="docutils literal"><span class="pre">ComputedField.computed_type</span></tt></p>
@@ -814,33 +847,11 @@
</dd></dl>
-<dl class="class">
-<dt id="mongoalchemy.fields.ComputedFieldValue">
-<em class="property">class </em><tt class="descclassname">mongoalchemy.fields.</tt><tt class="descname">ComputedFieldValue</tt><big>(</big><em>field</em>, <em>fun</em><big>)</big><a class="headerlink" href="#mongoalchemy.fields.ComputedFieldValue" title="Permalink to this definition">¶</a></dt>
-<dd><dl class="method">
-<dt id="mongoalchemy.fields.ComputedFieldValue.compute_value">
-<tt class="descname">compute_value</tt><big>(</big><em>doc</em><big>)</big><a class="headerlink" href="#mongoalchemy.fields.ComputedFieldValue.compute_value" title="Permalink to this definition">¶</a></dt>
+<dl class="function">
+<dt id="mongoalchemy.fields.computed_field">
+<tt class="descclassname">mongoalchemy.fields.</tt><tt class="descname">computed_field</tt><big>(</big><em>computed_type</em>, <em>deps=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#mongoalchemy.fields.computed_field" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
-</dd></dl>
-
-</div>
-<div class="section" id="exceptions">
-<h2>Exceptions<a class="headerlink" href="#exceptions" title="Permalink to this headline">¶</a></h2>
-<dl class="class">
-<dt id="mongoalchemy.fields.BadValueException">
-<em class="property">class </em><tt class="descclassname">mongoalchemy.fields.</tt><tt class="descname">BadValueException</tt><big>(</big><em>name</em>, <em>value</em>, <em>reason</em>, <em>cause=None</em><big>)</big><a class="headerlink" href="#mongoalchemy.fields.BadValueException" title="Permalink to this definition">¶</a></dt>
-<dd><p>An exception which is raised when there is something wrong with a
-value</p>
-</dd></dl>
-
-<dl class="class">
-<dt id="mongoalchemy.fields.BadFieldSpecification">
-<em class="property">class </em><tt class="descclassname">mongoalchemy.fields.</tt><tt class="descname">BadFieldSpecification</tt><a class="headerlink" href="#mongoalchemy.fields.BadFieldSpecification" title="Permalink to this definition">¶</a></dt>
-<dd><p>An exception that is raised when there is an error in creating a
-field</p>
-</dd></dl>
-
</div>
</div>
@@ -859,7 +870,6 @@
<li><a class="reference internal" href="#mapping-type-fields">Mapping Type Fields</a></li>
<li><a class="reference internal" href="#document-field-objects">Document Field Objects</a></li>
<li><a class="reference internal" href="#computed-field-objects">Computed Field Objects</a></li>
-<li><a class="reference internal" href="#exceptions">Exceptions</a></li>
</ul>
</li>
</ul>
@@ -907,7 +917,7 @@
<li class="right" >
<a href="document.html" title="document"
>previous</a> |</li>
- <li><a href="../../index.html">MongoAlchemy v0.5 documentation</a> &raquo;</li>
+ <li><a href="../../index.html">MongoAlchemy v0.6 documentation</a> &raquo;</li>
<li><a href="../index.html" >API documentation</a> &raquo;</li>
<li><a href="index.html" >Schema — Document-Object Mapper and Schema Definitions</a> &raquo;</li>
</ul>
View
12 docs/build/html/api/schema/index.html
@@ -7,13 +7,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Schema — Document-Object Mapper and Schema Definitions &mdash; MongoAlchemy v0.5 documentation</title>
+ <title>Schema — Document-Object Mapper and Schema Definitions &mdash; MongoAlchemy v0.6 documentation</title>
<link rel="stylesheet" href="../../_static/default.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../',
- VERSION: '0.5',
+ VERSION: '0.6',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@@ -22,7 +22,7 @@
<script type="text/javascript" src="../../_static/jquery.js"></script>
<script type="text/javascript" src="../../_static/underscore.js"></script>
<script type="text/javascript" src="../../_static/doctools.js"></script>
- <link rel="top" title="MongoAlchemy v0.5 documentation" href="../../index.html" />
+ <link rel="top" title="MongoAlchemy v0.6 documentation" href="../../index.html" />
<link rel="up" title="API documentation" href="../index.html" />
<link rel="next" title="document" href="document.html" />
<link rel="prev" title="Session" href="../session.html" />