38.4 KB
/srv/reproducible-results/rbuild-debian/r-b-build.sl4MhlbN/b1/sqlalchemy_2.0.40+ds1-1_amd64.changes vs.
/srv/reproducible-results/rbuild-debian/r-b-build.sl4MhlbN/b2/sqlalchemy_2.0.40+ds1-1_amd64.changes
539 B
Files
    
Offset 1, 5 lines modifiedOffset 1, 5 lines modified
  
1 ·584c2170eb8e69a8122fcb76aef95d62·3987504·doc·optional·python-sqlalchemy-doc_2.0.40+ds1-1_all.deb1 ·8ccae65721456ef5201b49ebb71f19a2·3987584·doc·optional·python-sqlalchemy-doc_2.0.40+ds1-1_all.deb
2 ·65942cf3de2e20c4a9572eaa73225b26·919108·debug·optional·python3-sqlalchemy-ext-dbgsym_2.0.40+ds1-1_amd64.deb2 ·65942cf3de2e20c4a9572eaa73225b26·919108·debug·optional·python3-sqlalchemy-ext-dbgsym_2.0.40+ds1-1_amd64.deb
3 ·cf41131ec9df4e642f6564180932566d·152968·python·optional·python3-sqlalchemy-ext_2.0.40+ds1-1_amd64.deb3 ·cf41131ec9df4e642f6564180932566d·152968·python·optional·python3-sqlalchemy-ext_2.0.40+ds1-1_amd64.deb
4 ·8aaa3be24daec5bb97aecb6139c4ede1·1210292·python·optional·python3-sqlalchemy_2.0.40+ds1-1_all.deb4 ·8aaa3be24daec5bb97aecb6139c4ede1·1210292·python·optional·python3-sqlalchemy_2.0.40+ds1-1_all.deb
37.7 KB
python-sqlalchemy-doc_2.0.40+ds1-1_all.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2025-02-06·11:19:07.000000·debian-binary1 -rw-r--r--···0········0········0········4·2025-02-06·11:19:07.000000·debian-binary
2 -rw-r--r--···0········0········0····13680·2025-02-06·11:19:07.000000·control.tar.xz2 -rw-r--r--···0········0········0····13680·2025-02-06·11:19:07.000000·control.tar.xz
3 -rw-r--r--···0········0········0··3973632·2025-02-06·11:19:07.000000·data.tar.xz3 -rw-r--r--···0········0········0··3973712·2025-02-06·11:19:07.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
37.2 KB
data.tar.xz
37.2 KB
data.tar
7.04 KB
./usr/share/doc/python-sqlalchemy-doc/html/changelog/changelog_20.html
    
Offset 8985, 31 lines modifiedOffset 8985, 31 lines modified
8985 </p>8985 </p>
8986 </li>8986 </li>
8987 <li><p·class="caption"·id="change-2.0.0b1-85"><span·class="target"·id="change-0a487b939ab3ad7ca93ee291b91eb410"><strong>[sqlite]·[usecase]</strong>·<a·class="changelog-reference·headerlink·reference·internal"·href="#change-0a487b939ab3ad7ca93ee291b91eb410">¶</a></span><p>Added·RETURNING·support·for·the·SQLite·dialect.··SQLite·supports·RETURNING8987 <li><p·class="caption"·id="change-2.0.0b1-85"><span·class="target"·id="change-0a487b939ab3ad7ca93ee291b91eb410"><strong>[sqlite]·[usecase]</strong>·<a·class="changelog-reference·headerlink·reference·internal"·href="#change-0a487b939ab3ad7ca93ee291b91eb410">¶</a></span><p>Added·RETURNING·support·for·the·SQLite·dialect.··SQLite·supports·RETURNING
8988 since·version·3.35.</p>8988 since·version·3.35.</p>
8989 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/6195">#6195</a></p>8989 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/6195">#6195</a></p>
8990 </p>8990 </p>
8991 </li>8991 </li>
8992 <li><p·class="caption"·id="change-2.0.0b1-86"><span·class="target"·id="change-ef6ce799a34b30832a9c8115e2afa920"><strong>[sqlite]·[usecase]</strong>·<a·class="changelog-reference·headerlink·reference·internal"·href="#change-ef6ce799a34b30832a9c8115e2afa920">¶</a></span><p>The·SQLite·dialect·now·supports·UPDATE..FROM·syntax,·for·UPDATE·statements 
8993 that·may·refer·to·additional·tables·within·the·WHERE·criteria·of·the 
8994 statement·without·the·need·to·use·subqueries.·This·syntax·is·invoked 
8995 automatically·when·using·the·<a·class="reference·internal"·href="../core/dml.html#sqlalchemy.sql.expression.Update"·title="sqlalchemy.sql.expression.Update"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Update</span></code></a>·construct·when·more·than 
8996 one·table·or·other·entity·or·selectable·is·used.</p> 
8997 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/7185">#7185</a></p> 
8998 </p> 
8999 </li> 
9000 <li><p·class="caption"·id="change-2.0.0b1-87"><span·class="target"·id="change-74fee584f531c832d0d97ea94be754b8"><strong>[sqlite]·[performance]·[usecase]</strong>·<a·class="changelog-reference·headerlink·reference·internal"·href="#change-74fee584f531c832d0d97ea94be754b8">¶</a></span><p>SQLite·datetime,·date,·and·time·datatypes·now·use·Python·standard·lib8992 <li><p·class="caption"·id="change-2.0.0b1-86"><span·class="target"·id="change-74fee584f531c832d0d97ea94be754b8"><strong>[sqlite]·[usecase]·[performance]</strong>·<a·class="changelog-reference·headerlink·reference·internal"·href="#change-74fee584f531c832d0d97ea94be754b8">¶</a></span><p>SQLite·datetime,·date,·and·time·datatypes·now·use·Python·standard·lib
9001 <code·class="docutils·literal·notranslate"><span·class="pre">fromisoformat()</span></code>·methods·in·order·to·parse·incoming·datetime,·date,·and8993 <code·class="docutils·literal·notranslate"><span·class="pre">fromisoformat()</span></code>·methods·in·order·to·parse·incoming·datetime,·date,·and
9002 time·string·values.·This·improves·performance·vs.·the·previous·regular8994 time·string·values.·This·improves·performance·vs.·the·previous·regular
9003 expression-based·approach,·and·also·automatically·accommodates·for·datetime8995 expression-based·approach,·and·also·automatically·accommodates·for·datetime
9004 and·time·formats·that·contain·either·a·six-digit·“microseconds”·format·or·a8996 and·time·formats·that·contain·either·a·six-digit·“microseconds”·format·or·a
9005 three-digit·“milliseconds”·format.</p>8997 three-digit·“milliseconds”·format.</p>
9006 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/7029">#7029</a></p>8998 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/7029">#7029</a></p>
9007 </p>8999 </p>
9008 </li>9000 </li>
 9001 <li><p·class="caption"·id="change-2.0.0b1-87"><span·class="target"·id="change-ef6ce799a34b30832a9c8115e2afa920"><strong>[sqlite]·[usecase]</strong>·<a·class="changelog-reference·headerlink·reference·internal"·href="#change-ef6ce799a34b30832a9c8115e2afa920">¶</a></span><p>The·SQLite·dialect·now·supports·UPDATE..FROM·syntax,·for·UPDATE·statements
 9002 that·may·refer·to·additional·tables·within·the·WHERE·criteria·of·the
 9003 statement·without·the·need·to·use·subqueries.·This·syntax·is·invoked
 9004 automatically·when·using·the·<a·class="reference·internal"·href="../core/dml.html#sqlalchemy.sql.expression.Update"·title="sqlalchemy.sql.expression.Update"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Update</span></code></a>·construct·when·more·than
 9005 one·table·or·other·entity·or·selectable·is·used.</p>
 9006 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/7185">#7185</a></p>
 9007 </p>
 9008 </li>
