~ubuntu-branches/debian/jessie/sqlalchemy/jessie

« back to all changes in this revision

Viewing changes to doc/orm/extensions/horizontal_shard.html

  • Committer: Package Import Robot
  • Author(s): Piotr Ożarowski, Jakub Wilk, Piotr Ożarowski
  • Date: 2013-07-06 20:53:52 UTC
  • mfrom: (1.4.23) (16.1.17 experimental)
  • Revision ID: package-import@ubuntu.com-20130706205352-ryppl1eto3illd79
Tags: 0.8.2-1
[ Jakub Wilk ]
* Use canonical URIs for Vcs-* fields.

[ Piotr Ożarowski ]
* New upstream release
* Upload to unstable
* Build depend on python3-all instead of -dev, extensions are not built for
  Python 3.X 

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
    
11
11
                Horizontal Sharding
12
12
             — 
13
 
    SQLAlchemy 0.7 Documentation
 
13
    SQLAlchemy 0.8 Documentation
14
14
 
15
15
        </title>
16
16
        
20
20
    <script type="text/javascript">
21
21
      var DOCUMENTATION_OPTIONS = {
22
22
          URL_ROOT:    '../../',
23
 
          VERSION:     '0.7.9',
 
23
          VERSION:     '0.8.2',
24
24
          COLLAPSE_MODINDEX: false,
25
25
          FILE_SUFFIX: '.html'
26
26
      };
32
32
    <link rel="index" title="Index" href="../../genindex.html" />
33
33
    <link rel="search" title="Search" href="../../search.html" />
34
34
        <link rel="copyright" title="Copyright" href="../../copyright.html" />
35
 
    <link rel="top" title="SQLAlchemy 0.7 Documentation" href="../../index.html" />
 
35
    <link rel="top" title="SQLAlchemy 0.8 Documentation" href="../../index.html" />
36
36
        <link rel="up" title="ORM Extensions" href="index.html" />
37
37
        <link rel="next" title="Hybrid Attributes" href="hybrid.html" />
38
38
        <link rel="prev" title="Ordering List" href="orderinglist.html" />
55
55
 
56
56
 
57
57
<div id="docs-header">
58
 
    <h1>SQLAlchemy 0.7 Documentation</h1>
 
58
    <h1>SQLAlchemy 0.8 Documentation</h1>
59
59
 
60
60
    <div id="docs-search">
61
61
    Search:
67
67
    </div>
68
68
 
69
69
    <div id="docs-version-header">
70
 
        Release: <span class="version-num">0.7.9</span> | Release Date: October 1, 2012
 
70
        Release: <span class="version-num">0.8.2</span> | Release Date: July 3, 2013
71
71
 
72
72
 
73
73
    </div>
93
93
    </div>
94
94
 
95
95
    <div id="docs-navigation-banner">
96
 
        <a href="../../index.html">SQLAlchemy 0.7 Documentation</a>
 
96
        <a href="../../index.html">SQLAlchemy 0.8 Documentation</a>
97
97
                » <a href="../index.html" title="SQLAlchemy ORM">SQLAlchemy ORM</a>
98
98
                » <a href="index.html" title="ORM Extensions">ORM Extensions</a>
99
99
        » 
165
165
<col class="field-body" />
166
166
<tbody valign="top">
167
167
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
168
 
<li><strong>shard_chooser</strong> &#8211; A callable which, passed a Mapper, a mapped instance, and possibly a
169
 
SQL clause, returns a shard ID.  This id may be based off of the
170
 
attributes present within the object, or on some round-robin
171
 
scheme. If the scheme is based on a selection, it should set
172
 
whatever state on the instance to mark it in the future as
 
168
<li><strong>shard_chooser</strong> &#8211; A callable which, passed a Mapper, a mapped
 
169
instance, and possibly a SQL clause, returns a shard ID.  This id
 
170
may be based off of the attributes present within the object, or on
 
171
some round-robin scheme. If the scheme is based on a selection, it
 
172
should set whatever state on the instance to mark it in the future as
173
173
participating in that shard.</li>
174
 
<li><strong>id_chooser</strong> &#8211; A callable, passed a query and a tuple of identity values, which
175
 
should return a list of shard ids where the ID might reside.  The
176
 
databases will be queried in the order of this listing.</li>
177
 
<li><strong>query_chooser</strong> &#8211; For a given Query, returns the list of shard_ids where the query
178
 
should be issued.  Results from all shards returned will be combined
179
 
together into a single listing.</li>
180
 
<li><strong>shards</strong> &#8211; A dictionary of string shard names to <a class="reference internal" href="../../core/connections.html#sqlalchemy.engine.base.Engine" title="sqlalchemy.engine.base.Engine"><tt class="xref py py-class docutils literal"><span class="pre">Engine</span></tt></a>
181
 
objects.</li>
 
174
<li><strong>id_chooser</strong> &#8211; A callable, passed a query and a tuple of identity
 
175
values, which should return a list of shard ids where the ID might
 
176
reside.  The databases will be queried in the order of this listing.</li>
 
177
<li><strong>query_chooser</strong> &#8211; For a given Query, returns the list of shard_ids
 
178
where the query should be issued.  Results from all shards returned
 
179
will be combined together into a single listing.</li>
 
180
<li><strong>shards</strong> &#8211; A dictionary of string shard names
 
181
to <a class="reference internal" href="../../core/connections.html#sqlalchemy.engine.Engine" title="sqlalchemy.engine.Engine"><tt class="xref py py-class docutils literal"><span class="pre">Engine</span></tt></a> objects.</li>
182
182
</ul>
183
183
</td>
184
184
</tr>
215
215
        <a href="hybrid.html" title="next chapter">Hybrid Attributes</a>
216
216
 
217
217
    <div id="docs-copyright">
218
 
        &copy; <a href="../../copyright.html">Copyright</a> 2007-2012, the SQLAlchemy authors and contributors.
 
218
        &copy; <a href="../../copyright.html">Copyright</a> 2007-2013, the SQLAlchemy authors and contributors.
219
219
        Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
220
220
    </div>
221
221
</div>