32.0 KB
/srv/reproducible-results/rbuild-debian/r-b-build.ub1oUsXD/b1/sqlalchemy_1.3.22+ds1-1_i386.changes vs.
/srv/reproducible-results/rbuild-debian/r-b-build.ub1oUsXD/b2/sqlalchemy_1.3.22+ds1-1_i386.changes
534 B
Files
    
Offset 1, 5 lines modifiedOffset 1, 5 lines modified
  
1 ·8aa9964097deb3d79961600394dcd2be·2567568·doc·optional·python-sqlalchemy-doc_1.3.22+ds1-1_all.deb1 ·2bbf707c43a2a305a3aa195894d2b24c·2567540·doc·optional·python-sqlalchemy-doc_1.3.22+ds1-1_all.deb
2 ·b2cc03740fda8c79971ac65a2a30fcb6·33352·debug·optional·python3-sqlalchemy-ext-dbgsym_1.3.22+ds1-1_i386.deb2 ·b2cc03740fda8c79971ac65a2a30fcb6·33352·debug·optional·python3-sqlalchemy-ext-dbgsym_1.3.22+ds1-1_i386.deb
3 ·9b86b9d86d09f09c76edbe04efabca40·20196·python·optional·python3-sqlalchemy-ext_1.3.22+ds1-1_i386.deb3 ·9b86b9d86d09f09c76edbe04efabca40·20196·python·optional·python3-sqlalchemy-ext_1.3.22+ds1-1_i386.deb
4 ·2c510f25be018fca64077b84bbd86a8e·794976·python·optional·python3-sqlalchemy_1.3.22+ds1-1_all.deb4 ·2c510f25be018fca64077b84bbd86a8e·794976·python·optional·python3-sqlalchemy_1.3.22+ds1-1_all.deb
31.2 KB
python-sqlalchemy-doc_1.3.22+ds1-1_all.deb
452 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2020-12-30·16:25:19.000000·debian-binary1 -rw-r--r--···0········0········0········4·2020-12-30·16:25:19.000000·debian-binary
2 -rw-r--r--···0········0········0····11320·2020-12-30·16:25:19.000000·control.tar.xz2 -rw-r--r--···0········0········0····11324·2020-12-30·16:25:19.000000·control.tar.xz
3 -rw-r--r--···0········0········0··2556056·2020-12-30·16:25:19.000000·data.tar.xz3 -rw-r--r--···0········0········0··2556024·2020-12-30·16:25:19.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
30.6 KB
data.tar.xz
30.6 KB
data.tar
30.6 KB
./usr/share/doc/python-sqlalchemy-doc/html/orm/examples.html
Ordering differences only
    
Offset 215, 23 lines modifiedOffset 215, 23 lines modified
215 </div>215 </div>
216 <div·class="section"·id="module-examples.association">216 <div·class="section"·id="module-examples.association">
217 <span·id="associations"></span><span·id="examples-associations"></span><h3>Associations<a·class="headerlink"·href="#module-examples.association"·title="Permalink·to·this·headline">¶</a></h3>217 <span·id="associations"></span><span·id="examples-associations"></span><h3>Associations<a·class="headerlink"·href="#module-examples.association"·title="Permalink·to·this·headline">¶</a></h3>
218 <p>Examples·illustrating·the·usage·of·the·“association·object”·pattern,218 <p>Examples·illustrating·the·usage·of·the·“association·object”·pattern,
219 where·an·intermediary·class·mediates·the·relationship·between·two219 where·an·intermediary·class·mediates·the·relationship·between·two
220 classes·that·are·associated·in·a·many-to-many·pattern.</p>220 classes·that·are·associated·in·a·many-to-many·pattern.</p>
221 <p>Listing·of·files:<ul·class="simple">221 <p>Listing·of·files:<ul·class="simple">
 222 <li><p><p><a·class="reference·external"·href="../_modules/examples/association/basic_association.html">basic_association.py</a>·-·Illustrate·a·many-to-many·relationship·between·an
 223 “Order”·and·a·collection·of·“Item”·objects,·associating·a·purchase·price
 224 with·each·via·an·association·object·called·“OrderItem”</p>
 225 </p></li>