9009 <li><p·class="caption"·id="change-2.0.0b1-88"><span·class="target"·id="change-b11607250a6e056103e2b2d1205be1a8"><strong>[sqlite]·[bug]</strong>·<a·class="changelog-reference·headerlink·reference·internal"·href="#change-b11607250a6e056103e2b2d1205be1a8">¶</a></span><p>Removed·the·warning·that·emits·from·the·<a·class="reference·internal"·href="../core/type_basics.html#sqlalchemy.types.Numeric"·title="sqlalchemy.types.Numeric"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Numeric</span></code></a>·type·about9009 <li><p·class="caption"·id="change-2.0.0b1-88"><span·class="target"·id="change-b11607250a6e056103e2b2d1205be1a8"><strong>[sqlite]·[bug]</strong>·<a·class="changelog-reference·headerlink·reference·internal"·href="#change-b11607250a6e056103e2b2d1205be1a8">¶</a></span><p>Removed·the·warning·that·emits·from·the·<a·class="reference·internal"·href="../core/type_basics.html#sqlalchemy.types.Numeric"·title="sqlalchemy.types.Numeric"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Numeric</span></code></a>·type·about
9010 DBAPIs·not·supporting·Decimal·values·natively.·This·warning·was·oriented9010 DBAPIs·not·supporting·Decimal·values·natively.·This·warning·was·oriented
9011 towards·SQLite,·which·does·not·have·any·real·way·without·additional9011 towards·SQLite,·which·does·not·have·any·real·way·without·additional
9012 extensions·or·workarounds·of·handling·precision·numeric·values·more·than·159012 extensions·or·workarounds·of·handling·precision·numeric·values·more·than·15
9013 significant·digits·as·it·only·uses·floating·point·math·to·represent9013 significant·digits·as·it·only·uses·floating·point·math·to·represent
9014 numbers.·As·this·is·a·known·and·documented·limitation·in·SQLite·itself,·and9014 numbers.·As·this·is·a·known·and·documented·limitation·in·SQLite·itself,·and
9015 not·a·quirk·of·the·pysqlite·driver,·there’s·no·need·for·SQLAlchemy·to·warn9015 not·a·quirk·of·the·pysqlite·driver,·there’s·no·need·for·SQLAlchemy·to·warn
2.34 KB
html2text {}
    
Offset 6178, 29 lines modifiedOffset 6178, 29 lines modified
6178 ······See·also6178 ······See·also
6179 ······_\x8R_\x8e_\x8f_\x8l_\x8e_\x8c_\x8t_\x8i_\x8n_\x8g_\x8·_\x8i_\x8n_\x8t_\x8e_\x8r_\x8n_\x8a_\x8l_\x8·_\x8s_\x8c_\x8h_\x8e_\x8m_\x8a_\x8·_\x8t_\x8a_\x8b_\x8l_\x8e_\x8s6179 ······_\x8R_\x8e_\x8f_\x8l_\x8e_\x8c_\x8t_\x8i_\x8n_\x8g_\x8·_\x8i_\x8n_\x8t_\x8e_\x8r_\x8n_\x8a_\x8l_\x8·_\x8s_\x8c_\x8h_\x8e_\x8m_\x8a_\x8·_\x8t_\x8a_\x8b_\x8l_\x8e_\x8s
6180 ······References:·_\x8#_\x88_\x82_\x83_\x846180 ······References:·_\x8#_\x88_\x82_\x83_\x84
6181 [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[u\x8us\x8se\x8ec\x8ca\x8as\x8se\x8e]\x8]·_\x86181 [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[u\x8us\x8se\x8ec\x8ca\x8as\x8se\x8e]\x8]·_\x8
6182 Added·RETURNING·support·for·the·SQLite·dialect.·SQLite·supports·RETURNING·since6182 Added·RETURNING·support·for·the·SQLite·dialect.·SQLite·supports·RETURNING·since
6183 version·3.35.6183 version·3.35.
6184 References:·_\x8#_\x86_\x81_\x89_\x856184 References:·_\x8#_\x86_\x81_\x89_\x85
 6185 [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[u\x8us\x8se\x8ec\x8ca\x8as\x8se\x8e]\x8]·[\x8[p\x8pe\x8er\x8rf\x8fo\x8or\x8rm\x8ma\x8an\x8nc\x8ce\x8e]\x8]·_\x8
6185 [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[u\x8us\x8se\x8ec\x8ca\x8as\x8se\x8e]\x8]·_\x8 
6186 The·SQLite·dialect·now·supports·UPDATE..FROM·syntax,·for·UPDATE·statements·that 
6187 may·refer·to·additional·tables·within·the·WHERE·criteria·of·the·statement 
6188 without·the·need·to·use·subqueries.·This·syntax·is·invoked·automatically·when 
6189 using·the·_\x8U_\x8p_\x8d_\x8a_\x8t_\x8e·construct·when·more·than·one·table·or·other·entity·or 
6190 selectable·is·used. 
6191 References:·_\x8#_\x87_\x81_\x88_\x85 
6192 [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[p\x8pe\x8er\x8rf\x8fo\x8or\x8rm\x8ma\x8an\x8nc\x8ce\x8e]\x8]·[\x8[u\x8us\x8se\x8ec\x8ca\x8as\x8se\x8e]\x8]·_\x8 
6193 SQLite·datetime,·date,·and·time·datatypes·now·use·Python·standard·lib6186 SQLite·datetime,·date,·and·time·datatypes·now·use·Python·standard·lib
6194 fromisoformat()·methods·in·order·to·parse·incoming·datetime,·date,·and·time6187 fromisoformat()·methods·in·order·to·parse·incoming·datetime,·date,·and·time
6195 string·values.·This·improves·performance·vs.·the·previous·regular·expression-6188 string·values.·This·improves·performance·vs.·the·previous·regular·expression-
6196 based·approach,·and·also·automatically·accommodates·for·datetime·and·time6189 based·approach,·and·also·automatically·accommodates·for·datetime·and·time
6197 formats·that·contain·either·a·six-digit·“microseconds”·format·or·a·three-digit6190 formats·that·contain·either·a·six-digit·“microseconds”·format·or·a·three-digit
6198 “milliseconds”·format.6191 “milliseconds”·format.
6199 References:·_\x8#_\x87_\x80_\x82_\x896192 References:·_\x8#_\x87_\x80_\x82_\x89
 6193 [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[u\x8us\x8se\x8ec\x8ca\x8as\x8se\x8e]\x8]·_\x8
 6194 The·SQLite·dialect·now·supports·UPDATE..FROM·syntax,·for·UPDATE·statements·that
 6195 may·refer·to·additional·tables·within·the·WHERE·criteria·of·the·statement
 6196 without·the·need·to·use·subqueries.·This·syntax·is·invoked·automatically·when
 6197 using·the·_\x8U_\x8p_\x8d_\x8a_\x8t_\x8e·construct·when·more·than·one·table·or·other·entity·or
 6198 selectable·is·used.
 6199 References:·_\x8#_\x87_\x81_\x88_\x85
6200 [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[b\x8bu\x8ug\x8g]\x8]·_\x86200 [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[b\x8bu\x8ug\x8g]\x8]·_\x8
6201 Removed·the·warning·that·emits·from·the·_\x8N_\x8u_\x8m_\x8e_\x8r_\x8i_\x8c·type·about·DBAPIs·not6201 Removed·the·warning·that·emits·from·the·_\x8N_\x8u_\x8m_\x8e_\x8r_\x8i_\x8c·type·about·DBAPIs·not
6202 supporting·Decimal·values·natively.·This·warning·was·oriented·towards·SQLite,6202 supporting·Decimal·values·natively.·This·warning·was·oriented·towards·SQLite,
6203 which·does·not·have·any·real·way·without·additional·extensions·or·workarounds6203 which·does·not·have·any·real·way·without·additional·extensions·or·workarounds
6204 of·handling·precision·numeric·values·more·than·15·significant·digits·as·it·only6204 of·handling·precision·numeric·values·more·than·15·significant·digits·as·it·only
6205 uses·floating·point·math·to·represent·numbers.·As·this·is·a·known·and6205 uses·floating·point·math·to·represent·numbers.·As·this·is·a·known·and
6206 documented·limitation·in·SQLite·itself,·and·not·a·quirk·of·the·pysqlite·driver,6206 documented·limitation·in·SQLite·itself,·and·not·a·quirk·of·the·pysqlite·driver,
30.1 KB
./usr/share/doc/python-sqlalchemy-doc/html/orm/examples.html
Ordering differences only
    
