49.5 KB
/srv/reproducible-results/rbuild-debian/r-b-build.dUkKMKZ8/b1/sqlalchemy_2.0.40+ds1-1_amd64.changes vs.
/srv/reproducible-results/rbuild-debian/r-b-build.dUkKMKZ8/b2/sqlalchemy_2.0.40+ds1-1_amd64.changes
539 B
Files
    
Offset 1, 5 lines modifiedOffset 1, 5 lines modified
  
1 ·cbe318085689c47c8c6d5dead675c097·3987816·doc·optional·python-sqlalchemy-doc_2.0.40+ds1-1_all.deb1 ·eab2a386ef64f958ed08b801690f6f11·3987572·doc·optional·python-sqlalchemy-doc_2.0.40+ds1-1_all.deb
2 ·856814a65ad466f43501f4a07be4367b·919236·debug·optional·python3-sqlalchemy-ext-dbgsym_2.0.40+ds1-1_amd64.deb2 ·856814a65ad466f43501f4a07be4367b·919236·debug·optional·python3-sqlalchemy-ext-dbgsym_2.0.40+ds1-1_amd64.deb
3 ·1be620144e503b8dbd1a14e2d7a27a64·153012·python·optional·python3-sqlalchemy-ext_2.0.40+ds1-1_amd64.deb3 ·1be620144e503b8dbd1a14e2d7a27a64·153012·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
48.7 KB
python-sqlalchemy-doc_2.0.40+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·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····13676·2025-02-06·11:19:07.000000·control.tar.xz
3 -rw-r--r--···0········0········0··3973944·2025-02-06·11:19:07.000000·data.tar.xz3 -rw-r--r--···0········0········0··3973704·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
48.1 KB
data.tar.xz
48.1 KB
data.tar
7.67 KB
./usr/share/doc/python-sqlalchemy-doc/html/changelog/changelog_14.html
    
Offset 9314, 15 lines modifiedOffset 9314, 22 lines modified
9314 <div·class="admonition·seealso">9314 <div·class="admonition·seealso">
9315 <p·class="admonition-title">See·also</p>9315 <p·class="admonition-title">See·also</p>
9316 <p><a·class="reference·internal"·href="migration_14.html#change-4710-core"><span·class="std·std-ref">RowProxy·is·no·longer·a·“proxy”;·is·now·called·Row·and·behaves·like·an·enhanced·named·tuple</span></a></p>9316 <p><a·class="reference·internal"·href="migration_14.html#change-4710-core"><span·class="std·std-ref">RowProxy·is·no·longer·a·“proxy”;·is·now·called·Row·and·behaves·like·an·enhanced·named·tuple</span></a></p>
9317 </div>9317 </div>
9318 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/4710">#4710</a></p>9318 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/4710">#4710</a></p>
9319 </p>9319 </p>
9320 </li>9320 </li>
 9321 <li><p·class="caption"·id="change-1.4.0b1-54"><span·class="target"·id="change-6bc91a2bef8d8afd244e6dbd38439c4d"><strong>[engine]·[performance]</strong>·<a·class="changelog-reference·headerlink·reference·internal"·href="#change-6bc91a2bef8d8afd244e6dbd38439c4d">¶</a></span><p>The·pool·“pre-ping”·feature·has·been·refined·to·not·invoke·for·a·DBAPI
 9322 connection·that·was·just·opened·in·the·same·checkout·operation.··pre·ping
 9323 only·applies·to·a·DBAPI·connection·that’s·been·checked·into·the·pool
 9324 and·is·being·checked·out·again.</p>
 9325 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/4524">#4524</a></p>
 9326 </p>
 9327 </li>