222 <li><p><p><a·class="reference·external"·href="../_modules/examples/association/dict_of_sets_with_default.html">dict_of_sets_with_default.py</a>·-·An·advanced·association·proxy·example·which226 <li><p><p><a·class="reference·external"·href="../_modules/examples/association/dict_of_sets_with_default.html">dict_of_sets_with_default.py</a>·-·An·advanced·association·proxy·example·which
223 illustrates·nesting·of·association·proxies·to·produce·multi-level·Python227 illustrates·nesting·of·association·proxies·to·produce·multi-level·Python
224 collections,·in·this·case·a·dictionary·with·string·keys·and·sets·of·integers228 collections,·in·this·case·a·dictionary·with·string·keys·and·sets·of·integers
225 as·values,·which·conceal·the·underlying·mapped·classes.</p>229 as·values,·which·conceal·the·underlying·mapped·classes.</p>
226 </p></li>230 </p></li>
227 <li><p><p><a·class="reference·external"·href="../_modules/examples/association/basic_association.html">basic_association.py</a>·-·Illustrate·a·many-to-many·relationship·between·an 
228 “Order”·and·a·collection·of·“Item”·objects,·associating·a·purchase·price 
229 with·each·via·an·association·object·called·“OrderItem”</p> 
230 </p></li> 
231 <li><p><p><a·class="reference·external"·href="../_modules/examples/association/proxied_association.html">proxied_association.py</a>·-·Same·example·as·basic_association,·adding·in231 <li><p><p><a·class="reference·external"·href="../_modules/examples/association/proxied_association.html">proxied_association.py</a>·-·Same·example·as·basic_association,·adding·in
232 usage·of·<a·class="reference·internal"·href="extensions/associationproxy.html#module-sqlalchemy.ext.associationproxy"·title="sqlalchemy.ext.associationproxy"><code·class="xref·py·py-mod·docutils·literal·notranslate"><span·class="pre">sqlalchemy.ext.associationproxy</span></code></a>·to·make·explicit·references232 usage·of·<a·class="reference·internal"·href="extensions/associationproxy.html#module-sqlalchemy.ext.associationproxy"·title="sqlalchemy.ext.associationproxy"><code·class="xref·py·py-mod·docutils·literal·notranslate"><span·class="pre">sqlalchemy.ext.associationproxy</span></code></a>·to·make·explicit·references
233 to·<code·class="docutils·literal·notranslate"><span·class="pre">OrderItem</span></code>·optional.</p>233 to·<code·class="docutils·literal·notranslate"><span·class="pre">OrderItem</span></code>·optional.</p>
234 </p></li>234 </p></li>
235 </ul>235 </ul>
236 </p>236 </p>
237 </div>237 </div>
Offset 279, 29 lines modifiedOffset 279, 29 lines modified
279 <li><p><p><a·class="reference·external"·href="../_modules/examples/generic_associations/discriminator_on_association.html">discriminator_on_association.py</a>·-·Illustrates·a·mixin·which·provides·a·generic·association279 <li><p><p><a·class="reference·external"·href="../_modules/examples/generic_associations/discriminator_on_association.html">discriminator_on_association.py</a>·-·Illustrates·a·mixin·which·provides·a·generic·association
280 using·a·single·target·table·and·a·single·association·table,280 using·a·single·target·table·and·a·single·association·table,
281 referred·to·by·all·parent·tables.··The·association·table281 referred·to·by·all·parent·tables.··The·association·table
282 contains·a·“discriminator”·column·which·determines·what·type·of282 contains·a·“discriminator”·column·which·determines·what·type·of
283 parent·object·associates·to·each·particular·row·in·the·association283 parent·object·associates·to·each·particular·row·in·the·association
284 table.</p>284 table.</p>
285 </p></li>285 </p></li>
286 <li><p><p><a·class="reference·external"·href="../_modules/examples/generic_associations/table_per_association.html">table_per_association.py</a>·-·Illustrates·a·mixin·which·provides·a·generic·association286 <li><p><p><a·class="reference·external"·href="../_modules/examples/generic_associations/table_per_related.html">table_per_related.py</a>·-·Illustrates·a·generic·association·which·persists·association
 287 objects·within·individual·tables,·each·one·generated·to·persist
 288 those·objects·on·behalf·of·a·particular·parent·class.</p>