Offset 319, 29 lines modifiedOffset 319, 29 lines modified
319 </ul>319 </ul>
320 </p>320 </p>
321 </section>321 </section>
322 <section·id="module-examples.asyncio">322 <section·id="module-examples.asyncio">
323 <span·id="asyncio-integration"></span><span·id="examples-asyncio"></span><h3>Asyncio·Integration<a·class="headerlink"·href="#module-examples.asyncio"·title="Link·to·this·heading">¶</a></h3>323 <span·id="asyncio-integration"></span><span·id="examples-asyncio"></span><h3>Asyncio·Integration<a·class="headerlink"·href="#module-examples.asyncio"·title="Link·to·this·heading">¶</a></h3>
324 <p>Examples·illustrating·the·asyncio·engine·feature·of·SQLAlchemy.</p>324 <p>Examples·illustrating·the·asyncio·engine·feature·of·SQLAlchemy.</p>
325 <p>Listing·of·files:<ul·class="simple">325 <p>Listing·of·files:<ul·class="simple">
 326 <li><p><p><a·class="reference·external"·href="../_modules/examples/asyncio/greenlet_orm.html">greenlet_orm.py</a>·-·Illustrates·use·of·the·sqlalchemy.ext.asyncio.AsyncSession·object
 327 for·asynchronous·ORM·use,·including·the·optional·run_sync()·method.</p>
 328 </p></li>
326 <li><p><p><a·class="reference·external"·href="../_modules/examples/asyncio/async_orm.html">async_orm.py</a>·-·Illustrates·use·of·the·<code·class="docutils·literal·notranslate"><span·class="pre">sqlalchemy.ext.asyncio.AsyncSession</span></code>·object329 <li><p><p><a·class="reference·external"·href="../_modules/examples/asyncio/async_orm.html">async_orm.py</a>·-·Illustrates·use·of·the·<code·class="docutils·literal·notranslate"><span·class="pre">sqlalchemy.ext.asyncio.AsyncSession</span></code>·object
327 for·asynchronous·ORM·use.</p>330 for·asynchronous·ORM·use.</p>
328 </p></li>331 </p></li>
 332 <li><p><p><a·class="reference·external"·href="../_modules/examples/asyncio/basic.html">basic.py</a>·-·Illustrates·the·asyncio·engine·/·connection·interface.</p>
329 <li><p><p><a·class="reference·external"·href="../_modules/examples/asyncio/greenlet_orm.html">greenlet_orm.py</a>·-·Illustrates·use·of·the·sqlalchemy.ext.asyncio.AsyncSession·object 
330 for·asynchronous·ORM·use,·including·the·optional·run_sync()·method.</p> 
331 </p></li>333 </p></li>
332 <li><p><p><a·class="reference·external"·href="../_modules/examples/asyncio/gather_orm_statements.html">gather_orm_statements.py</a>·-·Illustrates·how·to·run·many·statements·concurrently·using·<code·class="docutils·literal·notranslate"><span·class="pre">asyncio.gather()</span></code>334 <li><p><p><a·class="reference·external"·href="../_modules/examples/asyncio/gather_orm_statements.html">gather_orm_statements.py</a>·-·Illustrates·how·to·run·many·statements·concurrently·using·<code·class="docutils·literal·notranslate"><span·class="pre">asyncio.gather()</span></code>
333 along·many·asyncio·database·connections,·merging·ORM·results·into·a·single335 along·many·asyncio·database·connections,·merging·ORM·results·into·a·single
334 <code·class="docutils·literal·notranslate"><span·class="pre">AsyncSession</span></code>.</p>336 <code·class="docutils·literal·notranslate"><span·class="pre">AsyncSession</span></code>.</p>
335 </p></li>337 </p></li>
336 <li><p><p><a·class="reference·external"·href="../_modules/examples/asyncio/async_orm_writeonly.html">async_orm_writeonly.py</a>·-·Illustrates·using·<strong>write·only·relationships</strong>·for·simpler·handling338 <li><p><p><a·class="reference·external"·href="../_modules/examples/asyncio/async_orm_writeonly.html">async_orm_writeonly.py</a>·-·Illustrates·using·<strong>write·only·relationships</strong>·for·simpler·handling
337 of·ORM·collections·under·asyncio.</p>339 of·ORM·collections·under·asyncio.</p>
338 </p></li>340 </p></li>
339 <li><p><p><a·class="reference·external"·href="../_modules/examples/asyncio/basic.html">basic.py</a>·-·Illustrates·the·asyncio·engine·/·connection·interface.</p> 
340 </p></li> 
341 </ul>341 </ul>
342 </p>342 </p>
343 </section>343 </section>
344 <section·id="module-examples.graphs">344 <section·id="module-examples.graphs">
345 <span·id="directed-graphs"></span><h3>Directed·Graphs<a·class="headerlink"·href="#module-examples.graphs"·title="Link·to·this·heading">¶</a></h3>345 <span·id="directed-graphs"></span><h3>Directed·Graphs<a·class="headerlink"·href="#module-examples.graphs"·title="Link·to·this·heading">¶</a></h3>
346 <p>An·example·of·persistence·for·a·directed·graph·structure.···The346 <p>An·example·of·persistence·for·a·directed·graph·structure.···The
347 graph·is·stored·as·a·collection·of·edges,·each·referencing·both·a347 graph·is·stored·as·a·collection·of·edges,·each·referencing·both·a
Offset 378, 37 lines modifiedOffset 378, 37 lines modified
378 subclassing·the·<code·class="docutils·literal·notranslate"><span·class="pre">HasAddresses</span></code>·mixin,·which·ensures·that·the378 subclassing·the·<code·class="docutils·literal·notranslate"><span·class="pre">HasAddresses</span></code>·mixin,·which·ensures·that·the
379 parent·class·is·provided·with·an·<code·class="docutils·literal·notranslate"><span·class="pre">addresses</span></code>·collection379 parent·class·is·provided·with·an·<code·class="docutils·literal·notranslate"><span·class="pre">addresses</span></code>·collection
380 which·contains·<code·class="docutils·literal·notranslate"><span·class="pre">Address</span></code>·objects.</p>380 which·contains·<code·class="docutils·literal·notranslate"><span·class="pre">Address</span></code>·objects.</p>
381 <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>·scripts381 <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
382 are·modernized·versions·of·recipes·presented·in·the·2007·blog·post382 are·modernized·versions·of·recipes·presented·in·the·2007·blog·post
383 <a·class="reference·external"·href="https://techspot.zzzeek.org/2007/05/29/polymorphic-associations-with-sqlalchemy/">Polymorphic·Associations·with·SQLAlchemy</a>.</p>383 <a·class="reference·external"·href="https://techspot.zzzeek.org/2007/05/29/polymorphic-associations-with-sqlalchemy/">Polymorphic·Associations·with·SQLAlchemy</a>.</p>
384 <p>Listing·of·files:<ul·class="simple">384 <p>Listing·of·files:<ul·class="simple">
 385 <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
 386 objects·within·individual·tables,·each·one·generated·to·persist
 387 those·objects·on·behalf·of·a·particular·parent·class.</p>
 388 </p></li>