9321 <li><p·class="caption"·id="change-1.4.0b1-54"><span·class="target"·id="change-d3650b27f4c852ac687ea55326051ed0"><strong>[engine]·[change]·[performance]·[py3k]</strong>·<a·class="changelog-reference·headerlink·reference·internal"·href="#change-d3650b27f4c852ac687ea55326051ed0">¶</a></span><p>Disabled·the·“unicode·returns”·check·that·runs·on·dialect·startup·when9328 <li><p·class="caption"·id="change-1.4.0b1-55"><span·class="target"·id="change-d3650b27f4c852ac687ea55326051ed0"><strong>[engine]·[performance]·[change]·[py3k]</strong>·<a·class="changelog-reference·headerlink·reference·internal"·href="#change-d3650b27f4c852ac687ea55326051ed0">¶</a></span><p>Disabled·the·“unicode·returns”·check·that·runs·on·dialect·startup·when
9322 running·under·Python·3,·which·for·many·years·has·occurred·in·order·to·test9329 running·under·Python·3,·which·for·many·years·has·occurred·in·order·to·test
9323 the·current·DBAPI’s·behavior·for·whether·or·not·it·returns·Python·Unicode9330 the·current·DBAPI’s·behavior·for·whether·or·not·it·returns·Python·Unicode
9324 or·Py2K·strings·for·the·VARCHAR·and·NVARCHAR·datatypes.··The·check·still9331 or·Py2K·strings·for·the·VARCHAR·and·NVARCHAR·datatypes.··The·check·still
9325 occurs·by·default·under·Python·2,·however·the·mechanism·to·test·the9332 occurs·by·default·under·Python·2,·however·the·mechanism·to·test·the
9326 behavior·will·be·removed·in·SQLAlchemy·2.0·when·Python·2·support·is·also9333 behavior·will·be·removed·in·SQLAlchemy·2.0·when·Python·2·support·is·also
9327 removed.</p>9334 removed.</p>
9328 <p>This·logic·was·very·effective·when·it·was·needed,·however·now·that·Python·39335 <p>This·logic·was·very·effective·when·it·was·needed,·however·now·that·Python·3
Offset 9333, 21 lines modifiedOffset 9340, 14 lines modified
9333 dialect·flags·by·setting·the·dialect·level·flag·<code·class="docutils·literal·notranslate"><span·class="pre">returns_unicode_strings</span></code>9340 dialect·flags·by·setting·the·dialect·level·flag·<code·class="docutils·literal·notranslate"><span·class="pre">returns_unicode_strings</span></code>
9334 to·one·of·<code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">String.RETURNS_CONDITIONAL</span></code>·or9341 to·one·of·<code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">String.RETURNS_CONDITIONAL</span></code>·or
9335 <code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">String.RETURNS_BYTES</span></code>,·both·of·which·will·enable·Unicode·conversion9342 <code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">String.RETURNS_BYTES</span></code>,·both·of·which·will·enable·Unicode·conversion
9336 even·under·Python·3.</p>9343 even·under·Python·3.</p>
9337 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/5315">#5315</a></p>9344 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/5315">#5315</a></p>
9338 </p>9345 </p>
9339 </li>9346 </li>
9340 <li><p·class="caption"·id="change-1.4.0b1-55"><span·class="target"·id="change-6bc91a2bef8d8afd244e6dbd38439c4d"><strong>[engine]·[performance]</strong>·<a·class="changelog-reference·headerlink·reference·internal"·href="#change-6bc91a2bef8d8afd244e6dbd38439c4d">¶</a></span><p>The·pool·“pre-ping”·feature·has·been·refined·to·not·invoke·for·a·DBAPI 
9341 connection·that·was·just·opened·in·the·same·checkout·operation.··pre·ping 
9342 only·applies·to·a·DBAPI·connection·that’s·been·checked·into·the·pool 
9343 and·is·being·checked·out·again.</p> 
9344 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/4524">#4524</a></p> 
9345 </p> 
9346 </li> 
9347 <li><p·class="caption"·id="change-1.4.0b1-56"><span·class="target"·id="change-f8a130923cff752e26f7be9cf1ea18eb"><strong>[engine]·[bug]</strong>·<a·class="changelog-reference·headerlink·reference·internal"·href="#change-f8a130923cff752e26f7be9cf1ea18eb">¶</a></span><p>Revised·the·<a·class="reference·internal"·href="../core/connections.html#sqlalchemy.engine.Connection.execution_options.params.schema_translate_map"·title="sqlalchemy.engine.Connection.execution_options"><code·class="xref·py·py-paramref·docutils·literal·notranslate"><span·class="pre">Connection.execution_options.schema_translate_map</span></code></a>9347 <li><p·class="caption"·id="change-1.4.0b1-56"><span·class="target"·id="change-f8a130923cff752e26f7be9cf1ea18eb"><strong>[engine]·[bug]</strong>·<a·class="changelog-reference·headerlink·reference·internal"·href="#change-f8a130923cff752e26f7be9cf1ea18eb">¶</a></span><p>Revised·the·<a·class="reference·internal"·href="../core/connections.html#sqlalchemy.engine.Connection.execution_options.params.schema_translate_map"·title="sqlalchemy.engine.Connection.execution_options"><code·class="xref·py·py-paramref·docutils·literal·notranslate"><span·class="pre">Connection.execution_options.schema_translate_map</span></code></a>
9348 feature·such·that·the·processing·of·the·SQL·statement·to·receive·a·specific9348 feature·such·that·the·processing·of·the·SQL·statement·to·receive·a·specific
9349 schema·name·occurs·within·the·execution·phase·of·the·statement,·rather·than9349 schema·name·occurs·within·the·execution·phase·of·the·statement,·rather·than
9350 at·the·compile·phase.···This·is·to·support·the·statement·being·efficiently9350 at·the·compile·phase.···This·is·to·support·the·statement·being·efficiently
9351 cached.···Previously,·the·current·schema·being·rendered·into·the·statement9351 cached.···Previously,·the·current·schema·being·rendered·into·the·statement
9352 for·a·particular·run·would·be·considered·as·part·of·the·cache·key·itself,9352 for·a·particular·run·would·be·considered·as·part·of·the·cache·key·itself,
9353 meaning·that·for·a·run·against·hundreds·of·schemas,·there·would·be·hundreds9353 meaning·that·for·a·run·against·hundreds·of·schemas,·there·would·be·hundreds
3.01 KB
html2text {}
    
Offset 6406, 15 lines modifiedOffset 6406, 21 lines modified
6406 returned·by·the·ResultProxy·is·now·the·LegacyRow·subclass,·which·maintains6406 returned·by·the·ResultProxy·is·now·the·LegacyRow·subclass,·which·maintains
6407 mapping/tuple·hybrid·behavior,·however·the·base·_\x8R_\x8o_\x8w·class·now·behaves·more6407 mapping/tuple·hybrid·behavior,·however·the·base·_\x8R_\x8o_\x8w·class·now·behaves·more
6408 fully·like·a·named·tuple.6408 fully·like·a·named·tuple.
6409 See·also6409 See·also
6410 _\x8R_\x8o_\x8w_\x8P_\x8r_\x8o_\x8x_\x8y_\x8·_\x8i_\x8s_\x8·_\x8n_\x8o_\x8·_\x8l_\x8o_\x8n_\x8g_\x8e_\x8r_\x8·_\x8a_\x8·_\x8“_\x8p_\x8r_\x8o_\x8x_\x8y_\x8”_\x8;_\x8·_\x8i_\x8s_\x8·_\x8n_\x8o_\x8w_\x8·_\x8c_\x8a_\x8l_\x8l_\x8e_\x8d_\x8·_\x8R_\x8o_\x8w_\x8·_\x8a_\x8n_\x8d_\x8·_\x8b_\x8e_\x8h_\x8a_\x8v_\x8e_\x8s_\x8·_\x8l_\x8i_\x8k_\x8e_\x8·_\x8a_\x8n_\x8·_\x8e_\x8n_\x8h_\x8a_\x8n_\x8c_\x8e_\x8d6410 _\x8R_\x8o_\x8w_\x8P_\x8r_\x8o_\x8x_\x8y_\x8·_\x8i_\x8s_\x8·_\x8n_\x8o_\x8·_\x8l_\x8o_\x8n_\x8g_\x8e_\x8r_\x8·_\x8a_\x8·_\x8“_\x8p_\x8r_\x8o_\x8x_\x8y_\x8”_\x8;_\x8·_\x8i_\x8s_\x8·_\x8n_\x8o_\x8w_\x8·_\x8c_\x8a_\x8l_\x8l_\x8e_\x8d_\x8·_\x8R_\x8o_\x8w_\x8·_\x8a_\x8n_\x8d_\x8·_\x8b_\x8e_\x8h_\x8a_\x8v_\x8e_\x8s_\x8·_\x8l_\x8i_\x8k_\x8e_\x8·_\x8a_\x8n_\x8·_\x8e_\x8n_\x8h_\x8a_\x8n_\x8c_\x8e_\x8d
6411 _\x8n_\x8a_\x8m_\x8e_\x8d_\x8·_\x8t_\x8u_\x8p_\x8l_\x8e6411 _\x8n_\x8a_\x8m_\x8e_\x8d_\x8·_\x8t_\x8u_\x8p_\x8l_\x8e
6412 References:·_\x8#_\x84_\x87_\x81_\x806412 References:·_\x8#_\x84_\x87_\x81_\x80
 6413 [\x8[e\x8en\x8ng\x8gi\x8in\x8ne\x8e]\x8]·[\x8[p\x8pe\x8er\x8rf\x8fo\x8or\x8rm\x8ma\x8an\x8nc\x8ce\x8e]\x8]·_\x8
 6414 The·pool·“pre-ping”·feature·has·been·refined·to·not·invoke·for·a·DBAPI
 6415 connection·that·was·just·opened·in·the·same·checkout·operation.·pre·ping·only
 6416 applies·to·a·DBAPI·connection·that’s·been·checked·into·the·pool·and·is·being
 6417 checked·out·again.
 6418 References:·_\x8#_\x84_\x85_\x82_\x84