287 via·a·individually·generated·association·tables·for·each·parent·class. 
288 The·associated·objects·themselves·are·persisted·in·a·single·table 
289 shared·among·all·parents.</p> 
290 </p></li>289 </p></li>
291 <li><p><p><a·class="reference·external"·href="../_modules/examples/generic_associations/generic_fk.html">generic_fk.py</a>·-·Illustrates·a·so-called·“generic·foreign·key”,·in·a·similar·fashion290 <li><p><p><a·class="reference·external"·href="../_modules/examples/generic_associations/generic_fk.html">generic_fk.py</a>·-·Illustrates·a·so-called·“generic·foreign·key”,·in·a·similar·fashion
292 to·that·of·popular·frameworks·such·as·Django,·ROR,·etc.··This291 to·that·of·popular·frameworks·such·as·Django,·ROR,·etc.··This
293 approach·bypasses·standard·referential·integrity292 approach·bypasses·standard·referential·integrity
294 practices,·in·that·the·“foreign·key”·column·is·not·actually293 practices,·in·that·the·“foreign·key”·column·is·not·actually
295 constrained·to·refer·to·any·particular·table;·instead,294 constrained·to·refer·to·any·particular·table;·instead,
296 in-application·logic·is·used·to·determine·which·table·is·referenced.</p>295 in-application·logic·is·used·to·determine·which·table·is·referenced.</p>
297 </p></li>296 </p></li>
298 <li><p><p><a·class="reference·external"·href="../_modules/examples/generic_associations/table_per_related.html">table_per_related.py</a>·-·Illustrates·a·generic·association·which·persists·association 
299 objects·within·individual·tables,·each·one·generated·to·persist 
300 those·objects·on·behalf·of·a·particular·parent·class.</p>297 <li><p><p><a·class="reference·external"·href="../_modules/examples/generic_associations/table_per_association.html">table_per_association.py</a>·-·Illustrates·a·mixin·which·provides·a·generic·association
 298 via·a·individually·generated·association·tables·for·each·parent·class.
 299 The·associated·objects·themselves·are·persisted·in·a·single·table
 300 shared·among·all·parents.</p>
301 </p></li>301 </p></li>
302 </ul>302 </ul>
303 </p>303 </p>
304 </div>304 </div>
305 <div·class="section"·id="module-examples.large_collection">305 <div·class="section"·id="module-examples.large_collection">
306 <span·id="large-collections"></span><h3>Large·Collections<a·class="headerlink"·href="#module-examples.large_collection"·title="Permalink·to·this·headline">¶</a></h3>306 <span·id="large-collections"></span><h3>Large·Collections<a·class="headerlink"·href="#module-examples.large_collection"·title="Permalink·to·this·headline">¶</a></h3>
307 <p>Large·collection·example.</p>307 <p>Large·collection·example.</p>
Offset 389, 24 lines modifiedOffset 389, 24 lines modified
389 <div·class="admonition·seealso">389 <div·class="admonition·seealso">
390 <p·class="admonition-title">See·also</p>390 <p·class="admonition-title">See·also</p>
391 <p><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>391 <p><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>
392 </div>392 </div>
393 <div·class="section"·id="file-listing">393 <div·class="section"·id="file-listing">
394 <h4>File·Listing<a·class="headerlink"·href="#file-listing"·title="Permalink·to·this·headline">¶</a></h4>394 <h4>File·Listing<a·class="headerlink"·href="#file-listing"·title="Permalink·to·this·headline">¶</a></h4>
395 <p>Listing·of·files:<ul·class="simple">395 <p>Listing·of·files:<ul·class="simple">
396 <li><p><p><a·class="reference·external"·href="../_modules/examples/performance/__main__.html">__main__.py</a>·-·Allows·the·examples/performance·package·to·be·run·as·a·script.</p> 
397 </p></li> 
398 <li><p><p><a·class="reference·external"·href="../_modules/examples/performance/short_selects.html">short_selects.py</a>·-·This·series·of·tests·illustrates·different·ways·to·SELECT·a·single 
399 record·by·primary·key</p> 
400 </p></li> 
401 <li><p><p><a·class="reference·external"·href="../_modules/examples/performance/single_inserts.html">single_inserts.py</a>·-·In·this·series·of·tests,·we’re·looking·at·a·method·that·inserts·a·row396 <li><p><p><a·class="reference·external"·href="../_modules/examples/performance/single_inserts.html">single_inserts.py</a>·-·In·this·series·of·tests,·we’re·looking·at·a·method·that·inserts·a·row
402 within·a·distinct·transaction,·and·afterwards·returns·to·essentially·a397 within·a·distinct·transaction,·and·afterwards·returns·to·essentially·a
403 “closed”·state.···This·would·be·analogous·to·an·API·call·that·starts·up398 “closed”·state.···This·would·be·analogous·to·an·API·call·that·starts·up
404 a·database·connection,·inserts·the·row,·commits·and·closes.</p>399 a·database·connection,·inserts·the·row,·commits·and·closes.</p>
405 </p></li>400 </p></li>
 401 <li><p><p><a·class="reference·external"·href="../_modules/examples/performance/short_selects.html">short_selects.py</a>·-·This·series·of·tests·illustrates·different·ways·to·SELECT·a·single
 402 record·by·primary·key</p>
 403 </p></li>
 404 <li><p><p><a·class="reference·external"·href="../_modules/examples/performance/__main__.html">__main__.py</a>·-·Allows·the·examples/performance·package·to·be·run·as·a·script.</p>
 405 </p></li>