385 <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·association389 <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
386 using·a·single·target·table·and·a·single·association·table,390 using·a·single·target·table·and·a·single·association·table,
387 referred·to·by·all·parent·tables.··The·association·table391 referred·to·by·all·parent·tables.··The·association·table
388 contains·a·“discriminator”·column·which·determines·what·type·of392 contains·a·“discriminator”·column·which·determines·what·type·of
389 parent·object·associates·to·each·particular·row·in·the·association393 parent·object·associates·to·each·particular·row·in·the·association
390 table.</p>394 table.</p>
391 </p></li>395 </p></li>
 396 <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
 397 via·a·individually·generated·association·tables·for·each·parent·class.
 398 The·associated·objects·themselves·are·persisted·in·a·single·table
 399 shared·among·all·parents.</p>
 400 </p></li>
392 <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·fashion401 <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
393 to·that·of·popular·frameworks·such·as·Django,·ROR,·etc.··This402 to·that·of·popular·frameworks·such·as·Django,·ROR,·etc.··This
394 approach·bypasses·standard·referential·integrity403 approach·bypasses·standard·referential·integrity
395 practices,·in·that·the·“foreign·key”·column·is·not·actually404 practices,·in·that·the·“foreign·key”·column·is·not·actually
396 constrained·to·refer·to·any·particular·table;·instead,405 constrained·to·refer·to·any·particular·table;·instead,
397 in-application·logic·is·used·to·determine·which·table·is·referenced.</p>406 in-application·logic·is·used·to·determine·which·table·is·referenced.</p>
398 </p></li>407 </p></li>
399 <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 
400 objects·within·individual·tables,·each·one·generated·to·persist 
401 those·objects·on·behalf·of·a·particular·parent·class.</p> 
402 </p></li> 
403 <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 
404 via·a·individually·generated·association·tables·for·each·parent·class. 
405 The·associated·objects·themselves·are·persisted·in·a·single·table 
406 shared·among·all·parents.</p> 
407 </p></li> 
408 </ul>408 </ul>
409 </p>409 </p>
410 </section>410 </section>
411 <section·id="module-examples.materialized_paths">411 <section·id="module-examples.materialized_paths">
412 <span·id="materialized-paths"></span><h3>Materialized·Paths<a·class="headerlink"·href="#module-examples.materialized_paths"·title="Link·to·this·heading">¶</a></h3>412 <span·id="materialized-paths"></span><h3>Materialized·Paths<a·class="headerlink"·href="#module-examples.materialized_paths"·title="Link·to·this·heading">¶</a></h3>
413 <p>Illustrates·the·“materialized·paths”·pattern·for·hierarchical·data·using·the413 <p>Illustrates·the·“materialized·paths”·pattern·for·hierarchical·data·using·the
414 SQLAlchemy·ORM.</p>414 SQLAlchemy·ORM.</p>
Offset 477, 33 lines modifiedOffset 477, 33 lines modified
477 <div·class="admonition·seealso">477 <div·class="admonition·seealso">
478 <p·class="admonition-title">See·also</p>478 <p·class="admonition-title">See·also</p>
479 <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>479 <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>
480 </div>480 </div>
481 <section·id="file-listing">481 <section·id="file-listing">
482 <h4>File·Listing<a·class="headerlink"·href="#file-listing"·title="Link·to·this·heading">¶</a></h4>482 <h4>File·Listing<a·class="headerlink"·href="#file-listing"·title="Link·to·this·heading">¶</a></h4>
483 <p>Listing·of·files:<ul·class="simple">483 <p>Listing·of·files:<ul·class="simple">
 484 <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>
 485 </p></li>
 486 <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
 487 of·very·small·and·simple·rows.</p>
 488 </p></li>
484 <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·row489 <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
485 within·a·distinct·transaction,·and·afterwards·returns·to·essentially·a490 within·a·distinct·transaction,·and·afterwards·returns·to·essentially·a
486 “closed”·state.···This·would·be·analogous·to·an·API·call·that·starts·up491 “closed”·state.···This·would·be·analogous·to·an·API·call·that·starts·up
487 a·database·connection,·inserts·the·row,·commits·and·closes.</p>492 a·database·connection,·inserts·the·row,·commits·and·closes.</p>
488 </p></li>493 </p></li>
489 <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·single494 <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
490 record·by·primary·key</p>495 record·by·primary·key</p>
491 </p></li>496 </p></li>
492 <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·number497 <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
493 of·rows·in·bulk.</p>498 of·rows·in·bulk.</p>
494 </p></li>499 </p></li>
495 <li><p><p><a·class="reference·external"·href="../_modules/examples/performance/bulk_updates.html">bulk_updates.py</a>·-·This·series·of·tests·will·illustrate·different·ways·to·UPDATE·a·large·number500 <li><p><p><a·class="reference·external"·href="../_modules/examples/performance/bulk_updates.html">bulk_updates.py</a>·-·This·series·of·tests·will·illustrate·different·ways·to·UPDATE·a·large·number
496 of·rows·in·bulk·(under·construction!·there’s·just·one·test·at·the·moment)</p>501 of·rows·in·bulk·(under·construction!·there’s·just·one·test·at·the·moment)</p>
497 </p></li>502 </p></li>
498 <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> 
499 </p></li> 
500 <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 
501 of·very·small·and·simple·rows.</p> 
502 </p></li> 
503 </ul>503 </ul>
504 </p>504 </p>
505 </section>505 </section>
506 <section·id="running-all-tests-with-time">506 <section·id="running-all-tests-with-time">
507 <h4>Running·all·tests·with·time<a·class="headerlink"·href="#running-all-tests-with-time"·title="Link·to·this·heading">¶</a></h4>507 <h4>Running·all·tests·with·time<a·class="headerlink"·href="#running-all-tests-with-time"·title="Link·to·this·heading">¶</a></h4>
508 <p>This·is·the·default·form·of·run:</p>508 <p>This·is·the·default·form·of·run:</p>
509 <div·class="highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="err">$</span>·<span·class="n">python</span>·<span·class="o">-</span><span·class="n">m</span>·<span·class="n">examples</span><span·class="o">.</span><span·class="n">performance</span>·<span·class="n">single_inserts</span>509 <div·class="highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="err">$</span>·<span·class="n">python</span>·<span·class="o">-</span><span·class="n">m</span>·<span·class="n">examples</span><span·class="o">.</span><span·class="n">performance</span>·<span·class="n">single_inserts</span>
Offset 756, 31 lines modifiedOffset 756, 31 lines modified
756 <p>Several·examples·that·illustrate·the·technique·of·intercepting·changes756 <p>Several·examples·that·illustrate·the·technique·of·intercepting·changes
757 that·would·be·first·interpreted·as·an·UPDATE·on·a·row,·and·instead·turning757 that·would·be·first·interpreted·as·an·UPDATE·on·a·row,·and·instead·turning
758 it·into·an·INSERT·of·a·new·row,·leaving·the·previous·row·intact·as758 it·into·an·INSERT·of·a·new·row,·leaving·the·previous·row·intact·as
759 a·historical·version.</p>759 a·historical·version.</p>
760 <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·a760 <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
761 history·row·to·a·separate·history·table.</p>761 history·row·to·a·separate·history·table.</p>
762 <p>Listing·of·files:<ul·class="simple">762 <p>Listing·of·files:<ul·class="simple">
Max diff block lines reached; 5766/16362 bytes (35.24%) of diff not shown.
14.0 KB
html2text {}
    