6413 [\x8[e\x8en\x8ng\x8gi\x8in\x8ne\x8e]\x8]·[\x8[c.ch.ha.an.ng.ge.e].]·[.[p.pe.er.rf.fo.or.rm.ma.an.nc.ce\x8e]\x8]·[\x8[p\x8py\x8y3\x83k\x8k]\x8]·_\x86419 [\x8[e\x8en\x8ng\x8gi\x8in\x8ne\x8e]\x8]·[\x8[p.pe.er.rf.fo.or.rm.ma.an.nc.ce.e].]·[.[c.ch.ha.an.ng.ge\x8e]\x8]·[\x8[p\x8py\x8y3\x83k\x8k]\x8]·_\x8
6414 Disabled·the·“unicode·returns”·check·that·runs·on·dialect·startup·when·running6420 Disabled·the·“unicode·returns”·check·that·runs·on·dialect·startup·when·running
6415 under·Python·3,·which·for·many·years·has·occurred·in·order·to·test·the·current6421 under·Python·3,·which·for·many·years·has·occurred·in·order·to·test·the·current
6416 DBAPI’s·behavior·for·whether·or·not·it·returns·Python·Unicode·or·Py2K·strings6422 DBAPI’s·behavior·for·whether·or·not·it·returns·Python·Unicode·or·Py2K·strings
6417 for·the·VARCHAR·and·NVARCHAR·datatypes.·The·check·still·occurs·by·default·under6423 for·the·VARCHAR·and·NVARCHAR·datatypes.·The·check·still·occurs·by·default·under
6418 Python·2,·however·the·mechanism·to·test·the·behavior·will·be·removed·in6424 Python·2,·however·the·mechanism·to·test·the·behavior·will·be·removed·in
6419 SQLAlchemy·2.0·when·Python·2·support·is·also·removed.6425 SQLAlchemy·2.0·when·Python·2·support·is·also·removed.
6420 This·logic·was·very·effective·when·it·was·needed,·however·now·that·Python·3·is6426 This·logic·was·very·effective·when·it·was·needed,·however·now·that·Python·3·is
Offset 6422, 20 lines modifiedOffset 6428, 14 lines modified
6422 datatypes.·In·the·unlikely·case·that·a·third·party·DBAPI·does·not·support·this,6428 datatypes.·In·the·unlikely·case·that·a·third·party·DBAPI·does·not·support·this,
6423 the·conversion·logic·within·_\x8S_\x8t_\x8r_\x8i_\x8n_\x8g·is·still·available·and·the·third·party6429 the·conversion·logic·within·_\x8S_\x8t_\x8r_\x8i_\x8n_\x8g·is·still·available·and·the·third·party
6424 dialect·may·specify·this·in·its·upfront·dialect·flags·by·setting·the·dialect6430 dialect·may·specify·this·in·its·upfront·dialect·flags·by·setting·the·dialect
6425 level·flag·returns_unicode_strings·to·one·of·String.RETURNS_CONDITIONAL·or6431 level·flag·returns_unicode_strings·to·one·of·String.RETURNS_CONDITIONAL·or
6426 String.RETURNS_BYTES,·both·of·which·will·enable·Unicode·conversion·even·under6432 String.RETURNS_BYTES,·both·of·which·will·enable·Unicode·conversion·even·under
6427 Python·3.6433 Python·3.
6428 References:·_\x8#_\x85_\x83_\x81_\x856434 References:·_\x8#_\x85_\x83_\x81_\x85
6429 [\x8[e\x8en\x8ng\x8gi\x8in\x8ne\x8e]\x8]·[\x8[p\x8pe\x8er\x8rf\x8fo\x8or\x8rm\x8ma\x8an\x8nc\x8ce\x8e]\x8]·_\x8 
6430 The·pool·“pre-ping”·feature·has·been·refined·to·not·invoke·for·a·DBAPI 
6431 connection·that·was·just·opened·in·the·same·checkout·operation.·pre·ping·only 
6432 applies·to·a·DBAPI·connection·that’s·been·checked·into·the·pool·and·is·being 
6433 checked·out·again. 
6434 References:·_\x8#_\x84_\x85_\x82_\x84 
6435 [\x8[e\x8en\x8ng\x8gi\x8in\x8ne\x8e]\x8]·[\x8[b\x8bu\x8ug\x8g]\x8]·_\x86435 [\x8[e\x8en\x8ng\x8gi\x8in\x8ne\x8e]\x8]·[\x8[b\x8bu\x8ug\x8g]\x8]·_\x8
6436 Revised·the·_\x8C_\x8o_\x8n_\x8n_\x8e_\x8c_\x8t_\x8i_\x8o_\x8n_\x8._\x8e_\x8x_\x8e_\x8c_\x8u_\x8t_\x8i_\x8o_\x8n_\x8__\x8o_\x8p_\x8t_\x8i_\x8o_\x8n_\x8s_\x8._\x8s_\x8c_\x8h_\x8e_\x8m_\x8a_\x8__\x8t_\x8r_\x8a_\x8n_\x8s_\x8l_\x8a_\x8t_\x8e_\x8__\x8m_\x8a_\x8p·feature·such·that6436 Revised·the·_\x8C_\x8o_\x8n_\x8n_\x8e_\x8c_\x8t_\x8i_\x8o_\x8n_\x8._\x8e_\x8x_\x8e_\x8c_\x8u_\x8t_\x8i_\x8o_\x8n_\x8__\x8o_\x8p_\x8t_\x8i_\x8o_\x8n_\x8s_\x8._\x8s_\x8c_\x8h_\x8e_\x8m_\x8a_\x8__\x8t_\x8r_\x8a_\x8n_\x8s_\x8l_\x8a_\x8t_\x8e_\x8__\x8m_\x8a_\x8p·feature·such·that
6437 the·processing·of·the·SQL·statement·to·receive·a·specific·schema·name·occurs6437 the·processing·of·the·SQL·statement·to·receive·a·specific·schema·name·occurs
6438 within·the·execution·phase·of·the·statement,·rather·than·at·the·compile·phase.6438 within·the·execution·phase·of·the·statement,·rather·than·at·the·compile·phase.
6439 This·is·to·support·the·statement·being·efficiently·cached.·Previously,·the6439 This·is·to·support·the·statement·being·efficiently·cached.·Previously,·the
6440 current·schema·being·rendered·into·the·statement·for·a·particular·run·would·be6440 current·schema·being·rendered·into·the·statement·for·a·particular·run·would·be
6441 considered·as·part·of·the·cache·key·itself,·meaning·that·for·a·run·against6441 considered·as·part·of·the·cache·key·itself,·meaning·that·for·a·run·against
9.98 KB
./usr/share/doc/python-sqlalchemy-doc/html/changelog/changelog_20.html
    