406 <li><p><p><a·class="reference·external"·href="../_modules/examples/performance/bulk_inserts.html">bulk_inserts.py</a>·-·This·series·of·tests·illustrates·different·ways·to·INSERT·a·large·number406 <li><p><p><a·class="reference·external"·href="../_modules/examples/performance/bulk_inserts.html">bulk_inserts.py</a>·-·This·series·of·tests·illustrates·different·ways·to·INSERT·a·large·number
407 of·rows·in·bulk.</p>407 of·rows·in·bulk.</p>
408 </p></li>408 </p></li>
409 <li><p><p><a·class="reference·external"·href="../_modules/examples/performance/large_resultsets.html">large_resultsets.py</a>·-·In·this·series·of·tests,·we·are·looking·at·time·to·load·a·large·number409 <li><p><p><a·class="reference·external"·href="../_modules/examples/performance/large_resultsets.html">large_resultsets.py</a>·-·In·this·series·of·tests,·we·are·looking·at·time·to·load·a·large·number
410 of·very·small·and·simple·rows.</p>410 of·very·small·and·simple·rows.</p>
411 </p></li>411 </p></li>
412 <li><p><p><a·class="reference·external"·href="../_modules/examples/performance/bulk_updates.html">bulk_updates.py</a>·-·This·series·of·tests·illustrates·different·ways·to·UPDATE·a·large·number412 <li><p><p><a·class="reference·external"·href="../_modules/examples/performance/bulk_updates.html">bulk_updates.py</a>·-·This·series·of·tests·illustrates·different·ways·to·UPDATE·a·large·number
Offset 557, 22 lines modifiedOffset 557, 22 lines modified
557 </div>557 </div>
558 <div·class="section"·id="module-examples.join_conditions">558 <div·class="section"·id="module-examples.join_conditions">
559 <span·id="relationship-join-conditions"></span><span·id="examples-relationships"></span><h3>Relationship·Join·Conditions<a·class="headerlink"·href="#module-examples.join_conditions"·title="Permalink·to·this·headline">¶</a></h3>559 <span·id="relationship-join-conditions"></span><span·id="examples-relationships"></span><h3>Relationship·Join·Conditions<a·class="headerlink"·href="#module-examples.join_conditions"·title="Permalink·to·this·headline">¶</a></h3>
560 <p>Examples·of·various·<a·class="reference·internal"·href="relationship_api.html#sqlalchemy.orm.relationship"·title="sqlalchemy.orm.relationship"><code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">relationship()</span></code></a>·configurations,560 <p>Examples·of·various·<a·class="reference·internal"·href="relationship_api.html#sqlalchemy.orm.relationship"·title="sqlalchemy.orm.relationship"><code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">relationship()</span></code></a>·configurations,
561 which·make·use·of·the·<code·class="docutils·literal·notranslate"><span·class="pre">primaryjoin</span></code>·argument·to·compose·special·types561 which·make·use·of·the·<code·class="docutils·literal·notranslate"><span·class="pre">primaryjoin</span></code>·argument·to·compose·special·types
562 of·join·conditions.</p>562 of·join·conditions.</p>
563 <p>Listing·of·files:<ul·class="simple">563 <p>Listing·of·files:<ul·class="simple">
564 <li><p><p><a·class="reference·external"·href="../_modules/examples/join_conditions/cast.html">cast.py</a>·-·Illustrate·a·<a·class="reference·internal"·href="relationship_api.html#sqlalchemy.orm.relationship"·title="sqlalchemy.orm.relationship"><code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">relationship()</span></code></a>·that·joins·two·columns·where·those 
565 columns·are·not·of·the·same·type,·and·a·CAST·must·be·used·on·the·SQL 
566 side·in·order·to·match·them.</p> 
567 </p></li> 
568 <li><p><p><a·class="reference·external"·href="../_modules/examples/join_conditions/threeway.html">threeway.py</a>·-·Illustrate·a·“three·way·join”·-·where·a·primary·table·joins·to·a·remote564 <li><p><p><a·class="reference·external"·href="../_modules/examples/join_conditions/threeway.html">threeway.py</a>·-·Illustrate·a·“three·way·join”·-·where·a·primary·table·joins·to·a·remote
569 table·via·an·association·table,·but·then·the·primary·table·also·needs565 table·via·an·association·table,·but·then·the·primary·table·also·needs
570 to·refer·to·some·columns·in·the·remote·table·directly.</p>566 to·refer·to·some·columns·in·the·remote·table·directly.</p>
571 </p></li>567 </p></li>
 568 <li><p><p><a·class="reference·external"·href="../_modules/examples/join_conditions/cast.html">cast.py</a>·-·Illustrate·a·<a·class="reference·internal"·href="relationship_api.html#sqlalchemy.orm.relationship"·title="sqlalchemy.orm.relationship"><code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">relationship()</span></code></a>·that·joins·two·columns·where·those
 569 columns·are·not·of·the·same·type,·and·a·CAST·must·be·used·on·the·SQL
 570 side·in·order·to·match·them.</p>
 571 </p></li>