Offset 109, 24 lines modifiedOffset 109, 25 lines modified
109 each·via·an·association·object·called·“OrderItem”109 each·via·an·association·object·called·“OrderItem”
110 _\x8p_\x8r_\x8o_\x8x_\x8i_\x8e_\x8d_\x8__\x8a_\x8s_\x8s_\x8o_\x8c_\x8i_\x8a_\x8t_\x8i_\x8o_\x8n_\x8._\x8p_\x8y·-·Same·example·as·basic_association,·adding·in·usage·of110 _\x8p_\x8r_\x8o_\x8x_\x8i_\x8e_\x8d_\x8__\x8a_\x8s_\x8s_\x8o_\x8c_\x8i_\x8a_\x8t_\x8i_\x8o_\x8n_\x8._\x8p_\x8y·-·Same·example·as·basic_association,·adding·in·usage·of
111 _\x8s_\x8q_\x8l_\x8a_\x8l_\x8c_\x8h_\x8e_\x8m_\x8y_\x8._\x8e_\x8x_\x8t_\x8._\x8a_\x8s_\x8s_\x8o_\x8c_\x8i_\x8a_\x8t_\x8i_\x8o_\x8n_\x8p_\x8r_\x8o_\x8x_\x8y·to·make·explicit·references·to·OrderItem111 _\x8s_\x8q_\x8l_\x8a_\x8l_\x8c_\x8h_\x8e_\x8m_\x8y_\x8._\x8e_\x8x_\x8t_\x8._\x8a_\x8s_\x8s_\x8o_\x8c_\x8i_\x8a_\x8t_\x8i_\x8o_\x8n_\x8p_\x8r_\x8o_\x8x_\x8y·to·make·explicit·references·to·OrderItem
112 optional.112 optional.
113 *\x8**\x8**\x8**\x8*·A\x8As\x8sy\x8yn\x8nc\x8ci\x8io\x8o·I\x8In\x8nt\x8te\x8eg\x8gr\x8ra\x8at\x8ti\x8io\x8on\x8n_\x8?\x8·*\x8**\x8**\x8**\x8*113 *\x8**\x8**\x8**\x8*·A\x8As\x8sy\x8yn\x8nc\x8ci\x8io\x8o·I\x8In\x8nt\x8te\x8eg\x8gr\x8ra\x8at\x8ti\x8io\x8on\x8n_\x8?\x8·*\x8**\x8**\x8**\x8*
114 Examples·illustrating·the·asyncio·engine·feature·of·SQLAlchemy.114 Examples·illustrating·the·asyncio·engine·feature·of·SQLAlchemy.
115 Listing·of·files:115 Listing·of·files:
 116 ····*·_\x8g_\x8r_\x8e_\x8e_\x8n_\x8l_\x8e_\x8t_\x8__\x8o_\x8r_\x8m_\x8._\x8p_\x8y·-·Illustrates·use·of·the
 117 ······sqlalchemy.ext.asyncio.AsyncSession·object·for·asynchronous·ORM·use,
 118 ······including·the·optional·run_sync()·method.
116 ····*·_\x8a_\x8s_\x8y_\x8n_\x8c_\x8__\x8o_\x8r_\x8m_\x8._\x8p_\x8y·-·Illustrates·use·of·the·sqlalchemy.ext.asyncio.AsyncSession119 _\x8a_\x8s_\x8y_\x8n_\x8c_\x8__\x8o_\x8r_\x8m_\x8._\x8p_\x8y·-·Illustrates·use·of·the·sqlalchemy.ext.asyncio.AsyncSession
117 ······object·for·asynchronous·ORM·use.120 object·for·asynchronous·ORM·use.
 121 _\x8b_\x8a_\x8s_\x8i_\x8c_\x8._\x8p_\x8y·-·Illustrates·the·asyncio·engine·/·connection·interface.
118 _\x8g_\x8r_\x8e_\x8e_\x8n_\x8l_\x8e_\x8t_\x8__\x8o_\x8r_\x8m_\x8._\x8p_\x8y·-·Illustrates·use·of·the·sqlalchemy.ext.asyncio.AsyncSession 
119 object·for·asynchronous·ORM·use,·including·the·optional·run_sync()·method. 
120 _\x8g_\x8a_\x8t_\x8h_\x8e_\x8r_\x8__\x8o_\x8r_\x8m_\x8__\x8s_\x8t_\x8a_\x8t_\x8e_\x8m_\x8e_\x8n_\x8t_\x8s_\x8._\x8p_\x8y·-·Illustrates·how·to·run·many·statements·concurrently122 _\x8g_\x8a_\x8t_\x8h_\x8e_\x8r_\x8__\x8o_\x8r_\x8m_\x8__\x8s_\x8t_\x8a_\x8t_\x8e_\x8m_\x8e_\x8n_\x8t_\x8s_\x8._\x8p_\x8y·-·Illustrates·how·to·run·many·statements·concurrently
121 using·asyncio.gather()·along·many·asyncio·database·connections,·merging·ORM123 using·asyncio.gather()·along·many·asyncio·database·connections,·merging·ORM
122 results·into·a·single·AsyncSession.124 results·into·a·single·AsyncSession.
123 _\x8a_\x8s_\x8y_\x8n_\x8c_\x8__\x8o_\x8r_\x8m_\x8__\x8w_\x8r_\x8i_\x8t_\x8e_\x8o_\x8n_\x8l_\x8y_\x8._\x8p_\x8y·-·Illustrates·using·w\x8wr\x8ri\x8it\x8te\x8e·o\x8on\x8nl\x8ly\x8y·r\x8re\x8el\x8la\x8at\x8ti\x8io\x8on\x8ns\x8sh\x8hi\x8ip\x8ps\x8s·for·simpler125 _\x8a_\x8s_\x8y_\x8n_\x8c_\x8__\x8o_\x8r_\x8m_\x8__\x8w_\x8r_\x8i_\x8t_\x8e_\x8o_\x8n_\x8l_\x8y_\x8._\x8p_\x8y·-·Illustrates·using·w\x8wr\x8ri\x8it\x8te\x8e·o\x8on\x8nl\x8ly\x8y·r\x8re\x8el\x8la\x8at\x8ti\x8io\x8on\x8ns\x8sh\x8hi\x8ip\x8ps\x8s·for·simpler
124 handling·of·ORM·collections·under·asyncio.126 handling·of·ORM·collections·under·asyncio.
125 _\x8b_\x8a_\x8s_\x8i_\x8c_\x8._\x8p_\x8y·-·Illustrates·the·asyncio·engine·/·connection·interface. 
126 *\x8**\x8**\x8**\x8*·D\x8Di\x8ir\x8re\x8ec\x8ct\x8te\x8ed\x8d·G\x8Gr\x8ra\x8ap\x8ph\x8hs\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*127 *\x8**\x8**\x8**\x8*·D\x8Di\x8ir\x8re\x8ec\x8ct\x8te\x8ed\x8d·G\x8Gr\x8ra\x8ap\x8ph\x8hs\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*
127 An·example·of·persistence·for·a·directed·graph·structure.·The·graph·is·stored128 An·example·of·persistence·for·a·directed·graph·structure.·The·graph·is·stored
128 as·a·collection·of·edges,·each·referencing·both·a·“lower”·and·an·“upper”·node129 as·a·collection·of·edges,·each·referencing·both·a·“lower”·and·an·“upper”·node
129 in·a·table·of·nodes.·Basic·persistence·and·querying·for·lower-·and·upper-130 in·a·table·of·nodes.·Basic·persistence·and·querying·for·lower-·and·upper-
130 neighbors·are·illustrated:131 neighbors·are·illustrated:
131 n2·=·Node(2)132 n2·=·Node(2)
132 n5·=·Node(5)133 n5·=·Node(5)
Offset 148, 31 lines modifiedOffset 149, 31 lines modified
148 Supplier,·both·subclassing·the·HasAddresses·mixin,·which·ensures·that·the149 Supplier,·both·subclassing·the·HasAddresses·mixin,·which·ensures·that·the
149 parent·class·is·provided·with·an·addresses·collection·which·contains·Address150 parent·class·is·provided·with·an·addresses·collection·which·contains·Address
150 objects.151 objects.
151 The·_\x8d_\x8i_\x8s_\x8c_\x8r_\x8i_\x8m_\x8i_\x8n_\x8a_\x8t_\x8o_\x8r_\x8__\x8o_\x8n_\x8__\x8a_\x8s_\x8s_\x8o_\x8c_\x8i_\x8a_\x8t_\x8i_\x8o_\x8n_\x8._\x8p_\x8y·and·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8i_\x8c_\x8__\x8f_\x8k_\x8._\x8p_\x8y·scripts·are·modernized152 The·_\x8d_\x8i_\x8s_\x8c_\x8r_\x8i_\x8m_\x8i_\x8n_\x8a_\x8t_\x8o_\x8r_\x8__\x8o_\x8n_\x8__\x8a_\x8s_\x8s_\x8o_\x8c_\x8i_\x8a_\x8t_\x8i_\x8o_\x8n_\x8._\x8p_\x8y·and·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8i_\x8c_\x8__\x8f_\x8k_\x8._\x8p_\x8y·scripts·are·modernized
152 versions·of·recipes·presented·in·the·2007·blog·post·_\x8P_\x8o_\x8l_\x8y_\x8m_\x8o_\x8r_\x8p_\x8h_\x8i_\x8c_\x8·_\x8A_\x8s_\x8s_\x8o_\x8c_\x8i_\x8a_\x8t_\x8i_\x8o_\x8n_\x8s153 versions·of·recipes·presented·in·the·2007·blog·post·_\x8P_\x8o_\x8l_\x8y_\x8m_\x8o_\x8r_\x8p_\x8h_\x8i_\x8c_\x8·_\x8A_\x8s_\x8s_\x8o_\x8c_\x8i_\x8a_\x8t_\x8i_\x8o_\x8n_\x8s
153 _\x8w_\x8i_\x8t_\x8h_\x8·_\x8S_\x8Q_\x8L_\x8A_\x8l_\x8c_\x8h_\x8e_\x8m_\x8y.154 _\x8w_\x8i_\x8t_\x8h_\x8·_\x8S_\x8Q_\x8L_\x8A_\x8l_\x8c_\x8h_\x8e_\x8m_\x8y.
154 Listing·of·files:155 Listing·of·files:
 156 ····*·_\x8t_\x8a_\x8b_\x8l_\x8e_\x8__\x8p_\x8e_\x8r_\x8__\x8r_\x8e_\x8l_\x8a_\x8t_\x8e_\x8d_\x8._\x8p_\x8y·-·Illustrates·a·generic·association·which·persists
 157 ······association·objects·within·individual·tables,·each·one·generated·to
 158 ······persist·those·objects·on·behalf·of·a·particular·parent·class.