Offset 8985, 45 lines modifiedOffset 8985, 45 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-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 
8993 <code·class="docutils·literal·notranslate"><span·class="pre">fromisoformat()</span></code>·methods·in·order·to·parse·incoming·datetime,·date,·and 
8994 time·string·values.·This·improves·performance·vs.·the·previous·regular 
8995 expression-based·approach,·and·also·automatically·accommodates·for·datetime 
8996 and·time·formats·that·contain·either·a·six-digit·“microseconds”·format·or·a 
8997 three-digit·“milliseconds”·format.</p> 
8998 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/7029">#7029</a></p> 
8999 </p> 
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·statements8992 <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
9002 that·may·refer·to·additional·tables·within·the·WHERE·criteria·of·the8993 that·may·refer·to·additional·tables·within·the·WHERE·criteria·of·the
9003 statement·without·the·need·to·use·subqueries.·This·syntax·is·invoked8994 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·than8995 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>8996 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>8997 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/7185">#7185</a></p>
9007 </p>8998 </p>
9008 </li>8999 </li>
9009 <li><p·class="caption"·id="change-2.0.0b1-88"><span·class="target"·id="change-aba109875059299e0eb82359b5825416"><strong>[sqlite]·[performance]·[bug]</strong>·<a·class="changelog-reference·headerlink·reference·internal"·href="#change-aba109875059299e0eb82359b5825416">¶</a></span><p>The·SQLite·dialect·now·defaults·to·<a·class="reference·internal"·href="../core/pooling.html#sqlalchemy.pool.QueuePool"·title="sqlalchemy.pool.QueuePool"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">QueuePool</span></code></a>·when·a·file9000 <li><p·class="caption"·id="change-2.0.0b1-87"><span·class="target"·id="change-aba109875059299e0eb82359b5825416"><strong>[sqlite]·[performance]·[bug]</strong>·<a·class="changelog-reference·headerlink·reference·internal"·href="#change-aba109875059299e0eb82359b5825416">¶</a></span><p>The·SQLite·dialect·now·defaults·to·<a·class="reference·internal"·href="../core/pooling.html#sqlalchemy.pool.QueuePool"·title="sqlalchemy.pool.QueuePool"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">QueuePool</span></code></a>·when·a·file
9010 based·database·is·used.·This·is·set·along·with·setting·the9001 based·database·is·used.·This·is·set·along·with·setting·the
9011 <code·class="docutils·literal·notranslate"><span·class="pre">check_same_thread</span></code>·parameter·to·<code·class="docutils·literal·notranslate"><span·class="pre">False</span></code>.·It·has·been·observed·that·the9002 <code·class="docutils·literal·notranslate"><span·class="pre">check_same_thread</span></code>·parameter·to·<code·class="docutils·literal·notranslate"><span·class="pre">False</span></code>.·It·has·been·observed·that·the
9012 previous·approach·of·defaulting·to·<a·class="reference·internal"·href="../core/pooling.html#sqlalchemy.pool.NullPool"·title="sqlalchemy.pool.NullPool"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">NullPool</span></code></a>,·which·does·not9003 previous·approach·of·defaulting·to·<a·class="reference·internal"·href="../core/pooling.html#sqlalchemy.pool.NullPool"·title="sqlalchemy.pool.NullPool"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">NullPool</span></code></a>,·which·does·not
9013 hold·onto·database·connections·after·they·are·released,·did·in·fact·have·a9004 hold·onto·database·connections·after·they·are·released,·did·in·fact·have·a
9014 measurable·negative·performance·impact.·As·always,·the·pool·class·is9005 measurable·negative·performance·impact.·As·always,·the·pool·class·is
9015 customizable·via·the·<a·class="reference·internal"·href="../core/engines.html#sqlalchemy.create_engine.params.poolclass"·title="sqlalchemy.create_engine"><code·class="xref·py·py-paramref·docutils·literal·notranslate"><span·class="pre">create_engine.poolclass</span></code></a>·parameter.</p>9006 customizable·via·the·<a·class="reference·internal"·href="../core/engines.html#sqlalchemy.create_engine.params.poolclass"·title="sqlalchemy.create_engine"><code·class="xref·py·py-paramref·docutils·literal·notranslate"><span·class="pre">create_engine.poolclass</span></code></a>·parameter.</p>
9016 <div·class="admonition·seealso">9007 <div·class="admonition·seealso">
9017 <p·class="admonition-title">See·also</p>9008 <p·class="admonition-title">See·also</p>
9018 <p><a·class="reference·internal"·href="whatsnew_20.html#change-7490"><span·class="std·std-ref">The·SQLite·dialect·uses·QueuePool·for·file-based·databases</span></a></p>9009 <p><a·class="reference·internal"·href="whatsnew_20.html#change-7490"><span·class="std·std-ref">The·SQLite·dialect·uses·QueuePool·for·file-based·databases</span></a></p>
9019 </div>9010 </div>
9020 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/7490">#7490</a></p>9011 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/7490">#7490</a></p>
9021 </p>9012 </p>
9022 </li>9013 </li>
 9014 <li><p·class="caption"·id="change-2.0.0b1-88"><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·lib
 9015 <code·class="docutils·literal·notranslate"><span·class="pre">fromisoformat()</span></code>·methods·in·order·to·parse·incoming·datetime,·date,·and
 9016 time·string·values.·This·improves·performance·vs.·the·previous·regular
 9017 expression-based·approach,·and·also·automatically·accommodates·for·datetime
 9018 and·time·formats·that·contain·either·a·six-digit·“microseconds”·format·or·a
 9019 three-digit·“milliseconds”·format.</p>
 9020 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/7029">#7029</a></p>
 9021 </p>
 9022 </li>