572 </ul>572 </ul>
573 </p>573 </p>
574 </div>574 </div>
575 <div·class="section"·id="module-examples.space_invaders">575 <div·class="section"·id="module-examples.space_invaders">
576 <span·id="space-invaders"></span><span·id="examples-spaceinvaders"></span><h3>Space·Invaders<a·class="headerlink"·href="#module-examples.space_invaders"·title="Permalink·to·this·headline">¶</a></h3>576 <span·id="space-invaders"></span><span·id="examples-spaceinvaders"></span><h3>Space·Invaders<a·class="headerlink"·href="#module-examples.space_invaders"·title="Permalink·to·this·headline">¶</a></h3>
577 <p>A·Space·Invaders·game·using·SQLite·as·the·state·machine.</p>577 <p>A·Space·Invaders·game·using·SQLite·as·the·state·machine.</p>
578 <p>Originally·developed·in·2012.··Adapted·to·work·in·Python·3.</p>578 <p>Originally·developed·in·2012.··Adapted·to·work·in·Python·3.</p>
Offset 719, 31 lines modifiedOffset 719, 31 lines modified
719 <p>Several·examples·that·illustrate·the·technique·of·intercepting·changes719 <p>Several·examples·that·illustrate·the·technique·of·intercepting·changes
720 that·would·be·first·interpreted·as·an·UPDATE·on·a·row,·and·instead·turning720 that·would·be·first·interpreted·as·an·UPDATE·on·a·row,·and·instead·turning
721 it·into·an·INSERT·of·a·new·row,·leaving·the·previous·row·intact·as721 it·into·an·INSERT·of·a·new·row,·leaving·the·previous·row·intact·as
722 a·historical·version.</p>722 a·historical·version.</p>
723 <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·a723 <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
724 history·row·to·a·separate·history·table.</p>724 history·row·to·a·separate·history·table.</p>
725 <p>Listing·of·files:<ul·class="simple">725 <p>Listing·of·files:<ul·class="simple">
Max diff block lines reached; 7747/19405 bytes (39.92%) of diff not shown.
11.5 KB
html2text {}
    
