| | | |
Offset 261, 18 lines modified | Offset 261, 18 lines modified |
261 | subclassing·the·<code·class="docutils·literal·notranslate"><span·class="pre">HasAddresses</span></code>·mixin,·which·ensures·that·the | 261 | subclassing·the·<code·class="docutils·literal·notranslate"><span·class="pre">HasAddresses</span></code>·mixin,·which·ensures·that·the |
262 | parent·class·is·provided·with·an·<code·class="docutils·literal·notranslate"><span·class="pre">addresses</span></code>·collection | 262 | parent·class·is·provided·with·an·<code·class="docutils·literal·notranslate"><span·class="pre">addresses</span></code>·collection |
263 | which·contains·<code·class="docutils·literal·notranslate"><span·class="pre">Address</span></code>·objects.</p> | 263 | which·contains·<code·class="docutils·literal·notranslate"><span·class="pre">Address</span></code>·objects.</p> |
264 | <p>The·<a·class="reference·external"·href="../_modules/examples/generic_associations/discriminator_on_association.html">discriminator_on_association.py</a>·and·<a·class="reference·external"·href="../_modules/examples/generic_associations/generic_fk.html">generic_fk.py</a>·scripts | 264 | <p>The·<a·class="reference·external"·href="../_modules/examples/generic_associations/discriminator_on_association.html">discriminator_on_association.py</a>·and·<a·class="reference·external"·href="../_modules/examples/generic_associations/generic_fk.html">generic_fk.py</a>·scripts |
265 | are·modernized·versions·of·recipes·presented·in·the·2007·blog·post | 265 | are·modernized·versions·of·recipes·presented·in·the·2007·blog·post |
266 | <a·class="reference·external"·href="http://techspot.zzzeek.org/2007/05/29/polymorphic-associations-with-sqlalchemy/">Polymorphic·Associations·with·SQLAlchemy</a>.</p> | 266 | <a·class="reference·external"·href="http://techspot.zzzeek.org/2007/05/29/polymorphic-associations-with-sqlalchemy/">Polymorphic·Associations·with·SQLAlchemy</a>.</p> |
267 | <p>Listing·of·files:<ul·class="simple"> | 267 | <p>Listing·of·files:<ul·class="simple"> |
| 268 | <li><a·class="reference·external"·href="../_modules/examples/generic_associations/discriminator_on_association.html">discriminator_on_association.py</a></li> |
| 269 | <li><a·class="reference·external"·href="../_modules/examples/generic_associations/table_per_related.html">table_per_related.py</a></li> |
268 | <li><a·class="reference·external"·href="../_modules/examples/generic_associations/generic_fk.html">generic_fk.py</a></li> | 270 | <li><a·class="reference·external"·href="../_modules/examples/generic_associations/generic_fk.html">generic_fk.py</a></li> |
269 | <li><a·class="reference·external"·href="../_modules/examples/generic_associations/table_per_association.html">table_per_association.py</a></li> | 271 | <li><a·class="reference·external"·href="../_modules/examples/generic_associations/table_per_association.html">table_per_association.py</a></li> |
270 | <li><a·class="reference·external"·href="../_modules/examples/generic_associations/table_per_related.html">table_per_related.py</a></li> | |
271 | <li><a·class="reference·external"·href="../_modules/examples/generic_associations/discriminator_on_association.html">discriminator_on_association.py</a></li> | |
272 | </ul> | 272 | </ul> |
273 | </p> | 273 | </p> |
274 | </div> | 274 | </div> |
275 | <div·class="section"·id="module-examples.large_collection"> | 275 | <div·class="section"·id="module-examples.large_collection"> |
276 | <span·id="large-collections"></span><h3>Large·Collections<a·class="headerlink"·href="#module-examples.large_collection"·title="Permalink·to·this·headline">¶</a></h3> | 276 | <span·id="large-collections"></span><h3>Large·Collections<a·class="headerlink"·href="#module-examples.large_collection"·title="Permalink·to·this·headline">¶</a></h3> |
277 | <p>Large·collection·example.</p> | 277 | <p>Large·collection·example.</p> |
278 | <p>Illustrates·the·options·to·use·with | 278 | <p>Illustrates·the·options·to·use·with |
Offset 357, 20 lines modified | Offset 357, 20 lines modified |
357 | <div·class="admonition·seealso"> | 357 | <div·class="admonition·seealso"> |
358 | <p·class="first·admonition-title">See·also</p> | 358 | <p·class="first·admonition-title">See·also</p> |
359 | <p·class="last"><a·class="reference·internal"·href="../faq/performance.html#faq-how-to-profile"><span·class="std·std-ref">How·can·I·profile·a·SQLAlchemy·powered·application?</span></a></p> | 359 | <p·class="last"><a·class="reference·internal"·href="../faq/performance.html#faq-how-to-profile"><span·class="std·std-ref">How·can·I·profile·a·SQLAlchemy·powered·application?</span></a></p> |
360 | </div> | 360 | </div> |
361 | <div·class="section"·id="file-listing"> | 361 | <div·class="section"·id="file-listing"> |
362 | <h4>File·Listing<a·class="headerlink"·href="#file-listing"·title="Permalink·to·this·headline">¶</a></h4> | 362 | <h4>File·Listing<a·class="headerlink"·href="#file-listing"·title="Permalink·to·this·headline">¶</a></h4> |
363 | <p>Listing·of·files:<ul·class="simple"> | 363 | <p>Listing·of·files:<ul·class="simple"> |
364 | <li><a·class="reference·external"·href="../_modules/examples/performance/bulk_updates.html">bulk_updates.py</a></li> | |
365 | <li><a·class="reference·external"·href="../_modules/examples/performance/bulk_inserts.html">bulk_inserts.py</a></li> | |
366 | <li><a·class="reference·external"·href="../_modules/examples/performance/__main__.html">__main__.py</a></li> | |
367 | <li><a·class="reference·external"·href="../_modules/examples/performance/large_resultsets.html">large_resultsets.py</a></li> | |
368 | <li><a·class="reference·external"·href="../_modules/examples/performance/single_inserts.html">single_inserts.py</a></li> | 364 | <li><a·class="reference·external"·href="../_modules/examples/performance/single_inserts.html">single_inserts.py</a></li> |
369 | <li><a·class="reference·external"·href="../_modules/examples/performance/short_selects.html">short_selects.py</a></li> | 365 | <li><a·class="reference·external"·href="../_modules/examples/performance/short_selects.html">short_selects.py</a></li> |
| 366 | <li><a·class="reference·external"·href="../_modules/examples/performance/__main__.html">__main__.py</a></li> |
| 367 | <li><a·class="reference·external"·href="../_modules/examples/performance/bulk_inserts.html">bulk_inserts.py</a></li> |
| 368 | <li><a·class="reference·external"·href="../_modules/examples/performance/large_resultsets.html">large_resultsets.py</a></li> |
| 369 | <li><a·class="reference·external"·href="../_modules/examples/performance/bulk_updates.html">bulk_updates.py</a></li> |
370 | </ul> | 370 | </ul> |
371 | </p> | 371 | </p> |
372 | </div> | 372 | </div> |
373 | <div·class="section"·id="running-all-tests-with-time"> | 373 | <div·class="section"·id="running-all-tests-with-time"> |
374 | <h4>Running·all·tests·with·time<a·class="headerlink"·href="#running-all-tests-with-time"·title="Permalink·to·this·headline">¶</a></h4> | 374 | <h4>Running·all·tests·with·time<a·class="headerlink"·href="#running-all-tests-with-time"·title="Permalink·to·this·headline">¶</a></h4> |
375 | <p>This·is·the·default·form·of·run:</p> | 375 | <p>This·is·the·default·form·of·run:</p> |
376 | <div·class="highlight-default·notranslate"><div·class="highlight"><pre><span></span>$·python·-m·examples.performance·single_inserts | 376 | <div·class="highlight-default·notranslate"><div·class="highlight"><pre><span></span>$·python·-m·examples.performance·single_inserts |
Offset 628, 16 lines modified | Offset 628, 16 lines modified |
628 | <p>Several·examples·that·illustrate·the·technique·of·intercepting·changes | 628 | <p>Several·examples·that·illustrate·the·technique·of·intercepting·changes |
629 | that·would·be·first·interpreted·as·an·UPDATE·on·a·row,·and·instead·turning | 629 | that·would·be·first·interpreted·as·an·UPDATE·on·a·row,·and·instead·turning |
630 | it·into·an·INSERT·of·a·new·row,·leaving·the·previous·row·intact·as | 630 | it·into·an·INSERT·of·a·new·row,·leaving·the·previous·row·intact·as |
631 | a·historical·version.</p> | 631 | a·historical·version.</p> |
632 | <p>Compare·to·the·<a·class="reference·internal"·href="#examples-versioned-history"><span·class="std·std-ref">Versioning·with·a·History·Table</span></a>·example·which·writes·a | 632 | <p>Compare·to·the·<a·class="reference·internal"·href="#examples-versioned-history"><span·class="std·std-ref">Versioning·with·a·History·Table</span></a>·example·which·writes·a |
633 | history·row·to·a·separate·history·table.</p> | 633 | history·row·to·a·separate·history·table.</p> |
634 | <p>Listing·of·files:<ul·class="simple"> | 634 | <p>Listing·of·files:<ul·class="simple"> |
635 | <li><a·class="reference·external"·href="../_modules/examples/versioned_rows/versioned_rows_w_versionid.html">versioned_rows_w_versionid.py</a></li> | |
636 | <li><a·class="reference·external"·href="../_modules/examples/versioned_rows/versioned_update_old_row.html">versioned_update_old_row.py</a></li> | 635 | <li><a·class="reference·external"·href="../_modules/examples/versioned_rows/versioned_update_old_row.html">versioned_update_old_row.py</a></li> |
| 636 | <li><a·class="reference·external"·href="../_modules/examples/versioned_rows/versioned_rows_w_versionid.html">versioned_rows_w_versionid.py</a></li> |
637 | <li><a·class="reference·external"·href="../_modules/examples/versioned_rows/versioned_map.html">versioned_map.py</a></li> | 637 | <li><a·class="reference·external"·href="../_modules/examples/versioned_rows/versioned_map.html">versioned_map.py</a></li> |
638 | <li><a·class="reference·external"·href="../_modules/examples/versioned_rows/versioned_rows.html">versioned_rows.py</a></li> | 638 | <li><a·class="reference·external"·href="../_modules/examples/versioned_rows/versioned_rows.html">versioned_rows.py</a></li> |
639 | </ul> | 639 | </ul> |
640 | </p> | 640 | </p> |
641 | </div> | 641 | </div> |
642 | </div> | 642 | </div> |
643 | <div·class="section"·id="module-examples.vertical"> | 643 | <div·class="section"·id="module-examples.vertical"> |
Offset 677, 31 lines modified | Offset 677, 31 lines modified |
677 | <div·class="section"·id="inheritance-mapping-recipes"> | 677 | <div·class="section"·id="inheritance-mapping-recipes"> |
678 | <span·id="examples-inheritance"></span><h2>Inheritance·Mapping·Recipes<a·class="headerlink"·href="#inheritance-mapping-recipes"·title="Permalink·to·this·headline">¶</a></h2> | 678 | <span·id="examples-inheritance"></span><h2>Inheritance·Mapping·Recipes<a·class="headerlink"·href="#inheritance-mapping-recipes"·title="Permalink·to·this·headline">¶</a></h2> |
679 | <div·class="section"·id="module-examples.inheritance"> | 679 | <div·class="section"·id="module-examples.inheritance"> |
680 | <span·id="basic-inheritance-mappings"></span><h3>Basic·Inheritance·Mappings<a·class="headerlink"·href="#module-examples.inheritance"·title="Permalink·to·this·headline">¶</a></h3> | 680 | <span·id="basic-inheritance-mappings"></span><h3>Basic·Inheritance·Mappings<a·class="headerlink"·href="#module-examples.inheritance"·title="Permalink·to·this·headline">¶</a></h3> |
681 | <p>Working·examples·of·single-table,·joined-table,·and·concrete-table | 681 | <p>Working·examples·of·single-table,·joined-table,·and·concrete-table |
682 | inheritance·as·described·in·<a·class="reference·internal"·href="inheritance.html"><span·class="std·std-ref">Mapping·Class·Inheritance·Hierarchies</span></a>.</p> | 682 | inheritance·as·described·in·<a·class="reference·internal"·href="inheritance.html"><span·class="std·std-ref">Mapping·Class·Inheritance·Hierarchies</span></a>.</p> |
683 | <p>Listing·of·files:<ul·class="simple"> | 683 | <p>Listing·of·files:<ul·class="simple"> |
| 684 | <li><a·class="reference·external"·href="../_modules/examples/inheritance/concrete.html">concrete.py</a></li> |
684 | <li><a·class="reference·external"·href="../_modules/examples/inheritance/joined.html">joined.py</a></li> | 685 | <li><a·class="reference·external"·href="../_modules/examples/inheritance/joined.html">joined.py</a></li> |
685 | <li><a·class="reference·external"·href="../_modules/examples/inheritance/single.html">single.py</a></li> | 686 | <li><a·class="reference·external"·href="../_modules/examples/inheritance/single.html">single.py</a></li> |
686 | <li><a·class="reference·external"·href="../_modules/examples/inheritance/concrete.html">concrete.py</a></li> | |
687 | </ul> | 687 | </ul> |
688 | </p> | 688 | </p> |
689 | </div> | 689 | </div> |
690 | </div> | 690 | </div> |
691 | <div·class="section"·id="special-apis"> | 691 | <div·class="section"·id="special-apis"> |
692 | <h2>Special·APIs<a·class="headerlink"·href="#special-apis"·title="Permalink·to·this·headline">¶</a></h2> | 692 | <h2>Special·APIs<a·class="headerlink"·href="#special-apis"·title="Permalink·to·this·headline">¶</a></h2> |
693 | <div·class="section"·id="module-examples.custom_attributes"> | 693 | <div·class="section"·id="module-examples.custom_attributes"> |
694 | <span·id="attribute-instrumentation"></span><span·id="examples-instrumentation"></span><h3>Attribute·Instrumentation<a·class="headerlink"·href="#module-examples.custom_attributes"·title="Permalink·to·this·headline">¶</a></h3> | 694 | <span·id="attribute-instrumentation"></span><span·id="examples-instrumentation"></span><h3>Attribute·Instrumentation<a·class="headerlink"·href="#module-examples.custom_attributes"·title="Permalink·to·this·headline">¶</a></h3> |
695 | <p>Examples·illustrating·modifications·to·SQLAlchemy’s·attribute·management | 695 | <p>Examples·illustrating·modifications·to·SQLAlchemy’s·attribute·management |
696 | system.</p> | 696 | system.</p> |
697 | <p>Listing·of·files:<ul·class="simple"> | 697 | <p>Listing·of·files:<ul·class="simple"> |
698 | <li><a·class="reference·external"·href="../_modules/examples/custom_attributes/listen_for_events.html">listen_for_events.py</a></li> | 698 | <li><a·class="reference·external"·href="../_modules/examples/custom_attributes/listen_for_events.html">listen_for_events.py</a></li> |
699 | <li><a·class="reference·external"·href="../_modules/examples/custom_attributes/custom_management.html">custom_management.py</a></li> | |
700 | <li><a·class="reference·external"·href="../_modules/examples/custom_attributes/active_column_defaults.html">active_column_defaults.py</a></li> | 699 | <li><a·class="reference·external"·href="../_modules/examples/custom_attributes/active_column_defaults.html">active_column_defaults.py</a></li> |
| 700 | <li><a·class="reference·external"·href="../_modules/examples/custom_attributes/custom_management.html">custom_management.py</a></li> |
701 | </ul> | 701 | </ul> |
702 | </p> | 702 | </p> |
703 | </div> | 703 | </div> |
704 | <div·class="section"·id="module-examples.sharding"> | 704 | <div·class="section"·id="module-examples.sharding"> |
705 | <span·id="horizontal-sharding"></span><span·id="examples-sharding"></span><h3>Horizontal·Sharding<a·class="headerlink"·href="#module-examples.sharding"·title="Permalink·to·this·headline">¶</a></h3> | 705 | <span·id="horizontal-sharding"></span><span·id="examples-sharding"></span><h3>Horizontal·Sharding<a·class="headerlink"·href="#module-examples.sharding"·title="Permalink·to·this·headline">¶</a></h3> |
706 | <p>A·basic·example·of·using·the·SQLAlchemy·Sharding·API. | 706 | <p>A·basic·example·of·using·the·SQLAlchemy·Sharding·API. |
707 | Sharding·refers·to·horizontally·scaling·data·across·multiple | 707 | Sharding·refers·to·horizontally·scaling·data·across·multiple |