9023 <li><p·class="caption"·id="change-2.0.0b1-89"><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·about9023 <li><p·class="caption"·id="change-2.0.0b1-89"><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
9024 DBAPIs·not·supporting·Decimal·values·natively.·This·warning·was·oriented9024 DBAPIs·not·supporting·Decimal·values·natively.·This·warning·was·oriented
9025 towards·SQLite,·which·does·not·have·any·real·way·without·additional9025 towards·SQLite,·which·does·not·have·any·real·way·without·additional
9026 extensions·or·workarounds·of·handling·precision·numeric·values·more·than·159026 extensions·or·workarounds·of·handling·precision·numeric·values·more·than·15
9027 significant·digits·as·it·only·uses·floating·point·math·to·represent9027 significant·digits·as·it·only·uses·floating·point·math·to·represent
9028 numbers.·As·this·is·a·known·and·documented·limitation·in·SQLite·itself,·and9028 numbers.·As·this·is·a·known·and·documented·limitation·in·SQLite·itself,·and
9029 not·a·quirk·of·the·pysqlite·driver,·there’s·no·need·for·SQLAlchemy·to·warn9029 not·a·quirk·of·the·pysqlite·driver,·there’s·no·need·for·SQLAlchemy·to·warn
2.93 KB
html2text {}
    