Offset 75, 21 lines modifiedOffset 75, 21 lines modified
75 Listing·of·files:75 Listing·of·files:
76 ····*·adjacency_list.py76 ····*·adjacency_list.py
77 ****·Associations¶·****77 ****·Associations¶·****
78 Examples·illustrating·the·usage·of·the·“association·object”·pattern,·where·an78 Examples·illustrating·the·usage·of·the·“association·object”·pattern,·where·an
79 intermediary·class·mediates·the·relationship·between·two·classes·that·are79 intermediary·class·mediates·the·relationship·between·two·classes·that·are
80 associated·in·a·many-to-many·pattern.80 associated·in·a·many-to-many·pattern.
81 Listing·of·files:81 Listing·of·files:
82 ····*·dict_of_sets_with_default.py·-·An·advanced·association·proxy·example 
83 ······which·illustrates·nesting·of·association·proxies·to·produce·multi-level 
84 ······Python·collections,·in·this·case·a·dictionary·with·string·keys·and·sets 
85 ······of·integers·as·values,·which·conceal·the·underlying·mapped·classes. 
86 basic_association.py·-·Illustrate·a·many-to-many·relationship·between·an82 ····*·basic_association.py·-·Illustrate·a·many-to-many·relationship·between·an
87 “Order”·and·a·collection·of·“Item”·objects,·associating·a·purchase·price·with83 ······“Order”·and·a·collection·of·“Item”·objects,·associating·a·purchase·price
88 each·via·an·association·object·called·“OrderItem”84 ······with·each·via·an·association·object·called·“OrderItem”
 85 dict_of_sets_with_default.py·-·An·advanced·association·proxy·example·which
 86 illustrates·nesting·of·association·proxies·to·produce·multi-level·Python
 87 collections,·in·this·case·a·dictionary·with·string·keys·and·sets·of·integers·as
 88 values,·which·conceal·the·underlying·mapped·classes.
89 proxied_association.py·-·Same·example·as·basic_association,·adding·in·usage·of89 proxied_association.py·-·Same·example·as·basic_association,·adding·in·usage·of
90 sqlalchemy.ext.associationproxy·to·make·explicit·references·to·OrderItem90 sqlalchemy.ext.associationproxy·to·make·explicit·references·to·OrderItem
91 optional.91 optional.
92 ****·Directed·Graphs¶·****92 ****·Directed·Graphs¶·****
93 An·example·of·persistence·for·a·directed·graph·structure.·The·graph·is·stored93 An·example·of·persistence·for·a·directed·graph·structure.·The·graph·is·stored
94 as·a·collection·of·edges,·each·referencing·both·a·“lower”·and·an·“upper”·node94 as·a·collection·of·edges,·each·referencing·both·a·“lower”·and·an·“upper”·node
95 in·a·table·of·nodes.·Basic·persistence·and·querying·for·lower-·and·upper-95 in·a·table·of·nodes.·Basic·persistence·and·querying·for·lower-·and·upper-
Offset 119, 26 lines modifiedOffset 119, 26 lines modified
119 with_SQLAlchemy.119 with_SQLAlchemy.
120 Listing·of·files:120 Listing·of·files:
121 ····*·discriminator_on_association.py·-·Illustrates·a·mixin·which·provides·a121 ····*·discriminator_on_association.py·-·Illustrates·a·mixin·which·provides·a
122 ······generic·association·using·a·single·target·table·and·a·single·association122 ······generic·association·using·a·single·target·table·and·a·single·association
123 ······table,·referred·to·by·all·parent·tables.·The·association·table·contains·a123 ······table,·referred·to·by·all·parent·tables.·The·association·table·contains·a
124 ······“discriminator”·column·which·determines·what·type·of·parent·object124 ······“discriminator”·column·which·determines·what·type·of·parent·object
125 ······associates·to·each·particular·row·in·the·association·table.125 ······associates·to·each·particular·row·in·the·association·table.
 126 table_per_related.py·-·Illustrates·a·generic·association·which·persists
 127 association·objects·within·individual·tables,·each·one·generated·to·persist
 128 those·objects·on·behalf·of·a·particular·parent·class.
126 table_per_association.py·-·Illustrates·a·mixin·which·provides·a·generic 
127 association·via·a·individually·generated·association·tables·for·each·parent 
128 class.·The·associated·objects·themselves·are·persisted·in·a·single·table·shared 
129 among·all·parents. 
130 generic_fk.py·-·Illustrates·a·so-called·“generic·foreign·key”,·in·a·similar129 generic_fk.py·-·Illustrates·a·so-called·“generic·foreign·key”,·in·a·similar
131 fashion·to·that·of·popular·frameworks·such·as·Django,·ROR,·etc.·This·approach130 fashion·to·that·of·popular·frameworks·such·as·Django,·ROR,·etc.·This·approach
132 bypasses·standard·referential·integrity·practices,·in·that·the·“foreign·key”131 bypasses·standard·referential·integrity·practices,·in·that·the·“foreign·key”
133 column·is·not·actually·constrained·to·refer·to·any·particular·table;·instead,132 column·is·not·actually·constrained·to·refer·to·any·particular·table;·instead,
134 in-application·logic·is·used·to·determine·which·table·is·referenced.133 in-application·logic·is·used·to·determine·which·table·is·referenced.
135 table_per_related.py·-·Illustrates·a·generic·association·which·persists 
136 association·objects·within·individual·tables,·each·one·generated·to·persist 
137 those·objects·on·behalf·of·a·particular·parent·class.134 table_per_association.py·-·Illustrates·a·mixin·which·provides·a·generic
 135 association·via·a·individually·generated·association·tables·for·each·parent
 136 class.·The·associated·objects·themselves·are·persisted·in·a·single·table·shared
 137 among·all·parents.
