mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
sphinx build 2012-06-09 00:19:53-07:00
This commit is contained in:
parent
58cf7d14ed
commit
4f172c877a
12 changed files with 615 additions and 216 deletions
|
@ -114,6 +114,7 @@ Enum tables
|
|||
.. dex-table:: MoveMetaCategory
|
||||
.. dex-table:: MoveTarget
|
||||
.. dex-table:: Nature
|
||||
.. dex-table:: PalParkArea
|
||||
.. dex-table:: PokemonColor
|
||||
.. dex-table:: PokemonMoveMethod
|
||||
.. dex-table:: PokemonShape
|
||||
|
@ -157,6 +158,7 @@ Association tables
|
|||
.. dex-table:: PokemonItem
|
||||
.. dex-table:: PokemonType
|
||||
.. dex-table:: TypeEfficacy
|
||||
.. dex-table:: VersionGroupPokemonMoveMethod
|
||||
.. dex-table:: VersionGroupRegion
|
||||
|
||||
Index maps
|
||||
|
@ -165,11 +167,13 @@ Index maps
|
|||
.. dex-table:: ItemGameIndex
|
||||
.. dex-table:: LocationGameIndex
|
||||
.. dex-table:: PokemonDexNumber
|
||||
.. dex-table:: PokemonFormGeneration
|
||||
.. dex-table:: PokemonGameIndex
|
||||
|
||||
Mics tables
|
||||
-----------
|
||||
|
||||
.. dex-table:: Experience
|
||||
.. dex-table:: PalPark
|
||||
.. dex-table:: StatHint
|
||||
|
||||
|
|
|
@ -79,11 +79,11 @@ div.sphinxsidebar input {
|
|||
font-size: 1em;
|
||||
}
|
||||
|
||||
div.sphinxsidebar input[type="text"] {
|
||||
div.sphinxsidebar #searchbox input[type="text"] {
|
||||
width: 170px;
|
||||
}
|
||||
|
||||
div.sphinxsidebar input[type="submit"] {
|
||||
div.sphinxsidebar #searchbox input[type="submit"] {
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
|
|
|
@ -394,6 +394,14 @@
|
|||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="main-tables.html#pokedex.db.tables.PalPark">PalPark (mapped class)</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="main-tables.html#pokedex.db.tables.PalParkArea">PalParkArea (mapped class)</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="main-tables.html#pokedex.db.tables.PokeathlonStat">PokeathlonStat (mapped class)</a>
|
||||
</dt>
|
||||
|
||||
|
@ -433,12 +441,16 @@
|
|||
<dt><a href="main-tables.html#pokedex.db.tables.PokemonForm">PokemonForm (mapped class)</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="main-tables.html#pokedex.db.tables.PokemonFormGeneration">PokemonFormGeneration (mapped class)</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="main-tables.html#pokedex.db.tables.PokemonFormPokeathlonStat">PokemonFormPokeathlonStat (mapped class)</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="main-tables.html#pokedex.db.tables.PokemonGameIndex">PokemonGameIndex (mapped class)</a>
|
||||
</dt>
|
||||
|
@ -550,6 +562,10 @@
|
|||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="main-tables.html#pokedex.db.tables.VersionGroupPokemonMoveMethod">VersionGroupPokemonMoveMethod (mapped class)</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="main-tables.html#pokedex.db.tables.VersionGroupRegion">VersionGroupRegion (mapped class)</a>
|
||||
</dt>
|
||||
|
||||
|
@ -596,7 +612,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -142,7 +142,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -250,7 +250,7 @@ use it, so naturally he can’t write instructions for it.</td></tr>
|
|||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
769
main-tables.html
769
main-tables.html
File diff suppressed because it is too large
Load diff
BIN
objects.inv
BIN
objects.inv
Binary file not shown.
|
@ -109,7 +109,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -131,6 +131,7 @@
|
|||
<li class="toctree-l3"><a class="reference internal" href="main-tables.html#dex-table-movemetacategory">MoveMetaCategory</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="main-tables.html#dex-table-movetarget">MoveTarget</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="main-tables.html#dex-table-nature">Nature</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="main-tables.html#dex-table-palparkarea">PalParkArea</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="main-tables.html#dex-table-pokemoncolor">PokemonColor</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="main-tables.html#dex-table-pokemonmovemethod">PokemonMoveMethod</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="main-tables.html#dex-table-pokemonshape">PokemonShape</a></li>
|
||||
|
@ -171,6 +172,7 @@
|
|||
<li class="toctree-l3"><a class="reference internal" href="main-tables.html#dex-table-pokemonitem">PokemonItem</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="main-tables.html#dex-table-pokemontype">PokemonType</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="main-tables.html#dex-table-typeefficacy">TypeEfficacy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="main-tables.html#dex-table-versiongrouppokemonmovemethod">VersionGroupPokemonMoveMethod</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="main-tables.html#dex-table-versiongroupregion">VersionGroupRegion</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -178,11 +180,13 @@
|
|||
<li class="toctree-l3"><a class="reference internal" href="main-tables.html#dex-table-itemgameindex">ItemGameIndex</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="main-tables.html#dex-table-locationgameindex">LocationGameIndex</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="main-tables.html#dex-table-pokemondexnumber">PokemonDexNumber</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="main-tables.html#dex-table-pokemonformgeneration">PokemonFormGeneration</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="main-tables.html#dex-table-pokemongameindex">PokemonGameIndex</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="main-tables.html#mics-tables">Mics tables</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="main-tables.html#dex-table-experience">Experience</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="main-tables.html#dex-table-palpark">PalPark</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="main-tables.html#dex-table-stathint">StatHint</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -245,7 +249,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -98,7 +98,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
16
usage.html
16
usage.html
|
@ -77,7 +77,7 @@ you’ll need to learn <a class="reference external" href="http://www.python
|
|||
arguments: it the database that <tt class="docutils literal"><span class="pre">pokedex</span> <span class="pre">load</span></tt> fills up by default. If you
|
||||
need to select another database, give its URI as the first argument.</p>
|
||||
<p>The object <a class="reference internal" href="#pokedex.db.connect" title="pokedex.db.connect"><tt class="xref py py-func docutils literal"><span class="pre">connect()</span></tt></a> gives you is actually a
|
||||
<tt class="xref py py-class docutils literal"><span class="pre">SQLAlchemy</span> <span class="pre">session</span></tt>, giving you the
|
||||
<a class="reference external" href="http://www.sqlalchemy.org/docs/orm/session.html#sqlalchemy.orm.session.Session" title="(in SQLAlchemy v0.7)"><tt class="xref py py-class docutils literal"><span class="pre">SQLAlchemy</span> <span class="pre">session</span></tt></a>, giving you the
|
||||
full power of SQLAlchemy for working with the data. We’ll cover some basics
|
||||
here, but if you intend to do some serious work, do read SQLAlchemy’s docs.</p>
|
||||
</div>
|
||||
|
@ -125,8 +125,8 @@ Fresh Water: $200
|
|||
<div class="section" id="querying">
|
||||
<h2>Querying<a class="headerlink" href="#querying" title="Permalink to this headline">¶</a></h2>
|
||||
<p>So, how do you get data from the session? You use the session’s
|
||||
<tt class="xref py py-meth docutils literal"><span class="pre">query()</span></tt> method, and give it a pokédex
|
||||
Table as an argument. This will give you a <tt class="xref py py-class docutils literal"><span class="pre">SQLAlchemy</span> <span class="pre">query</span></tt>.</p>
|
||||
<a class="reference external" href="http://www.sqlalchemy.org/docs/orm/session.html#sqlalchemy.orm.session.Session.query" title="(in SQLAlchemy v0.7)"><tt class="xref py py-meth docutils literal"><span class="pre">query()</span></tt></a> method, and give it a pokédex
|
||||
Table as an argument. This will give you a <a class="reference external" href="http://www.sqlalchemy.org/docs/orm/query.html#sqlalchemy.orm.query.Query" title="(in SQLAlchemy v0.7)"><tt class="xref py py-class docutils literal"><span class="pre">SQLAlchemy</span> <span class="pre">query</span></tt></a>.</p>
|
||||
<div class="section" id="ordering">
|
||||
<h3>Ordering<a class="headerlink" href="#ordering" title="Permalink to this headline">¶</a></h3>
|
||||
<p>As always with SQL, you should not rely on query results being in some
|
||||
|
@ -163,8 +163,8 @@ Zweilous
|
|||
<div class="section" id="filtering">
|
||||
<h3>Filtering<a class="headerlink" href="#filtering" title="Permalink to this headline">¶</a></h3>
|
||||
<p>Another major operation on queries is filtering, using the query’s
|
||||
<tt class="xref py py-meth docutils literal"><span class="pre">filter()</span></tt> or
|
||||
<tt class="xref py py-meth docutils literal"><span class="pre">filter_by()</span></tt> methods:</p>
|
||||
<a class="reference external" href="http://www.sqlalchemy.org/docs/orm/query.html#sqlalchemy.orm.query.Query.filter" title="(in SQLAlchemy v0.7)"><tt class="xref py py-meth docutils literal"><span class="pre">filter()</span></tt></a> or
|
||||
<a class="reference external" href="http://www.sqlalchemy.org/docs/orm/query.html#sqlalchemy.orm.query.Query.filter_by" title="(in SQLAlchemy v0.7)"><tt class="xref py py-meth docutils literal"><span class="pre">filter_by()</span></tt></a> methods:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span class="k">for</span> <span class="n">move</span> <span class="ow">in</span> <span class="n">session</span><span class="o">.</span><span class="n">query</span><span class="p">(</span><span class="n">tables</span><span class="o">.</span><span class="n">Move</span><span class="p">)</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">tables</span><span class="o">.</span><span class="n">Move</span><span class="o">.</span><span class="n">power</span> <span class="o">></span> <span class="mi">200</span><span class="p">):</span>
|
||||
<span class="k">print</span> <span class="n">move</span><span class="o">.</span><span class="n">name</span>
|
||||
</pre></div>
|
||||
|
@ -176,7 +176,7 @@ Zweilous
|
|||
<div class="section" id="joining">
|
||||
<h3>Joining<a class="headerlink" href="#joining" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The final operation we’ll cover here is joining other tables to the query,
|
||||
using the query’s <tt class="xref py py-meth docutils literal"><span class="pre">join()</span></tt>.
|
||||
using the query’s <a class="reference external" href="http://www.sqlalchemy.org/docs/orm/query.html#sqlalchemy.orm.query.Query.join" title="(in SQLAlchemy v0.7)"><tt class="xref py py-meth docutils literal"><span class="pre">join()</span></tt></a>.
|
||||
You will usually want to join on a relationship, such as in the following
|
||||
example:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span class="n">query</span> <span class="o">=</span> <span class="n">session</span><span class="o">.</span><span class="n">query</span><span class="p">(</span><span class="n">tables</span><span class="o">.</span><span class="n">Move</span><span class="p">)</span>
|
||||
|
@ -214,7 +214,7 @@ If you need to do more, consult the <a class="reference external" href="http://w
|
|||
<p>With the URI omitted, attempts to connect to a default SQLite database
|
||||
contained within the package directory.</p>
|
||||
<p>Calling this function also binds the metadata object to the created engine.</p>
|
||||
<p>See <tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.orm.session.Session</span></tt> for more documentation on the
|
||||
<p>See <a class="reference external" href="http://www.sqlalchemy.org/docs/orm/session.html#sqlalchemy.orm.session.Session" title="(in SQLAlchemy v0.7)"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.orm.session.Session</span></tt></a> for more documentation on the
|
||||
returned object.</p>
|
||||
</dd></dl>
|
||||
|
||||
|
@ -307,7 +307,7 @@ appropriate SQLAlchemy exception is raised.</p>
|
|||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in a new issue