155 ····*·_.d_.i_.s_.c_.r_.i_.m_.i_.n_.a_.t_.o_.r_.__.o_.n_.__.a_.s_.s_.o_.c_.i_.a_.t_.i_.o_.n_.._.p_.y·-·Illustrates·a·mixin·which·provides·a159 _.d_.i_.s_.c_.r_.i_.m_.i_.n_.a_.t_.o_.r_.__.o_.n_.__.a_.s_.s_.o_.c_.i_.a_.t_.i_.o_.n_.._.p_.y·-·Illustrates·a·mixin·which·provides·a·generic
156 ······generic·association·using·a·single·target·table·and·a·single·association160 association·using·a·single·target·table·and·a·single·association·table,
157 ······table,·referred·to·by·all·parent·tables.·The·association·table·contains·a161 referred·to·by·all·parent·tables.·The·association·table·contains·a
158 ······“discriminator”·column·which·determines·what·type·of·parent·object162 “discriminator”·column·which·determines·what·type·of·parent·object·associates
159 ······associates·to·each·particular·row·in·the·association·table.163 to·each·particular·row·in·the·association·table.
 164 _\x8t_\x8a_\x8b_\x8l_\x8e_\x8__\x8p_\x8e_\x8r_\x8__\x8a_\x8s_\x8s_\x8o_\x8c_\x8i_\x8a_\x8t_\x8i_\x8o_\x8n_\x8._\x8p_\x8y·-·Illustrates·a·mixin·which·provides·a·generic
 165 association·via·a·individually·generated·association·tables·for·each·parent
 166 class.·The·associated·objects·themselves·are·persisted·in·a·single·table·shared
 167 among·all·parents.
160 _\x8g_\x8e_\x8n_\x8e_\x8r_\x8i_\x8c_\x8__\x8f_\x8k_\x8._\x8p_\x8y·-·Illustrates·a·so-called·“generic·foreign·key”,·in·a·similar168 _\x8g_\x8e_\x8n_\x8e_\x8r_\x8i_\x8c_\x8__\x8f_\x8k_\x8._\x8p_\x8y·-·Illustrates·a·so-called·“generic·foreign·key”,·in·a·similar
161 fashion·to·that·of·popular·frameworks·such·as·Django,·ROR,·etc.·This·approach169 fashion·to·that·of·popular·frameworks·such·as·Django,·ROR,·etc.·This·approach
162 bypasses·standard·referential·integrity·practices,·in·that·the·“foreign·key”170 bypasses·standard·referential·integrity·practices,·in·that·the·“foreign·key”
163 column·is·not·actually·constrained·to·refer·to·any·particular·table;·instead,171 column·is·not·actually·constrained·to·refer·to·any·particular·table;·instead,
164 in-application·logic·is·used·to·determine·which·table·is·referenced.172 in-application·logic·is·used·to·determine·which·table·is·referenced.
165 _\x8t_\x8a_\x8b_\x8l_\x8e_\x8__\x8p_\x8e_\x8r_\x8__\x8r_\x8e_\x8l_\x8a_\x8t_\x8e_\x8d_\x8._\x8p_\x8y·-·Illustrates·a·generic·association·which·persists 
166 association·objects·within·individual·tables,·each·one·generated·to·persist 
167 those·objects·on·behalf·of·a·particular·parent·class. 
168 _\x8t_\x8a_\x8b_\x8l_\x8e_\x8__\x8p_\x8e_\x8r_\x8__\x8a_\x8s_\x8s_\x8o_\x8c_\x8i_\x8a_\x8t_\x8i_\x8o_\x8n_\x8._\x8p_\x8y·-·Illustrates·a·mixin·which·provides·a·generic 
169 association·via·a·individually·generated·association·tables·for·each·parent 
170 class.·The·associated·objects·themselves·are·persisted·in·a·single·table·shared 
171 among·all·parents. 
172 *\x8**\x8**\x8**\x8*·M\x8Ma\x8at\x8te\x8er\x8ri\x8ia\x8al\x8li\x8iz\x8ze\x8ed\x8d·P\x8Pa\x8at\x8th\x8hs\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*173 *\x8**\x8**\x8**\x8*·M\x8Ma\x8at\x8te\x8er\x8ri\x8ia\x8al\x8li\x8iz\x8ze\x8ed\x8d·P\x8Pa\x8at\x8th\x8hs\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*
173 Illustrates·the·“materialized·paths”·pattern·for·hierarchical·data·using·the174 Illustrates·the·“materialized·paths”·pattern·for·hierarchical·data·using·the
174 SQLAlchemy·ORM.175 SQLAlchemy·ORM.
175 Listing·of·files:176 Listing·of·files:
176 ····*·_\x8m_\x8a_\x8t_\x8e_\x8r_\x8i_\x8a_\x8l_\x8i_\x8z_\x8e_\x8d_\x8__\x8p_\x8a_\x8t_\x8h_\x8s_\x8._\x8p_\x8y·-·Illustrates·the·“materialized·paths”·pattern.177 ····*·_\x8m_\x8a_\x8t_\x8e_\x8r_\x8i_\x8a_\x8l_\x8i_\x8z_\x8e_\x8d_\x8__\x8p_\x8a_\x8t_\x8h_\x8s_\x8._\x8p_\x8y·-·Illustrates·the·“materialized·paths”·pattern.
177 *\x8**\x8**\x8**\x8*·N\x8Ne\x8es\x8st\x8te\x8ed\x8d·S\x8Se\x8et\x8ts\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*178 *\x8**\x8**\x8**\x8*·N\x8Ne\x8es\x8st\x8te\x8ed\x8d·S\x8Se\x8et\x8ts\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*
178 Illustrates·a·rudimentary·way·to·implement·the·“nested·sets”·pattern·for179 Illustrates·a·rudimentary·way·to·implement·the·“nested·sets”·pattern·for
Offset 220, 29 lines modifiedOffset 221, 29 lines modified
220 $·python·-m·examples.performance·bulk_inserts·\221 $·python·-m·examples.performance·bulk_inserts·\
221 ····--dburl·mysql+mysqldb://scott:tiger@localhost/test·\222 ····--dburl·mysql+mysqldb://scott:tiger@localhost/test·\
222 ····--profile·--num·1000223 ····--profile·--num·1000
223 See·also224 See·also
224 _\x8H_\x8o_\x8w_\x8·_\x8c_\x8a_\x8n_\x8·_\x8I_\x8·_\x8p_\x8r_\x8o_\x8f_\x8i_\x8l_\x8e_\x8·_\x8a_\x8·_\x8S_\x8Q_\x8L_\x8A_\x8l_\x8c_\x8h_\x8e_\x8m_\x8y_\x8·_\x8p_\x8o_\x8w_\x8e_\x8r_\x8e_\x8d_\x8·_\x8a_\x8p_\x8p_\x8l_\x8i_\x8c_\x8a_\x8t_\x8i_\x8o_\x8n_\x8?225 _\x8H_\x8o_\x8w_\x8·_\x8c_\x8a_\x8n_\x8·_\x8I_\x8·_\x8p_\x8r_\x8o_\x8f_\x8i_\x8l_\x8e_\x8·_\x8a_\x8·_\x8S_\x8Q_\x8L_\x8A_\x8l_\x8c_\x8h_\x8e_\x8m_\x8y_\x8·_\x8p_\x8o_\x8w_\x8e_\x8r_\x8e_\x8d_\x8·_\x8a_\x8p_\x8p_\x8l_\x8i_\x8c_\x8a_\x8t_\x8i_\x8o_\x8n_\x8?
225 *\x8**\x8**\x8*·F\x8Fi\x8il\x8le\x8e·L\x8Li\x8is\x8st\x8ti\x8in\x8ng\x8g_\x8?\x8·*\x8**\x8**\x8*226 *\x8**\x8**\x8*·F\x8Fi\x8il\x8le\x8e·L\x8Li\x8is\x8st\x8ti\x8in\x8ng\x8g_\x8?\x8·*\x8**\x8**\x8*
226 Listing·of·files:227 Listing·of·files:
 228 ····*·_\x8__\x8__\x8m_\x8a_\x8i_\x8n_\x8__\x8__\x8._\x8p_\x8y·-·Allows·the·examples/performance·package·to·be·run·as·a
 229 ······script.
 230 _\x8l_\x8a_\x8r_\x8g_\x8e_\x8__\x8r_\x8e_\x8s_\x8u_\x8l_\x8t_\x8s_\x8e_\x8t_\x8s_\x8._\x8p_\x8y·-·In·this·series·of·tests,·we·are·looking·at·time·to·load·a
 231 large·number·of·very·small·and·simple·rows.