138 ****·Large·Collections¶·****138 ****·Large·Collections¶·****
139 Large·collection·example.139 Large·collection·example.
140 Illustrates·the·options·to·use·with·relationship()·when·the·list·of·related140 Illustrates·the·options·to·use·with·relationship()·when·the·list·of·related
141 objects·is·very·large,·including:141 objects·is·very·large,·including:
142 ····*·“dynamic”·relationships·which·query·slices·of·data·as·accessed142 ····*·“dynamic”·relationships·which·query·slices·of·data·as·accessed
143 ····*·how·to·use·ON·DELETE·CASCADE·in·conjunction·with·passive_deletes=True·to143 ····*·how·to·use·ON·DELETE·CASCADE·in·conjunction·with·passive_deletes=True·to
144 ······greatly·improve·the·performance·of·related·collection·deletion.144 ······greatly·improve·the·performance·of·related·collection·deletion.
Offset 196, 22 lines modifiedOffset 196, 22 lines modified
196 $·python·-m·examples.performance·bulk_inserts·\196 $·python·-m·examples.performance·bulk_inserts·\
197 ····--dburl·mysql+mysqldb://scott:tiger@localhost/test·\197 ····--dburl·mysql+mysqldb://scott:tiger@localhost/test·\
198 ····--profile·--num·1000198 ····--profile·--num·1000
199 See·also199 See·also
200 How_can_I_profile_a_SQLAlchemy_powered_application?200 How_can_I_profile_a_SQLAlchemy_powered_application?
201 ***·File·Listing¶·***201 ***·File·Listing¶·***
202 Listing·of·files:202 Listing·of·files:
203 ····*·__main__.py·-·Allows·the·examples/performance·package·to·be·run·as·a 
204 ······script.203 ····*·single_inserts.py·-·In·this·series·of·tests,·were·looking·at·a·method
 204 ······that·inserts·a·row·within·a·distinct·transaction,·and·afterwards·returns
 205 ······to·essentially·a·“closed”·state.·This·would·be·analogous·to·an·API·call
 206 ······that·starts·up·a·database·connection,·inserts·the·row,·commits·and
 207 ······closes.
205 short_selects.py·-·This·series·of·tests·illustrates·different·ways·to·SELECT·a208 short_selects.py·-·This·series·of·tests·illustrates·different·ways·to·SELECT·a
206 single·record·by·primary·key209 single·record·by·primary·key
 210 __main__.py·-·Allows·the·examples/performance·package·to·be·run·as·a·script.
207 single_inserts.py·-·In·this·series·of·tests,·we’re·looking·at·a·method·that 
208 inserts·a·row·within·a·distinct·transaction,·and·afterwards·returns·to 
209 essentially·a·“closed”·state.·This·would·be·analogous·to·an·API·call·that 
210 starts·up·a·database·connection,·inserts·the·row,·commits·and·closes. 
211 bulk_inserts.py·-·This·series·of·tests·illustrates·different·ways·to·INSERT·a211 bulk_inserts.py·-·This·series·of·tests·illustrates·different·ways·to·INSERT·a
212 large·number·of·rows·in·bulk.212 large·number·of·rows·in·bulk.
213 large_resultsets.py·-·In·this·series·of·tests,·we·are·looking·at·time·to·load·a213 large_resultsets.py·-·In·this·series·of·tests,·we·are·looking·at·time·to·load·a
214 large·number·of·very·small·and·simple·rows.214 large·number·of·very·small·and·simple·rows.
215 bulk_updates.py·-·This·series·of·tests·illustrates·different·ways·to·UPDATE·a215 bulk_updates.py·-·This·series·of·tests·illustrates·different·ways·to·UPDATE·a
216 large·number·of·rows·in·bulk.216 large·number·of·rows·in·bulk.
217 ***·Running·all·tests·with·time¶·***217 ***·Running·all·tests·with·time¶·***
Offset 354, 20 lines modifiedOffset 354, 20 lines modified
354 total·time·2.754592·sec354 total·time·2.754592·sec
355 test_subqueryload·:·load·everything,·subquery·eager·loading.·(1000·iterations);355 test_subqueryload·:·load·everything,·subquery·eager·loading.·(1000·iterations);
356 total·time·2.977696·sec356 total·time·2.977696·sec
357 ****·Relationship·Join·Conditions¶·****357 ****·Relationship·Join·Conditions¶·****
358 Examples·of·various·relationship()·configurations,·which·make·use·of·the358 Examples·of·various·relationship()·configurations,·which·make·use·of·the
359 primaryjoin·argument·to·compose·special·types·of·join·conditions.359 primaryjoin·argument·to·compose·special·types·of·join·conditions.
360 Listing·of·files:360 Listing·of·files:
 361 ····*·threeway.py·-·Illustrate·a·“three·way·join”·-·where·a·primary·table·joins
 362 ······to·a·remote·table·via·an·association·table,·but·then·the·primary·table
 363 ······also·needs·to·refer·to·some·columns·in·the·remote·table·directly.