Offset 6179, 22 lines modifiedOffset 6179, 14 lines modified
6179 ······See·also6179 ······See·also
6180 ······_\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_\x8s6180 ······_\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
6181 ······References:·_\x8#_\x88_\x82_\x83_\x846181 ······References:·_\x8#_\x88_\x82_\x83_\x84
6182 [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[u\x8us\x8se\x8ec\x8ca\x8as\x8se\x8e]\x8]·_\x86182 [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[u\x8us\x8se\x8ec\x8ca\x8as\x8se\x8e]\x8]·_\x8
6183 Added·RETURNING·support·for·the·SQLite·dialect.·SQLite·supports·RETURNING·since6183 Added·RETURNING·support·for·the·SQLite·dialect.·SQLite·supports·RETURNING·since
6184 version·3.35.6184 version·3.35.
6185 References:·_\x8#_\x86_\x81_\x89_\x856185 References:·_\x8#_\x86_\x81_\x89_\x85
6186 [\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 
6187 SQLite·datetime,·date,·and·time·datatypes·now·use·Python·standard·lib 
6188 fromisoformat()·methods·in·order·to·parse·incoming·datetime,·date,·and·time 
6189 string·values.·This·improves·performance·vs.·the·previous·regular·expression- 
6190 based·approach,·and·also·automatically·accommodates·for·datetime·and·time 
6191 formats·that·contain·either·a·six-digit·“microseconds”·format·or·a·three-digit 
6192 “milliseconds”·format. 
6193 References:·_\x8#_\x87_\x80_\x82_\x89 
6194 [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[u\x8us\x8se\x8ec\x8ca\x8as\x8se\x8e]\x8]·_\x86186 [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[u\x8us\x8se\x8ec\x8ca\x8as\x8se\x8e]\x8]·_\x8
6195 The·SQLite·dialect·now·supports·UPDATE..FROM·syntax,·for·UPDATE·statements·that6187 The·SQLite·dialect·now·supports·UPDATE..FROM·syntax,·for·UPDATE·statements·that
6196 may·refer·to·additional·tables·within·the·WHERE·criteria·of·the·statement6188 may·refer·to·additional·tables·within·the·WHERE·criteria·of·the·statement
6197 without·the·need·to·use·subqueries.·This·syntax·is·invoked·automatically·when6189 without·the·need·to·use·subqueries.·This·syntax·is·invoked·automatically·when
6198 using·the·_\x8U_\x8p_\x8d_\x8a_\x8t_\x8e·construct·when·more·than·one·table·or·other·entity·or6190 using·the·_\x8U_\x8p_\x8d_\x8a_\x8t_\x8e·construct·when·more·than·one·table·or·other·entity·or
6199 selectable·is·used.6191 selectable·is·used.
6200 References:·_\x8#_\x87_\x81_\x88_\x856192 References:·_\x8#_\x87_\x81_\x88_\x85
Offset 6204, 14 lines modifiedOffset 6196, 22 lines modified
6204 It·has·been·observed·that·the·previous·approach·of·defaulting·to·_\x8N_\x8u_\x8l_\x8l_\x8P_\x8o_\x8o_\x8l,6196 It·has·been·observed·that·the·previous·approach·of·defaulting·to·_\x8N_\x8u_\x8l_\x8l_\x8P_\x8o_\x8o_\x8l,
6205 which·does·not·hold·onto·database·connections·after·they·are·released,·did·in6197 which·does·not·hold·onto·database·connections·after·they·are·released,·did·in
6206 fact·have·a·measurable·negative·performance·impact.·As·always,·the·pool·class6198 fact·have·a·measurable·negative·performance·impact.·As·always,·the·pool·class
6207 is·customizable·via·the·_\x8c_\x8r_\x8e_\x8a_\x8t_\x8e_\x8__\x8e_\x8n_\x8g_\x8i_\x8n_\x8e_\x8._\x8p_\x8o_\x8o_\x8l_\x8c_\x8l_\x8a_\x8s_\x8s·parameter.6199 is·customizable·via·the·_\x8c_\x8r_\x8e_\x8a_\x8t_\x8e_\x8__\x8e_\x8n_\x8g_\x8i_\x8n_\x8e_\x8._\x8p_\x8o_\x8o_\x8l_\x8c_\x8l_\x8a_\x8s_\x8s·parameter.
6208 See·also6200 See·also
6209 _\x8T_\x8h_\x8e_\x8·_\x8S_\x8Q_\x8L_\x8i_\x8t_\x8e_\x8·_\x8d_\x8i_\x8a_\x8l_\x8e_\x8c_\x8t_\x8·_\x8u_\x8s_\x8e_\x8s_\x8·_\x8Q_\x8u_\x8e_\x8u_\x8e_\x8P_\x8o_\x8o_\x8l_\x8·_\x8f_\x8o_\x8r_\x8·_\x8f_\x8i_\x8l_\x8e_\x8-_\x8b_\x8a_\x8s_\x8e_\x8d_\x8·_\x8d_\x8a_\x8t_\x8a_\x8b_\x8a_\x8s_\x8e_\x8s6201 _\x8T_\x8h_\x8e_\x8·_\x8S_\x8Q_\x8L_\x8i_\x8t_\x8e_\x8·_\x8d_\x8i_\x8a_\x8l_\x8e_\x8c_\x8t_\x8·_\x8u_\x8s_\x8e_\x8s_\x8·_\x8Q_\x8u_\x8e_\x8u_\x8e_\x8P_\x8o_\x8o_\x8l_\x8·_\x8f_\x8o_\x8r_\x8·_\x8f_\x8i_\x8l_\x8e_\x8-_\x8b_\x8a_\x8s_\x8e_\x8d_\x8·_\x8d_\x8a_\x8t_\x8a_\x8b_\x8a_\x8s_\x8e_\x8s
6210 References:·_\x8#_\x87_\x84_\x89_\x806202 References:·_\x8#_\x87_\x84_\x89_\x80
 6203 [\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
 6204 SQLite·datetime,·date,·and·time·datatypes·now·use·Python·standard·lib
 6205 fromisoformat()·methods·in·order·to·parse·incoming·datetime,·date,·and·time
 6206 string·values.·This·improves·performance·vs.·the·previous·regular·expression-
 6207 based·approach,·and·also·automatically·accommodates·for·datetime·and·time
 6208 formats·that·contain·either·a·six-digit·“microseconds”·format·or·a·three-digit
 6209 “milliseconds”·format.
 6210 References:·_\x8#_\x87_\x80_\x82_\x89
6211 [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[b\x8bu\x8ug\x8g]\x8]·_\x86211 [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[b\x8bu\x8ug\x8g]\x8]·_\x8
6212 Removed·the·warning·that·emits·from·the·_\x8N_\x8u_\x8m_\x8e_\x8r_\x8i_\x8c·type·about·DBAPIs·not6212 Removed·the·warning·that·emits·from·the·_\x8N_\x8u_\x8m_\x8e_\x8r_\x8i_\x8c·type·about·DBAPIs·not
6213 supporting·Decimal·values·natively.·This·warning·was·oriented·towards·SQLite,6213 supporting·Decimal·values·natively.·This·warning·was·oriented·towards·SQLite,
6214 which·does·not·have·any·real·way·without·additional·extensions·or·workarounds6214 which·does·not·have·any·real·way·without·additional·extensions·or·workarounds
6215 of·handling·precision·numeric·values·more·than·15·significant·digits·as·it·only6215 of·handling·precision·numeric·values·more·than·15·significant·digits·as·it·only
6216 uses·floating·point·math·to·represent·numbers.·As·this·is·a·known·and6216 uses·floating·point·math·to·represent·numbers.·As·this·is·a·known·and
6217 documented·limitation·in·SQLite·itself,·and·not·a·quirk·of·the·pysqlite·driver,6217 documented·limitation·in·SQLite·itself,·and·not·a·quirk·of·the·pysqlite·driver,
30.4 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> 
329 <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>·object326 <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
330 for·asynchronous·ORM·use.</p>327 for·asynchronous·ORM·use.</p>
331 </p></li>328 </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>
333 </p></li>331 </p></li>
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>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>
335 along·many·asyncio·database·connections,·merging·ORM·results·into·a·single333 along·many·asyncio·database·connections,·merging·ORM·results·into·a·single
336 <code·class="docutils·literal·notranslate"><span·class="pre">AsyncSession</span></code>.</p>334 <code·class="docutils·literal·notranslate"><span·class="pre">AsyncSession</span></code>.</p>
337 </p></li>335 </p></li>
338 <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·handling336 <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
339 of·ORM·collections·under·asyncio.</p>337 of·ORM·collections·under·asyncio.</p>
340 </p></li>338 </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> 
389 <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·association385 <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
390 using·a·single·target·table·and·a·single·association·table,386 using·a·single·target·table·and·a·single·association·table,
391 referred·to·by·all·parent·tables.··The·association·table387 referred·to·by·all·parent·tables.··The·association·table
392 contains·a·“discriminator”·column·which·determines·what·type·of388 contains·a·“discriminator”·column·which·determines·what·type·of
393 parent·object·associates·to·each·particular·row·in·the·association389 parent·object·associates·to·each·particular·row·in·the·association
394 table.</p>390 table.</p>
395 </p></li>391 </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> 
401 <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·fashion392 <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
402 to·that·of·popular·frameworks·such·as·Django,·ROR,·etc.··This393 to·that·of·popular·frameworks·such·as·Django,·ROR,·etc.··This
403 approach·bypasses·standard·referential·integrity394 approach·bypasses·standard·referential·integrity
404 practices,·in·that·the·“foreign·key”·column·is·not·actually395 practices,·in·that·the·“foreign·key”·column·is·not·actually
405 constrained·to·refer·to·any·particular·table;·instead,396 constrained·to·refer·to·any·particular·table;·instead,
406 in-application·logic·is·used·to·determine·which·table·is·referenced.</p>397 in-application·logic·is·used·to·determine·which·table·is·referenced.</p>
407 </p></li>398 </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> 
489 <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·row484 <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
490 within·a·distinct·transaction,·and·afterwards·returns·to·essentially·a485 within·a·distinct·transaction,·and·afterwards·returns·to·essentially·a
491 “closed”·state.···This·would·be·analogous·to·an·API·call·that·starts·up486 “closed”·state.···This·would·be·analogous·to·an·API·call·that·starts·up
492 a·database·connection,·inserts·the·row,·commits·and·closes.</p>487 a·database·connection,·inserts·the·row,·commits·and·closes.</p>
493 </p></li>488 </p></li>
494 <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·single489 <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
495 record·by·primary·key</p>490 record·by·primary·key</p>
496 </p></li>491 </p></li>
497 <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·number492 <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
498 of·rows·in·bulk.</p>493 of·rows·in·bulk.</p>
499 </p></li>494 </p></li>
500 <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·number495 <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
501 of·rows·in·bulk·(under·construction!·there’s·just·one·test·at·the·moment)</p>496 of·rows·in·bulk·(under·construction!·there’s·just·one·test·at·the·moment)</p>
502 </p></li>497 </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">
 763 <li><p><p><a·class="reference·external"·href="../_modules/examples/versioned_rows/versioned_rows.html">versioned_rows.py</a>·-·Illustrates·a·method·to·intercept·changes·on·objects,·turning
Max diff block lines reached; 6018/16614 bytes (36.22%) of diff not shown.
14.1 KB
html2text {}
    
Offset 109, 25 lines modifiedOffset 109, 24 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. 
119 _\x8a_\x8s_\x8y_\x8n_\x8c_\x8__\x8o_\x8r_\x8m_\x8._\x8p_\x8y·-·Illustrates·use·of·the·sqlalchemy.ext.asyncio.AsyncSession116 ····*·_\x8a_\x8s_\x8y_\x8n_\x8c_\x8__\x8o_\x8r_\x8m_\x8._\x8p_\x8y·-·Illustrates·use·of·the·sqlalchemy.ext.asyncio.AsyncSession
120 object·for·asynchronous·ORM·use.117 ······object·for·asynchronous·ORM·use.
121 _\x8b_.a_.s_.i_.c_.._.p_.y·-·Illustrates·the·asyncio·engine·/·connection·interface.118 _\x8g_.r_.e_.e_.n_.l_.e_.t_.__.o_.r_.m_.._.p_.y·-·Illustrates·use·of·the·sqlalchemy.ext.asyncio.AsyncSession
 119 object·for·asynchronous·ORM·use,·including·the·optional·run_sync()·method.
122 _\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·concurrently120 _\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
123 using·asyncio.gather()·along·many·asyncio·database·connections,·merging·ORM121 using·asyncio.gather()·along·many·asyncio·database·connections,·merging·ORM
124 results·into·a·single·AsyncSession.122 results·into·a·single·AsyncSession.
125 _\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·simpler123 _\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
126 handling·of·ORM·collections·under·asyncio.124 handling·of·ORM·collections·under·asyncio.
 125 _\x8b_\x8a_\x8s_\x8i_\x8c_\x8._\x8p_\x8y·-·Illustrates·the·asyncio·engine·/·connection·interface.
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*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*
128 An·example·of·persistence·for·a·directed·graph·structure.·The·graph·is·stored127 An·example·of·persistence·for·a·directed·graph·structure.·The·graph·is·stored
129 as·a·collection·of·edges,·each·referencing·both·a·“lower”·and·an·“upper”·node128 as·a·collection·of·edges,·each·referencing·both·a·“lower”·and·an·“upper”·node
130 in·a·table·of·nodes.·Basic·persistence·and·querying·for·lower-·and·upper-129 in·a·table·of·nodes.·Basic·persistence·and·querying·for·lower-·and·upper-
131 neighbors·are·illustrated:130 neighbors·are·illustrated:
132 n2·=·Node(2)131 n2·=·Node(2)
133 n5·=·Node(5)132 n5·=·Node(5)
Offset 149, 31 lines modifiedOffset 148, 31 lines modified
149 Supplier,·both·subclassing·the·HasAddresses·mixin,·which·ensures·that·the148 Supplier,·both·subclassing·the·HasAddresses·mixin,·which·ensures·that·the
150 parent·class·is·provided·with·an·addresses·collection·which·contains·Address149 parent·class·is·provided·with·an·addresses·collection·which·contains·Address
151 objects.150 objects.
152 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·modernized151 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
153 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_\x8s152 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
154 _\x8w_\x8i_\x8t_\x8h_\x8·_\x8S_\x8Q_\x8L_\x8A_\x8l_\x8c_\x8h_\x8e_\x8m_\x8y.153 _\x8w_\x8i_\x8t_\x8h_\x8·_\x8S_\x8Q_\x8L_\x8A_\x8l_\x8c_\x8h_\x8e_\x8m_\x8y.
155 Listing·of·files:154 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. 
159 _.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·generic155 ····*·_.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
160 association·using·a·single·target·table·and·a·single·association·table,156 ······generic·association·using·a·single·target·table·and·a·single·association
161 referred·to·by·all·parent·tables.·The·association·table·contains·a157 ······table,·referred·to·by·all·parent·tables.·The·association·table·contains·a
162 “discriminator”·column·which·determines·what·type·of·parent·object·associates158 ······“discriminator”·column·which·determines·what·type·of·parent·object
163 to·each·particular·row·in·the·association·table.159 ······associates·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. 
168 _\x8g_\x8e_\x8n_\x8e_\x8r_\x8i_\x8c_\x8__\x8f_\x8k_\x8._\x8p_\x8y·-·Illustrates·a·so-called·“generic·foreign·key”,·in·a·similar160 _\x8g_\x8e_\x8n_\x8e_\x8r_\x8i_\x8c_\x8__\x8f_\x8k_\x8._\x8p_\x8y·-·Illustrates·a·so-called·“generic·foreign·key”,·in·a·similar
169 fashion·to·that·of·popular·frameworks·such·as·Django,·ROR,·etc.·This·approach161 fashion·to·that·of·popular·frameworks·such·as·Django,·ROR,·etc.·This·approach
170 bypasses·standard·referential·integrity·practices,·in·that·the·“foreign·key”162 bypasses·standard·referential·integrity·practices,·in·that·the·“foreign·key”
171 column·is·not·actually·constrained·to·refer·to·any·particular·table;·instead,163 column·is·not·actually·constrained·to·refer·to·any·particular·table;·instead,
172 in-application·logic·is·used·to·determine·which·table·is·referenced.164 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.
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*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*
174 Illustrates·the·“materialized·paths”·pattern·for·hierarchical·data·using·the173 Illustrates·the·“materialized·paths”·pattern·for·hierarchical·data·using·the
175 SQLAlchemy·ORM.174 SQLAlchemy·ORM.
176 Listing·of·files:175 Listing·of·files:
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.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.
178 *\x8**\x8**\x8**\x8*·N\x8Ne\x8es\x8st\x8te\x8ed\x8d·S\x8Se\x8et\x8ts\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*177 *\x8**\x8**\x8**\x8*·N\x8Ne\x8es\x8st\x8te\x8ed\x8d·S\x8Se\x8et\x8ts\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*
179 Illustrates·a·rudimentary·way·to·implement·the·“nested·sets”·pattern·for178 Illustrates·a·rudimentary·way·to·implement·the·“nested·sets”·pattern·for
Offset 221, 29 lines modifiedOffset 220, 29 lines modified
221 $·python·-m·examples.performance·bulk_inserts·\220 $·python·-m·examples.performance·bulk_inserts·\
222 ····--dburl·mysql+mysqldb://scott:tiger@localhost/test·\221 ····--dburl·mysql+mysqldb://scott:tiger@localhost/test·\
223 ····--profile·--num·1000222 ····--profile·--num·1000
224 See·also223 See·also
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?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?
226 *\x8**\x8**\x8*·F\x8Fi\x8il\x8le\x8e·L\x8Li\x8is\x8st\x8ti\x8in\x8ng\x8g_\x8?\x8·*\x8**\x8**\x8*225 *\x8**\x8**\x8*·F\x8Fi\x8il\x8le\x8e·L\x8Li\x8is\x8st\x8ti\x8in\x8ng\x8g_\x8?\x8·*\x8**\x8**\x8*
227 Listing·of·files:226 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. 
232 _.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·that227 ····*·_.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
233 inserts·a·row·within·a·distinct·transaction,·and·afterwards·returns·to228 ······that·inserts·a·row·within·a·distinct·transaction,·and·afterwards·returns
234 essentially·a·“closed”·state.·This·would·be·analogous·to·an·API·call·that229 ······to·essentially·a·“closed”·state.·This·would·be·analogous·to·an·API·call
235 starts·up·a·database·connection,·inserts·the·row,·commits·and·closes.230 ······that·starts·up·a·database·connection,·inserts·the·row,·commits·and
 231 ······closes.
236 _\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·a232 _\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
237 single·record·by·primary·key233 single·record·by·primary·key
238 _\x8b_\x8u_\x8l_\x8k_\x8__\x8i_\x8n_\x8s_\x8e_\x8r_\x8t_\x8s_\x8._\x8p_\x8y·-·This·series·of·tests·illustrates·different·ways·to·INSERT·a234 _\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
239 large·number·of·rows·in·bulk.235 large·number·of·rows·in·bulk.
240 _\x8b_\x8u_\x8l_\x8k_\x8__\x8u_\x8p_\x8d_\x8a_\x8t_\x8e_\x8s_\x8._\x8p_\x8y·-·This·series·of·tests·will·illustrate·different·ways·to·UPDATE236 _\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
241 a·large·number·of·rows·in·bulk·(under·construction!·there’s·just·one·test·at237 a·large·number·of·rows·in·bulk·(under·construction!·there’s·just·one·test·at
242 the·moment)238 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.
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*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*
244 This·is·the·default·form·of·run:243 This·is·the·default·form·of·run:
245 $·python·-m·examples.performance·single_inserts244 $·python·-m·examples.performance·single_inserts
246 Tests·to·run:·test_orm_commit,·test_bulk_save,245 Tests·to·run:·test_orm_commit,·test_bulk_save,
247 ··············test_bulk_insert_dictionaries,·test_core,246 ··············test_bulk_insert_dictionaries,·test_core,
248 ··············test_core_query_caching,·test_dbapi_raw_w_connect,247 ··············test_core_query_caching,·test_dbapi_raw_w_connect,
249 ··············test_dbapi_raw_w_pool248 ··············test_dbapi_raw_w_pool
Offset 474, 28 lines modifiedOffset 473, 27 lines modified
474 Several·examples·that·illustrate·the·technique·of·intercepting·changes·that473 Several·examples·that·illustrate·the·technique·of·intercepting·changes·that
475 would·be·first·interpreted·as·an·UPDATE·on·a·row,·and·instead·turning·it·into474 would·be·first·interpreted·as·an·UPDATE·on·a·row,·and·instead·turning·it·into
476 an·INSERT·of·a·new·row,·leaving·the·previous·row·intact·as·a·historical475 an·INSERT·of·a·new·row,·leaving·the·previous·row·intact·as·a·historical
477 version.476 version.
478 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·history477 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
479 row·to·a·separate·history·table.478 row·to·a·separate·history·table.
480 Listing·of·files:479 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.
481 ····*·_.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·INSERT483 _.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·technique
482 ······technique·of·versioned_rows.py,·but·also·emits·an·UPDATE·on·the·o.ol.ld.d·row484 of·versioned_rows.py,·but·also·emits·an·UPDATE·on·the·o.ol.ld.d·row·to·affect·a
483 ······to·affect·a·change·in·timestamp.·Also·includes·a 
484 ······_.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·most485 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·to
485 ······recent·version.486 limit·queries·to·only·the·most·recent·version.
486 _\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·on487 _\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
487 objects,·turning·an·UPDATE·statement·on·a·single·row·into·an·INSERT·statement,488 objects,·turning·an·UPDATE·statement·on·a·single·row·into·an·INSERT·statement,
488 so·that·a·new·row·is·inserted·with·the·new·data,·keeping·the·old·row·intact.489 so·that·a·new·row·is·inserted·with·the·new·data,·keeping·the·old·row·intact.
489 _\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·the490 _\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
490 concept·of·a·“vertical·table”·structure,·like·those·illustrated·in·_\x8V_\x8e_\x8r_\x8t_\x8i_\x8c_\x8a_\x8l491 concept·of·a·“vertical·table”·structure,·like·those·illustrated·in·_\x8V_\x8e_\x8r_\x8t_\x8i_\x8c_\x8a_\x8l
491 _\x8A_\x8t_\x8t_\x8r_\x8i_\x8b_\x8u_\x8t_\x8e_\x8·_\x8M_\x8a_\x8p_\x8p_\x8i_\x8n_\x8g·examples.492 _\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. 
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*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*
496 Illustrates·“vertical·table”·mappings.494 Illustrates·“vertical·table”·mappings.
Max diff block lines reached; 3732/14377 bytes (25.96%) of diff not shown.