227 ····*·_.s_.i_.n_.g_.l_.e_.__.i_.n_.s_.e_.r_.t_.s_.._.p_.y·-·In·this·series·of·tests,·we’re·looking·at·a·method232 _.s_.i_.n_.g_.l_.e_.__.i_.n_.s_.e_.r_.t_.s_.._.p_.y·-·In·this·series·of·tests,·we’re·looking·at·a·method·that
228 ······that·inserts·a·row·within·a·distinct·transaction,·and·afterwards·returns233 inserts·a·row·within·a·distinct·transaction,·and·afterwards·returns·to
229 ······to·essentially·a·“closed”·state.·This·would·be·analogous·to·an·API·call234 essentially·a·“closed”·state.·This·would·be·analogous·to·an·API·call·that
230 ······that·starts·up·a·database·connection,·inserts·the·row,·commits·and235 starts·up·a·database·connection,·inserts·the·row,·commits·and·closes.
231 ······closes. 
232 _\x8s_\x8h_\x8o_\x8r_\x8t_\x8__\x8s_\x8e_\x8l_\x8e_\x8c_\x8t_\x8s_\x8._\x8p_\x8y·-·This·series·of·tests·illustrates·different·ways·to·SELECT·a236 _\x8s_\x8h_\x8o_\x8r_\x8t_\x8__\x8s_\x8e_\x8l_\x8e_\x8c_\x8t_\x8s_\x8._\x8p_\x8y·-·This·series·of·tests·illustrates·different·ways·to·SELECT·a
233 single·record·by·primary·key237 single·record·by·primary·key
234 _\x8b_\x8u_\x8l_\x8k_\x8__\x8i_\x8n_\x8s_\x8e_\x8r_\x8t_\x8s_\x8._\x8p_\x8y·-·This·series·of·tests·illustrates·different·ways·to·INSERT·a238 _\x8b_\x8u_\x8l_\x8k_\x8__\x8i_\x8n_\x8s_\x8e_\x8r_\x8t_\x8s_\x8._\x8p_\x8y·-·This·series·of·tests·illustrates·different·ways·to·INSERT·a
235 large·number·of·rows·in·bulk.239 large·number·of·rows·in·bulk.
236 _\x8b_\x8u_\x8l_\x8k_\x8__\x8u_\x8p_\x8d_\x8a_\x8t_\x8e_\x8s_\x8._\x8p_\x8y·-·This·series·of·tests·will·illustrate·different·ways·to·UPDATE240 _\x8b_\x8u_\x8l_\x8k_\x8__\x8u_\x8p_\x8d_\x8a_\x8t_\x8e_\x8s_\x8._\x8p_\x8y·-·This·series·of·tests·will·illustrate·different·ways·to·UPDATE
237 a·large·number·of·rows·in·bulk·(under·construction!·there’s·just·one·test·at241 a·large·number·of·rows·in·bulk·(under·construction!·there’s·just·one·test·at
238 the·moment)242 the·moment)
239 _\x8__\x8__\x8m_\x8a_\x8i_\x8n_\x8__\x8__\x8._\x8p_\x8y·-·Allows·the·examples/performance·package·to·be·run·as·a·script. 
240 _\x8l_\x8a_\x8r_\x8g_\x8e_\x8__\x8r_\x8e_\x8s_\x8u_\x8l_\x8t_\x8s_\x8e_\x8t_\x8s_\x8._\x8p_\x8y·-·In·this·series·of·tests,·we·are·looking·at·time·to·load·a 
241 large·number·of·very·small·and·simple·rows. 
242 *\x8**\x8**\x8*·R\x8Ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·a\x8al\x8ll\x8l·t\x8te\x8es\x8st\x8ts\x8s·w\x8wi\x8it\x8th\x8h·t\x8ti\x8im\x8me\x8e_\x8?\x8·*\x8**\x8**\x8*243 *\x8**\x8**\x8*·R\x8Ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·a\x8al\x8ll\x8l·t\x8te\x8es\x8st\x8ts\x8s·w\x8wi\x8it\x8th\x8h·t\x8ti\x8im\x8me\x8e_\x8?\x8·*\x8**\x8**\x8*
243 This·is·the·default·form·of·run:244 This·is·the·default·form·of·run:
244 $·python·-m·examples.performance·single_inserts245 $·python·-m·examples.performance·single_inserts
245 Tests·to·run:·test_orm_commit,·test_bulk_save,246 Tests·to·run:·test_orm_commit,·test_bulk_save,
246 ··············test_bulk_insert_dictionaries,·test_core,247 ··············test_bulk_insert_dictionaries,·test_core,
247 ··············test_core_query_caching,·test_dbapi_raw_w_connect,248 ··············test_core_query_caching,·test_dbapi_raw_w_connect,
248 ··············test_dbapi_raw_w_pool249 ··············test_dbapi_raw_w_pool
Offset 473, 27 lines modifiedOffset 474, 28 lines modified
473 Several·examples·that·illustrate·the·technique·of·intercepting·changes·that474 Several·examples·that·illustrate·the·technique·of·intercepting·changes·that
474 would·be·first·interpreted·as·an·UPDATE·on·a·row,·and·instead·turning·it·into475 would·be·first·interpreted·as·an·UPDATE·on·a·row,·and·instead·turning·it·into
475 an·INSERT·of·a·new·row,·leaving·the·previous·row·intact·as·a·historical476 an·INSERT·of·a·new·row,·leaving·the·previous·row·intact·as·a·historical
476 version.477 version.
477 Compare·to·the·_\x8V_\x8e_\x8r_\x8s_\x8i_\x8o_\x8n_\x8i_\x8n_\x8g_\x8·_\x8w_\x8i_\x8t_\x8h_\x8·_\x8a_\x8·_\x8H_\x8i_\x8s_\x8t_\x8o_\x8r_\x8y_\x8·_\x8T_\x8a_\x8b_\x8l_\x8e·example·which·writes·a·history478 Compare·to·the·_\x8V_\x8e_\x8r_\x8s_\x8i_\x8o_\x8n_\x8i_\x8n_\x8g_\x8·_\x8w_\x8i_\x8t_\x8h_\x8·_\x8a_\x8·_\x8H_\x8i_\x8s_\x8t_\x8o_\x8r_\x8y_\x8·_\x8T_\x8a_\x8b_\x8l_\x8e·example·which·writes·a·history
478 row·to·a·separate·history·table.479 row·to·a·separate·history·table.
479 Listing·of·files:480 Listing·of·files:
480 ····*·_\x8v_\x8e_\x8r_\x8s_\x8i_\x8o_\x8n_\x8e_\x8d_\x8__\x8r_\x8o_\x8w_\x8s_\x8._\x8p_\x8y·-·Illustrates·a·method·to·intercept·changes·on·objects, 
481 ······turning·an·UPDATE·statement·on·a·single·row·into·an·INSERT·statement,·so 
482 ······that·a·new·row·is·inserted·with·the·new·data,·keeping·the·old·row·intact. 
483 _.v_.e_.r_.s_.i_.o_.n_.e_.d_.__.u_.p_.d_.a_.t_.e_.__.o_.l_.d_.__.r_.o_.w_.._.p_.y·-·Illustrates·the·same·UPDATE·into·INSERT·technique481 ····*·_.v_.e_.r_.s_.i_.o_.n_.e_.d_.__.u_.p_.d_.a_.t_.e_.__.o_.l_.d_.__.r_.o_.w_.._.p_.y·-·Illustrates·the·same·UPDATE·into·INSERT
484 of·versioned_rows.py,·but·also·emits·an·UPDATE·on·the·o.ol.ld.d·row·to·affect·a482 ······technique·of·versioned_rows.py,·but·also·emits·an·UPDATE·on·the·o.ol.ld.d·row
 483 ······to·affect·a·change·in·timestamp.·Also·includes·a