361 ····*·cast.py·-·Illustrate·a·relationship()·that·joins·two·columns·where·those364 cast.py·-·Illustrate·a·relationship()·that·joins·two·columns·where·those
362 ······columns·are·not·of·the·same·type,·and·a·CAST·must·be·used·on·the·SQL·side365 columns·are·not·of·the·same·type,·and·a·CAST·must·be·used·on·the·SQL·side·in
363 ······in·order·to·match·them.366 order·to·match·them.
364 threeway.py·-·Illustrate·a·“three·way·join”·-·where·a·primary·table·joins·to·a 
365 remote·table·via·an·association·table,·but·then·the·primary·table·also·needs·to 
366 refer·to·some·columns·in·the·remote·table·directly. 
367 ****·Space·Invaders¶·****367 ****·Space·Invaders¶·****
368 A·Space·Invaders·game·using·SQLite·as·the·state·machine.368 A·Space·Invaders·game·using·SQLite·as·the·state·machine.
369 Originally·developed·in·2012.·Adapted·to·work·in·Python·3.369 Originally·developed·in·2012.·Adapted·to·work·in·Python·3.
370 Runs·in·a·textual·console·using·ASCII·art.370 Runs·in·a·textual·console·using·ASCII·art.
371 [orm/space_invaders.jpg]371 [orm/space_invaders.jpg]
372 To·run:372 To·run:
373 python·-m·examples.space_invaders.space_invaders373 python·-m·examples.space_invaders.space_invaders
Offset 481, 27 lines modifiedOffset 481, 28 lines modified
481 Several·examples·that·illustrate·the·technique·of·intercepting·changes·that481 Several·examples·that·illustrate·the·technique·of·intercepting·changes·that
482 would·be·first·interpreted·as·an·UPDATE·on·a·row,·and·instead·turning·it·into482 would·be·first·interpreted·as·an·UPDATE·on·a·row,·and·instead·turning·it·into
483 an·INSERT·of·a·new·row,·leaving·the·previous·row·intact·as·a·historical483 an·INSERT·of·a·new·row,·leaving·the·previous·row·intact·as·a·historical
484 version.484 version.
485 Compare·to·the·Versioning_with_a_History_Table·example·which·writes·a·history485 Compare·to·the·Versioning_with_a_History_Table·example·which·writes·a·history
486 row·to·a·separate·history·table.486 row·to·a·separate·history·table.
487 Listing·of·files:487 Listing·of·files:
 488 ····*·versioned_update_old_row.py·-·Illustrates·the·same·UPDATE·into·INSERT
 489 ······technique·of·versioned_rows.py,·but·also·emits·an·UPDATE·on·the·old·row
 490 ······to·affect·a·change·in·timestamp.·Also·includes·a
 491 ······QueryEvents.before_compile()·hook·to·limit·queries·to·only·the·most
 492 ······recent·version.
488 ····*·versioned_rows.py·-·Illustrates·a·method·to·intercept·changes·on·objects, 
489 ······turning·an·UPDATE·statement·on·a·single·row·into·an·INSERT·statement,·so 
490 ······that·a·new·row·is·inserted·with·the·new·data,·keeping·the·old·row·intact. 
491 versioned_map.py·-·A·variant·of·the·versioned_rows·example·built·around·the 
Max diff block lines reached; 3682/11743 bytes (31.35%) of diff not shown.