485 change·in·timestamp.·Also·includes·a·_.S_.e_.s_.s_.i_.o_.n_.E_.v_.e_.n_.t_.s_.._.d_.o_.__.o_.r_.m_.__.e_.x_.e_.c_.u_.t_.e_.(_.)·hook·to484 ······_.S_.e_.s_.s_.i_.o_.n_.E_.v_.e_.n_.t_.s_.._.d_.o_.__.o_.r_.m_.__.e_.x_.e_.c_.u_.t_.e_.(_.)·hook·to·limit·queries·to·only·the·most
486 limit·queries·to·only·the·most·recent·version.485 ······recent·version.
487 _\x8v_\x8e_\x8r_\x8s_\x8i_\x8o_\x8n_\x8e_\x8d_\x8__\x8r_\x8o_\x8w_\x8s_\x8__\x8w_\x8__\x8v_\x8e_\x8r_\x8s_\x8i_\x8o_\x8n_\x8i_\x8d_\x8._\x8p_\x8y·-·Illustrates·a·method·to·intercept·changes·on486 _\x8v_\x8e_\x8r_\x8s_\x8i_\x8o_\x8n_\x8e_\x8d_\x8__\x8r_\x8o_\x8w_\x8s_\x8__\x8w_\x8__\x8v_\x8e_\x8r_\x8s_\x8i_\x8o_\x8n_\x8i_\x8d_\x8._\x8p_\x8y·-·Illustrates·a·method·to·intercept·changes·on
488 objects,·turning·an·UPDATE·statement·on·a·single·row·into·an·INSERT·statement,487 objects,·turning·an·UPDATE·statement·on·a·single·row·into·an·INSERT·statement,
489 so·that·a·new·row·is·inserted·with·the·new·data,·keeping·the·old·row·intact.488 so·that·a·new·row·is·inserted·with·the·new·data,·keeping·the·old·row·intact.
490 _\x8v_\x8e_\x8r_\x8s_\x8i_\x8o_\x8n_\x8e_\x8d_\x8__\x8m_\x8a_\x8p_\x8._\x8p_\x8y·-·A·variant·of·the·versioned_rows·example·built·around·the489 _\x8v_\x8e_\x8r_\x8s_\x8i_\x8o_\x8n_\x8e_\x8d_\x8__\x8m_\x8a_\x8p_\x8._\x8p_\x8y·-·A·variant·of·the·versioned_rows·example·built·around·the
491 concept·of·a·“vertical·table”·structure,·like·those·illustrated·in·_\x8V_\x8e_\x8r_\x8t_\x8i_\x8c_\x8a_\x8l490 concept·of·a·“vertical·table”·structure,·like·those·illustrated·in·_\x8V_\x8e_\x8r_\x8t_\x8i_\x8c_\x8a_\x8l
492 _\x8A_\x8t_\x8t_\x8r_\x8i_\x8b_\x8u_\x8t_\x8e_\x8·_\x8M_\x8a_\x8p_\x8p_\x8i_\x8n_\x8g·examples.491 _\x8A_\x8t_\x8t_\x8r_\x8i_\x8b_\x8u_\x8t_\x8e_\x8·_\x8M_\x8a_\x8p_\x8p_\x8i_\x8n_\x8g·examples.
 492 _\x8v_\x8e_\x8r_\x8s_\x8i_\x8o_\x8n_\x8e_\x8d_\x8__\x8r_\x8o_\x8w_\x8s_\x8._\x8p_\x8y·-·Illustrates·a·method·to·intercept·changes·on·objects,
 493 turning·an·UPDATE·statement·on·a·single·row·into·an·INSERT·statement,·so·that·a
 494 new·row·is·inserted·with·the·new·data,·keeping·the·old·row·intact.
493 *\x8**\x8**\x8**\x8*·V\x8Ve\x8er\x8rt\x8ti\x8ic\x8ca\x8al\x8l·A\x8At\x8tt\x8tr\x8ri\x8ib\x8bu\x8ut\x8te\x8e·M\x8Ma\x8ap\x8pp\x8pi\x8in\x8ng\x8g_\x8?\x8·*\x8**\x8**\x8**\x8*495 *\x8**\x8**\x8**\x8*·V\x8Ve\x8er\x8rt\x8ti\x8ic\x8ca\x8al\x8l·A\x8At\x8tt\x8tr\x8ri\x8ib\x8bu\x8ut\x8te\x8e·M\x8Ma\x8ap\x8pp\x8pi\x8in\x8ng\x8g_\x8?\x8·*\x8**\x8**\x8**\x8*
Max diff block lines reached; 3736/14305 bytes (26.12%) of diff not shown.