59.1 KB
/srv/reproducible-results/rbuild-debian/r-b-build.916HYuNS/b1/sqlalchemy_2.0.32+ds1-1_amd64.changes vs.
/srv/reproducible-results/rbuild-debian/r-b-build.916HYuNS/b2/sqlalchemy_2.0.32+ds1-1_amd64.changes
539 B
Files
    
Offset 1, 5 lines modifiedOffset 1, 5 lines modified
  
1 ·f1fe4576460adde0669056fb9c9a6fb8·3956072·doc·optional·python-sqlalchemy-doc_2.0.32+ds1-1_all.deb1 ·32b423750e4a03e0af69caa1a3c42f95·3955880·doc·optional·python-sqlalchemy-doc_2.0.32+ds1-1_all.deb
2 ·54c5abf27dd546ce80b9fea0a6dd2e17·918852·debug·optional·python3-sqlalchemy-ext-dbgsym_2.0.32+ds1-1_amd64.deb2 ·54c5abf27dd546ce80b9fea0a6dd2e17·918852·debug·optional·python3-sqlalchemy-ext-dbgsym_2.0.32+ds1-1_amd64.deb
3 ·f551c8e8b0313dec869d25b70194d2e3·152896·python·optional·python3-sqlalchemy-ext_2.0.32+ds1-1_amd64.deb3 ·f551c8e8b0313dec869d25b70194d2e3·152896·python·optional·python3-sqlalchemy-ext_2.0.32+ds1-1_amd64.deb
4 ·e1c78ec120d9d481e2a5c4c579530013·1196072·python·optional·python3-sqlalchemy_2.0.32+ds1-1_all.deb4 ·e1c78ec120d9d481e2a5c4c579530013·1196072·python·optional·python3-sqlalchemy_2.0.32+ds1-1_all.deb
58.4 KB
python-sqlalchemy-doc_2.0.32+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·2024-08-23·07:52:58.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-23·07:52:58.000000·debian-binary
2 -rw-r--r--···0········0········0····13912·2024-08-23·07:52:58.000000·control.tar.xz2 -rw-r--r--···0········0········0····13908·2024-08-23·07:52:58.000000·control.tar.xz
3 -rw-r--r--···0········0········0··3941968·2024-08-23·07:52:58.000000·data.tar.xz3 -rw-r--r--···0········0········0··3941780·2024-08-23·07:52:58.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
57.7 KB
data.tar.xz
57.7 KB
data.tar
7.67 KB
./usr/share/doc/python-sqlalchemy-doc/html/changelog/changelog_14.html
    
Offset 9239, 22 lines modifiedOffset 9239, 15 lines modified
9239 <div·class="admonition·seealso">9239 <div·class="admonition·seealso">
9240 <p·class="admonition-title">See·also</p>9240 <p·class="admonition-title">See·also</p>
9241 <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>9241 <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>
9242 </div>9242 </div>
9243 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/4710">#4710</a></p>9243 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/4710">#4710</a></p>
9244 </p>9244 </p>
9245 </li>9245 </li>
9246 <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 
9247 connection·that·was·just·opened·in·the·same·checkout·operation.··pre·ping 
9248 only·applies·to·a·DBAPI·connection·that’s·been·checked·into·the·pool 
9249 and·is·being·checked·out·again.</p> 
9250 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/4524">#4524</a></p> 
9251 </p> 
9252 </li> 
9253 <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·when9246 <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·when
9254 running·under·Python·3,·which·for·many·years·has·occurred·in·order·to·test9247 running·under·Python·3,·which·for·many·years·has·occurred·in·order·to·test
9255 the·current·DBAPI’s·behavior·for·whether·or·not·it·returns·Python·Unicode9248 the·current·DBAPI’s·behavior·for·whether·or·not·it·returns·Python·Unicode
9256 or·Py2K·strings·for·the·VARCHAR·and·NVARCHAR·datatypes.··The·check·still9249 or·Py2K·strings·for·the·VARCHAR·and·NVARCHAR·datatypes.··The·check·still
9257 occurs·by·default·under·Python·2,·however·the·mechanism·to·test·the9250 occurs·by·default·under·Python·2,·however·the·mechanism·to·test·the
9258 behavior·will·be·removed·in·SQLAlchemy·2.0·when·Python·2·support·is·also9251 behavior·will·be·removed·in·SQLAlchemy·2.0·when·Python·2·support·is·also
9259 removed.</p>9252 removed.</p>
9260 <p>This·logic·was·very·effective·when·it·was·needed,·however·now·that·Python·39253 <p>This·logic·was·very·effective·when·it·was·needed,·however·now·that·Python·3
Offset 9265, 14 lines modifiedOffset 9258, 21 lines modified
9265 dialect·flags·by·setting·the·dialect·level·flag·<code·class="docutils·literal·notranslate"><span·class="pre">returns_unicode_strings</span></code>9258 dialect·flags·by·setting·the·dialect·level·flag·<code·class="docutils·literal·notranslate"><span·class="pre">returns_unicode_strings</span></code>
9266 to·one·of·<code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">String.RETURNS_CONDITIONAL</span></code>·or9259 to·one·of·<code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">String.RETURNS_CONDITIONAL</span></code>·or
9267 <code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">String.RETURNS_BYTES</span></code>,·both·of·which·will·enable·Unicode·conversion9260 <code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">String.RETURNS_BYTES</span></code>,·both·of·which·will·enable·Unicode·conversion
9268 even·under·Python·3.</p>9261 even·under·Python·3.</p>
9269 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/5315">#5315</a></p>9262 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/5315">#5315</a></p>
9270 </p>9263 </p>
9271 </li>9264 </li>
 9265 <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
 9266 connection·that·was·just·opened·in·the·same·checkout·operation.··pre·ping
 9267 only·applies·to·a·DBAPI·connection·that’s·been·checked·into·the·pool
 9268 and·is·being·checked·out·again.</p>
 9269 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/4524">#4524</a></p>
 9270 </p>
 9271 </li>
9272 <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>9272 <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>
9273 feature·such·that·the·processing·of·the·SQL·statement·to·receive·a·specific9273 feature·such·that·the·processing·of·the·SQL·statement·to·receive·a·specific
9274 schema·name·occurs·within·the·execution·phase·of·the·statement,·rather·than9274 schema·name·occurs·within·the·execution·phase·of·the·statement,·rather·than
9275 at·the·compile·phase.···This·is·to·support·the·statement·being·efficiently9275 at·the·compile·phase.···This·is·to·support·the·statement·being·efficiently
9276 cached.···Previously,·the·current·schema·being·rendered·into·the·statement9276 cached.···Previously,·the·current·schema·being·rendered·into·the·statement
9277 for·a·particular·run·would·be·considered·as·part·of·the·cache·key·itself,9277 for·a·particular·run·would·be·considered·as·part·of·the·cache·key·itself,
9278 meaning·that·for·a·run·against·hundreds·of·schemas,·there·would·be·hundreds9278 meaning·that·for·a·run·against·hundreds·of·schemas,·there·would·be·hundreds
3.01 KB
html2text {}
    
Offset 6354, 21 lines modifiedOffset 6354, 15 lines modified
6354 returned·by·the·ResultProxy·is·now·the·LegacyRow·subclass,·which·maintains6354 returned·by·the·ResultProxy·is·now·the·LegacyRow·subclass,·which·maintains
6355 mapping/tuple·hybrid·behavior,·however·the·base·_\x8R_\x8o_\x8w·class·now·behaves·more6355 mapping/tuple·hybrid·behavior,·however·the·base·_\x8R_\x8o_\x8w·class·now·behaves·more
6356 fully·like·a·named·tuple.6356 fully·like·a·named·tuple.
6357 See·also6357 See·also
6358 _\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_\x8d6358 _\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
6359 _\x8n_\x8a_\x8m_\x8e_\x8d_\x8·_\x8t_\x8u_\x8p_\x8l_\x8e6359 _\x8n_\x8a_\x8m_\x8e_\x8d_\x8·_\x8t_\x8u_\x8p_\x8l_\x8e
6360 References:·_\x8#_\x84_\x87_\x81_\x806360 References:·_\x8#_\x84_\x87_\x81_\x80
6361 [\x8[e\x8en\x8ng\x8gi\x8in\x8ne\x8e]\x8]·[\x8[p\x8pe\x8er\x8rf\x8fo\x8or\x8rm\x8ma\x8an\x8nc\x8ce\x8e]\x8]·_\x8 
6362 The·pool·“pre-ping”·feature·has·been·refined·to·not·invoke·for·a·DBAPI 
6363 connection·that·was·just·opened·in·the·same·checkout·operation.·pre·ping·only 
6364 applies·to·a·DBAPI·connection·that’s·been·checked·into·the·pool·and·is·being 
6365 checked·out·again. 
6366 References:·_\x8#_\x84_\x85_\x82_\x84 
6367 [\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]·_\x86361 [\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]·_\x8
6368 Disabled·the·“unicode·returns”·check·that·runs·on·dialect·startup·when·running6362 Disabled·the·“unicode·returns”·check·that·runs·on·dialect·startup·when·running
6369 under·Python·3,·which·for·many·years·has·occurred·in·order·to·test·the·current6363 under·Python·3,·which·for·many·years·has·occurred·in·order·to·test·the·current
6370 DBAPI’s·behavior·for·whether·or·not·it·returns·Python·Unicode·or·Py2K·strings6364 DBAPI’s·behavior·for·whether·or·not·it·returns·Python·Unicode·or·Py2K·strings
6371 for·the·VARCHAR·and·NVARCHAR·datatypes.·The·check·still·occurs·by·default·under6365 for·the·VARCHAR·and·NVARCHAR·datatypes.·The·check·still·occurs·by·default·under
6372 Python·2,·however·the·mechanism·to·test·the·behavior·will·be·removed·in6366 Python·2,·however·the·mechanism·to·test·the·behavior·will·be·removed·in
6373 SQLAlchemy·2.0·when·Python·2·support·is·also·removed.6367 SQLAlchemy·2.0·when·Python·2·support·is·also·removed.
6374 This·logic·was·very·effective·when·it·was·needed,·however·now·that·Python·3·is6368 This·logic·was·very·effective·when·it·was·needed,·however·now·that·Python·3·is
Offset 6376, 14 lines modifiedOffset 6370, 20 lines modified
6376 datatypes.·In·the·unlikely·case·that·a·third·party·DBAPI·does·not·support·this,6370 datatypes.·In·the·unlikely·case·that·a·third·party·DBAPI·does·not·support·this,
6377 the·conversion·logic·within·_\x8S_\x8t_\x8r_\x8i_\x8n_\x8g·is·still·available·and·the·third·party6371 the·conversion·logic·within·_\x8S_\x8t_\x8r_\x8i_\x8n_\x8g·is·still·available·and·the·third·party
6378 dialect·may·specify·this·in·its·upfront·dialect·flags·by·setting·the·dialect6372 dialect·may·specify·this·in·its·upfront·dialect·flags·by·setting·the·dialect
6379 level·flag·returns_unicode_strings·to·one·of·String.RETURNS_CONDITIONAL·or6373 level·flag·returns_unicode_strings·to·one·of·String.RETURNS_CONDITIONAL·or
6380 String.RETURNS_BYTES,·both·of·which·will·enable·Unicode·conversion·even·under6374 String.RETURNS_BYTES,·both·of·which·will·enable·Unicode·conversion·even·under
6381 Python·3.6375 Python·3.
6382 References:·_\x8#_\x85_\x83_\x81_\x856376 References:·_\x8#_\x85_\x83_\x81_\x85
 6377 [\x8[e\x8en\x8ng\x8gi\x8in\x8ne\x8e]\x8]·[\x8[p\x8pe\x8er\x8rf\x8fo\x8or\x8rm\x8ma\x8an\x8nc\x8ce\x8e]\x8]·_\x8
 6378 The·pool·“pre-ping”·feature·has·been·refined·to·not·invoke·for·a·DBAPI
 6379 connection·that·was·just·opened·in·the·same·checkout·operation.·pre·ping·only
 6380 applies·to·a·DBAPI·connection·that’s·been·checked·into·the·pool·and·is·being
 6381 checked·out·again.
 6382 References:·_\x8#_\x84_\x85_\x82_\x84
6383 [\x8[e\x8en\x8ng\x8gi\x8in\x8ne\x8e]\x8]·[\x8[b\x8bu\x8ug\x8g]\x8]·_\x86383 [\x8[e\x8en\x8ng\x8gi\x8in\x8ne\x8e]\x8]·[\x8[b\x8bu\x8ug\x8g]\x8]·_\x8
6384 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·that6384 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
6385 the·processing·of·the·SQL·statement·to·receive·a·specific·schema·name·occurs6385 the·processing·of·the·SQL·statement·to·receive·a·specific·schema·name·occurs
6386 within·the·execution·phase·of·the·statement,·rather·than·at·the·compile·phase.6386 within·the·execution·phase·of·the·statement,·rather·than·at·the·compile·phase.
6387 This·is·to·support·the·statement·being·efficiently·cached.·Previously,·the6387 This·is·to·support·the·statement·being·efficiently·cached.·Previously,·the
6388 current·schema·being·rendered·into·the·statement·for·a·particular·run·would·be6388 current·schema·being·rendered·into·the·statement·for·a·particular·run·would·be
6389 considered·as·part·of·the·cache·key·itself,·meaning·that·for·a·run·against6389 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 7935, 45 lines modifiedOffset 7935, 45 lines modified
7935 </p>7935 </p>
7936 </li>7936 </li>
7937 <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·RETURNING7937 <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
7938 since·version·3.35.</p>7938 since·version·3.35.</p>
7939 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/6195">#6195</a></p>7939 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/6195">#6195</a></p>
7940 </p>7940 </p>
7941 </li>7941 </li>
 7942 <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
 7943 <code·class="docutils·literal·notranslate"><span·class="pre">fromisoformat()</span></code>·methods·in·order·to·parse·incoming·datetime,·date,·and
 7944 time·string·values.·This·improves·performance·vs.·the·previous·regular
 7945 expression-based·approach,·and·also·automatically·accommodates·for·datetime
 7946 and·time·formats·that·contain·either·a·six-digit·“microseconds”·format·or·a
 7947 three-digit·“milliseconds”·format.</p>
 7948 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/7029">#7029</a></p>
 7949 </p>
 7950 </li>
7942 <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·statements7951 <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
7943 that·may·refer·to·additional·tables·within·the·WHERE·criteria·of·the7952 that·may·refer·to·additional·tables·within·the·WHERE·criteria·of·the
7944 statement·without·the·need·to·use·subqueries.·This·syntax·is·invoked7953 statement·without·the·need·to·use·subqueries.·This·syntax·is·invoked
7945 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·than7954 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
7946 one·table·or·other·entity·or·selectable·is·used.</p>7955 one·table·or·other·entity·or·selectable·is·used.</p>
7947 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/7185">#7185</a></p>7956 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/7185">#7185</a></p>
7948 </p>7957 </p>
7949 </li>7958 </li>
7950 <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·file7959 <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·file
7951 based·database·is·used.·This·is·set·along·with·setting·the7960 based·database·is·used.·This·is·set·along·with·setting·the
7952 <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·the7961 <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
7953 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·not7962 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
7954 hold·onto·database·connections·after·they·are·released,·did·in·fact·have·a7963 hold·onto·database·connections·after·they·are·released,·did·in·fact·have·a
7955 measurable·negative·performance·impact.·As·always,·the·pool·class·is7964 measurable·negative·performance·impact.·As·always,·the·pool·class·is
7956 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>7965 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>
7957 <div·class="admonition·seealso">7966 <div·class="admonition·seealso">
7958 <p·class="admonition-title">See·also</p>7967 <p·class="admonition-title">See·also</p>
7959 <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>7968 <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>
7960 </div>7969 </div>
7961 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/7490">#7490</a></p>7970 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/7490">#7490</a></p>
7962 </p>7971 </p>
7963 </li>7972 </li>
7964 <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 
7965 <code·class="docutils·literal·notranslate"><span·class="pre">fromisoformat()</span></code>·methods·in·order·to·parse·incoming·datetime,·date,·and 
7966 time·string·values.·This·improves·performance·vs.·the·previous·regular 
7967 expression-based·approach,·and·also·automatically·accommodates·for·datetime 
7968 and·time·formats·that·contain·either·a·six-digit·“microseconds”·format·or·a 
7969 three-digit·“milliseconds”·format.</p> 
7970 <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/7029">#7029</a></p> 
7971 </p> 
7972 </li> 
7973 <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·about7973 <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
7974 DBAPIs·not·supporting·Decimal·values·natively.·This·warning·was·oriented7974 DBAPIs·not·supporting·Decimal·values·natively.·This·warning·was·oriented
7975 towards·SQLite,·which·does·not·have·any·real·way·without·additional7975 towards·SQLite,·which·does·not·have·any·real·way·without·additional
7976 extensions·or·workarounds·of·handling·precision·numeric·values·more·than·157976 extensions·or·workarounds·of·handling·precision·numeric·values·more·than·15
7977 significant·digits·as·it·only·uses·floating·point·math·to·represent7977 significant·digits·as·it·only·uses·floating·point·math·to·represent
7978 numbers.·As·this·is·a·known·and·documented·limitation·in·SQLite·itself,·and7978 numbers.·As·this·is·a·known·and·documented·limitation·in·SQLite·itself,·and
7979 not·a·quirk·of·the·pysqlite·driver,·there’s·no·need·for·SQLAlchemy·to·warn7979 not·a·quirk·of·the·pysqlite·driver,·there’s·no·need·for·SQLAlchemy·to·warn
2.93 KB
html2text {}
    
Offset 5472, 14 lines modifiedOffset 5472, 22 lines modified
5472 ······See·also5472 ······See·also
5473 ······_\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_\x8s5473 ······_\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
5474 ······References:·_\x8#_\x88_\x82_\x83_\x845474 ······References:·_\x8#_\x88_\x82_\x83_\x84
5475 [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[u\x8us\x8se\x8ec\x8ca\x8as\x8se\x8e]\x8]·_\x85475 [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[u\x8us\x8se\x8ec\x8ca\x8as\x8se\x8e]\x8]·_\x8
5476 Added·RETURNING·support·for·the·SQLite·dialect.·SQLite·supports·RETURNING·since5476 Added·RETURNING·support·for·the·SQLite·dialect.·SQLite·supports·RETURNING·since
5477 version·3.35.5477 version·3.35.
5478 References:·_\x8#_\x86_\x81_\x89_\x855478 References:·_\x8#_\x86_\x81_\x89_\x85
 5479 [\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
 5480 SQLite·datetime,·date,·and·time·datatypes·now·use·Python·standard·lib
 5481 fromisoformat()·methods·in·order·to·parse·incoming·datetime,·date,·and·time
 5482 string·values.·This·improves·performance·vs.·the·previous·regular·expression-
 5483 based·approach,·and·also·automatically·accommodates·for·datetime·and·time
 5484 formats·that·contain·either·a·six-digit·“microseconds”·format·or·a·three-digit
 5485 “milliseconds”·format.
 5486 References:·_\x8#_\x87_\x80_\x82_\x89
5479 [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[u\x8us\x8se\x8ec\x8ca\x8as\x8se\x8e]\x8]·_\x85487 [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[u\x8us\x8se\x8ec\x8ca\x8as\x8se\x8e]\x8]·_\x8
5480 The·SQLite·dialect·now·supports·UPDATE..FROM·syntax,·for·UPDATE·statements·that5488 The·SQLite·dialect·now·supports·UPDATE..FROM·syntax,·for·UPDATE·statements·that
5481 may·refer·to·additional·tables·within·the·WHERE·criteria·of·the·statement5489 may·refer·to·additional·tables·within·the·WHERE·criteria·of·the·statement
5482 without·the·need·to·use·subqueries.·This·syntax·is·invoked·automatically·when5490 without·the·need·to·use·subqueries.·This·syntax·is·invoked·automatically·when
5483 using·the·_\x8U_\x8p_\x8d_\x8a_\x8t_\x8e·construct·when·more·than·one·table·or·other·entity·or5491 using·the·_\x8U_\x8p_\x8d_\x8a_\x8t_\x8e·construct·when·more·than·one·table·or·other·entity·or
5484 selectable·is·used.5492 selectable·is·used.
5485 References:·_\x8#_\x87_\x81_\x88_\x855493 References:·_\x8#_\x87_\x81_\x88_\x85
Offset 5489, 22 lines modifiedOffset 5497, 14 lines modified
5489 It·has·been·observed·that·the·previous·approach·of·defaulting·to·_\x8N_\x8u_\x8l_\x8l_\x8P_\x8o_\x8o_\x8l,5497 It·has·been·observed·that·the·previous·approach·of·defaulting·to·_\x8N_\x8u_\x8l_\x8l_\x8P_\x8o_\x8o_\x8l,
5490 which·does·not·hold·onto·database·connections·after·they·are·released,·did·in5498 which·does·not·hold·onto·database·connections·after·they·are·released,·did·in
5491 fact·have·a·measurable·negative·performance·impact.·As·always,·the·pool·class5499 fact·have·a·measurable·negative·performance·impact.·As·always,·the·pool·class
5492 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.5500 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.
5493 See·also5501 See·also
5494 _\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_\x8s5502 _\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
5495 References:·_\x8#_\x87_\x84_\x89_\x805503 References:·_\x8#_\x87_\x84_\x89_\x80
5496 [\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 
5497 SQLite·datetime,·date,·and·time·datatypes·now·use·Python·standard·lib 
5498 fromisoformat()·methods·in·order·to·parse·incoming·datetime,·date,·and·time 
5499 string·values.·This·improves·performance·vs.·the·previous·regular·expression- 
5500 based·approach,·and·also·automatically·accommodates·for·datetime·and·time 
5501 formats·that·contain·either·a·six-digit·“microseconds”·format·or·a·three-digit 
5502 “milliseconds”·format. 
5503 References:·_\x8#_\x87_\x80_\x82_\x89 
5504 [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[b\x8bu\x8ug\x8g]\x8]·_\x85504 [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[b\x8bu\x8ug\x8g]\x8]·_\x8
5505 Removed·the·warning·that·emits·from·the·_\x8N_\x8u_\x8m_\x8e_\x8r_\x8i_\x8c·type·about·DBAPIs·not5505 Removed·the·warning·that·emits·from·the·_\x8N_\x8u_\x8m_\x8e_\x8r_\x8i_\x8c·type·about·DBAPIs·not
5506 supporting·Decimal·values·natively.·This·warning·was·oriented·towards·SQLite,5506 supporting·Decimal·values·natively.·This·warning·was·oriented·towards·SQLite,
5507 which·does·not·have·any·real·way·without·additional·extensions·or·workarounds5507 which·does·not·have·any·real·way·without·additional·extensions·or·workarounds
5508 of·handling·precision·numeric·values·more·than·15·significant·digits·as·it·only5508 of·handling·precision·numeric·values·more·than·15·significant·digits·as·it·only
5509 uses·floating·point·math·to·represent·numbers.·As·this·is·a·known·and5509 uses·floating·point·math·to·represent·numbers.·As·this·is·a·known·and
5510 documented·limitation·in·SQLite·itself,·and·not·a·quirk·of·the·pysqlite·driver,5510 documented·limitation·in·SQLite·itself,·and·not·a·quirk·of·the·pysqlite·driver,
40.0 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/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> 
328 </p></li> 
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> 
332 <li><p><p><a·class="reference·external"·href="../_modules/examples/asyncio/basic.html">basic.py</a>·-·Illustrates·the·asyncio·engine·/·connection·interface.</p> 
333 </p></li> 
334 <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·handling326 <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
335 of·ORM·collections·under·asyncio.</p>327 of·ORM·collections·under·asyncio.</p>
336 </p></li>328 </p></li>
337 <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>329 <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>
338 along·many·asyncio·database·connections,·merging·ORM·results·into·a·single330 along·many·asyncio·database·connections,·merging·ORM·results·into·a·single
339 <code·class="docutils·literal·notranslate"><span·class="pre">AsyncSession</span></code>.</p>331 <code·class="docutils·literal·notranslate"><span·class="pre">AsyncSession</span></code>.</p>
340 </p></li>332 </p></li>
 333 <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
 334 for·asynchronous·ORM·use,·including·the·optional·run_sync()·method.</p>
 335 </p></li>
 336 <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
 337 for·asynchronous·ORM·use.</p>
 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_association.html">table_per_association.py</a>·-·Illustrates·a·mixin·which·provides·a·generic·association
 386 via·a·individually·generated·association·tables·for·each·parent·class.
 387 The·associated·objects·themselves·are·persisted·in·a·single·table
 388 shared·among·all·parents.</p>
 389 </p></li>
385 <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·fashion390 <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
386 to·that·of·popular·frameworks·such·as·Django,·ROR,·etc.··This391 to·that·of·popular·frameworks·such·as·Django,·ROR,·etc.··This
387 approach·bypasses·standard·referential·integrity392 approach·bypasses·standard·referential·integrity
388 practices,·in·that·the·“foreign·key”·column·is·not·actually393 practices,·in·that·the·“foreign·key”·column·is·not·actually
389 constrained·to·refer·to·any·particular·table;·instead,394 constrained·to·refer·to·any·particular·table;·instead,
390 in-application·logic·is·used·to·determine·which·table·is·referenced.</p>395 in-application·logic·is·used·to·determine·which·table·is·referenced.</p>
391 </p></li>396 </p></li>
392 <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 
393 via·a·individually·generated·association·tables·for·each·parent·class. 
394 The·associated·objects·themselves·are·persisted·in·a·single·table 
395 shared·among·all·parents.</p> 
396 </p></li> 
397 <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 
398 objects·within·individual·tables,·each·one·generated·to·persist 
399 those·objects·on·behalf·of·a·particular·parent·class.</p> 
400 </p></li> 
401 <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·association397 <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
402 using·a·single·target·table·and·a·single·association·table,398 using·a·single·target·table·and·a·single·association·table,
403 referred·to·by·all·parent·tables.··The·association·table399 referred·to·by·all·parent·tables.··The·association·table
404 contains·a·“discriminator”·column·which·determines·what·type·of400 contains·a·“discriminator”·column·which·determines·what·type·of
405 parent·object·associates·to·each·particular·row·in·the·association401 parent·object·associates·to·each·particular·row·in·the·association
406 table.</p>402 table.</p>
407 </p></li>403 </p></li>
 404 <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
 405 objects·within·individual·tables,·each·one·generated·to·persist
 406 those·objects·on·behalf·of·a·particular·parent·class.</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/large_resultsets.html">large_resultsets.py</a>·-·In·this·series·of·tests,·we·are·looking·at·time·to·load·a·large·number 
485 of·very·small·and·simple·rows.</p>484 <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
 485 record·by·primary·key</p>
 486 </p></li>
 487 <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>
486 </p></li>488 </p></li>
487 <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
488 within·a·distinct·transaction,·and·afterwards·returns·to·essentially·a490 within·a·distinct·transaction,·and·afterwards·returns·to·essentially·a
489 “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
490 a·database·connection,·inserts·the·row,·commits·and·closes.</p>492 a·database·connection,·inserts·the·row,·commits·and·closes.</p>
491 </p></li>493 </p></li>
492 <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/bulk_inserts.html">bulk_inserts.py</a>·-·This·series·of·tests·illustrates·different·ways·to·INSERT·a·large·number
493 record·by·primary·key</p>495 of·rows·in·bulk.</p>
494 </p></li>496 </p></li>
495 <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>497 <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
 498 of·very·small·and·simple·rows.</p>
496 </p></li>499 </p></li>
497 <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
498 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>
499 </p></li>502 </p></li>
500 <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 
501 of·rows·in·bulk.</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 751, 31 lines modifiedOffset 751, 31 lines modified
751 <p>Several·examples·that·illustrate·the·technique·of·intercepting·changes751 <p>Several·examples·that·illustrate·the·technique·of·intercepting·changes
752 that·would·be·first·interpreted·as·an·UPDATE·on·a·row,·and·instead·turning752 that·would·be·first·interpreted·as·an·UPDATE·on·a·row,·and·instead·turning
753 it·into·an·INSERT·of·a·new·row,·leaving·the·previous·row·intact·as753 it·into·an·INSERT·of·a·new·row,·leaving·the·previous·row·intact·as
754 a·historical·version.</p>754 a·historical·version.</p>
Max diff block lines reached; 12088/22683 bytes (53.29%) of diff not shown.
17.8 KB
html2text {}
    
Offset 109, 24 lines modifiedOffset 109, 24 lines modified
109 optional.109 optional.
110 _\x8b_\x8a_\x8s_\x8i_\x8c_\x8__\x8a_\x8s_\x8s_\x8o_\x8c_\x8i_\x8a_\x8t_\x8i_\x8o_\x8n_\x8._\x8p_\x8y·-·Illustrate·a·many-to-many·relationship·between·an110 _\x8b_\x8a_\x8s_\x8i_\x8c_\x8__\x8a_\x8s_\x8s_\x8o_\x8c_\x8i_\x8a_\x8t_\x8i_\x8o_\x8n_\x8._\x8p_\x8y·-·Illustrate·a·many-to-many·relationship·between·an
111 “Order”·and·a·collection·of·“Item”·objects,·associating·a·purchase·price·with111 “Order”·and·a·collection·of·“Item”·objects,·associating·a·purchase·price·with
112 each·via·an·association·object·called·“OrderItem”112 each·via·an·association·object·called·“OrderItem”
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 ····*·_\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. 
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 _\x8b_\x8a_\x8s_\x8i_\x8c_\x8._\x8p_\x8y·-·Illustrates·the·asyncio·engine·/·connection·interface. 
121 _.a_.s_.y_.n_.c_.__.o_.r_.m_.__.w_.r_.i_.t_.e_.o_.n_.l_.y_.._.p_.y·-·Illustrates·using·w.wr.ri.it.te.e·o.on.nl.ly.y·r.re.el.la.at.ti.io.on.ns.sh.hi.ip.ps.s·for·simpler116 ····*·_.a_.s_.y_.n_.c_.__.o_.r_.m_.__.w_.r_.i_.t_.e_.o_.n_.l_.y_.._.p_.y·-·Illustrates·using·w.wr.ri.it.te.e·o.on.nl.ly.y·r.re.el.la.at.ti.io.on.ns.sh.hi.ip.ps.s·for
122 handling·of·ORM·collections·under·asyncio.117 ······simpler·handling·of·ORM·collections·under·asyncio.
123 _\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·concurrently118 _\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
124 using·asyncio.gather()·along·many·asyncio·database·connections,·merging·ORM119 using·asyncio.gather()·along·many·asyncio·database·connections,·merging·ORM
125 results·into·a·single·AsyncSession.120 results·into·a·single·AsyncSession.
 121 _\x8g_\x8r_\x8e_\x8e_\x8n_\x8l_\x8e_\x8t_\x8__\x8o_\x8r_\x8m_\x8._\x8p_\x8y·-·Illustrates·use·of·the·sqlalchemy.ext.asyncio.AsyncSession
 122 object·for·asynchronous·ORM·use,·including·the·optional·run_sync()·method.
 123 _\x8a_\x8s_\x8y_\x8n_\x8c_\x8__\x8o_\x8r_\x8m_\x8._\x8p_\x8y·-·Illustrates·use·of·the·sqlalchemy.ext.asyncio.AsyncSession
 124 object·for·asynchronous·ORM·use.
 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*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 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
128 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
129 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-
130 neighbors·are·illustrated:130 neighbors·are·illustrated:
131 n2·=·Node(2)131 n2·=·Node(2)
132 n5·=·Node(5)132 n5·=·Node(5)
Offset 148, 32 lines modifiedOffset 148, 31 lines modified
148 Supplier,·both·subclassing·the·HasAddresses·mixin,·which·ensures·that·the148 Supplier,·both·subclassing·the·HasAddresses·mixin,·which·ensures·that·the
149 parent·class·is·provided·with·an·addresses·collection·which·contains·Address149 parent·class·is·provided·with·an·addresses·collection·which·contains·Address
150 objects.150 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·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
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_\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
153 _\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.
154 Listing·of·files:154 Listing·of·files:
155 ····*·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8i_\x8c_\x8__\x8f_\x8k_\x8._\x8p_\x8y·-·Illustrates·a·so-called·“generic·foreign·key”,·in·a 
156 ······similar·fashion·to·that·of·popular·frameworks·such·as·Django,·ROR,·etc. 
157 ······This·approach·bypasses·standard·referential·integrity·practices,·in·that 
158 ······the·“foreign·key”·column·is·not·actually·constrained·to·refer·to·any 
159 ······particular·table;·instead,·in-application·logic·is·used·to·determine 
160 ······which·table·is·referenced. 
161 _\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·generic155 ····*·_\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
162 association·via·a·individually·generated·association·tables·for·each·parent156 ······association·via·a·individually·generated·association·tables·for·each
163 class.·The·associated·objects·themselves·are·persisted·in·a·single·table·shared157 ······parent·class.·The·associated·objects·themselves·are·persisted·in·a·single
164 among·all·parents. 
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.158 ······table·shared·among·all·parents.
 159 _\x8g_\x8e_\x8n_\x8e_\x8r_\x8i_\x8c_\x8__\x8f_\x8k_\x8._\x8p_\x8y·-·Illustrates·a·so-called·“generic·foreign·key”,·in·a·similar
 160 fashion·to·that·of·popular·frameworks·such·as·Django,·ROR,·etc.·This·approach
 161 bypasses·standard·referential·integrity·practices,·in·that·the·“foreign·key”
 162 column·is·not·actually·constrained·to·refer·to·any·particular·table;·instead,
 163 in-application·logic·is·used·to·determine·which·table·is·referenced.
168 _\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·-·Illustrates·a·mixin·which·provides·a·generic164 _\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·-·Illustrates·a·mixin·which·provides·a·generic
169 association·using·a·single·target·table·and·a·single·association·table,165 association·using·a·single·target·table·and·a·single·association·table,
170 referred·to·by·all·parent·tables.·The·association·table·contains·a166 referred·to·by·all·parent·tables.·The·association·table·contains·a
171 “discriminator”·column·which·determines·what·type·of·parent·object·associates167 “discriminator”·column·which·determines·what·type·of·parent·object·associates
172 to·each·particular·row·in·the·association·table.168 to·each·particular·row·in·the·association·table.
 169 _\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
 170 association·objects·within·individual·tables,·each·one·generated·to·persist
 171 those·objects·on·behalf·of·a·particular·parent·class.
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, 28 lines modifiedOffset 220, 28 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 ····*·_\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 
229 ······load·a·large·number·of·very·small·and·simple·rows.227 ····*·_.s_.h_.o_.r_.t_.__.s_.e_.l_.e_.c_.t_.s_.._.p_.y·-·This·series·of·tests·illustrates·different·ways·to
 228 ······SELECT·a·single·record·by·primary·key
 229 _\x8__\x8__\x8m_\x8a_\x8i_\x8n_\x8__\x8__\x8._\x8p_\x8y·-·Allows·the·examples/performance·package·to·be·run·as·a·script.
230 _\x8s_\x8i_\x8n_\x8g_\x8l_\x8e_\x8__\x8i_\x8n_\x8s_\x8e_\x8r_\x8t_\x8s_\x8._\x8p_\x8y·-·In·this·series·of·tests,·we’re·looking·at·a·method·that230 _\x8s_\x8i_\x8n_\x8g_\x8l_\x8e_\x8__\x8i_\x8n_\x8s_\x8e_\x8r_\x8t_\x8s_\x8._\x8p_\x8y·-·In·this·series·of·tests,·we’re·looking·at·a·method·that
231 inserts·a·row·within·a·distinct·transaction,·and·afterwards·returns·to231 inserts·a·row·within·a·distinct·transaction,·and·afterwards·returns·to
232 essentially·a·“closed”·state.·This·would·be·analogous·to·an·API·call·that232 essentially·a·“closed”·state.·This·would·be·analogous·to·an·API·call·that
233 starts·up·a·database·connection,·inserts·the·row,·commits·and·closes.233 starts·up·a·database·connection,·inserts·the·row,·commits·and·closes.
234 _\x8s_.h_.o_.r_.t_.__.s_.e_.l_.e_.c_.t_.s_.._.p_.y·-·This·series·of·tests·illustrates·different·ways·to·SELECT·a234 _\x8b_.u_.l_.k_.__.i_.n_.s_.e_.r_.t_.s_.._.p_.y·-·This·series·of·tests·illustrates·different·ways·to·INSERT·a
235 single·record·by·primary·key 
236 _.__.__.m_.a_.i_.n_.__.__.._.p_.y·-·Allows·the·examples/performance·package·to·be·run·as·a·script.235 large·number·of·rows·in·bulk.
 236 _\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
 237 large·number·of·very·small·and·simple·rows.
237 _\x8b_\x8u_\x8l_\x8k_\x8__\x8u_\x8p_\x8d_\x8a_\x8t_\x8e_\x8s_\x8._\x8p_\x8y·-·This·series·of·tests·will·illustrate·different·ways·to·UPDATE238 _\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
238 a·large·number·of·rows·in·bulk·(under·construction!·there’s·just·one·test·at239 a·large·number·of·rows·in·bulk·(under·construction!·there’s·just·one·test·at
239 the·moment)240 the·moment)
240 _\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 
241 large·number·of·rows·in·bulk. 
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*241 *\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:242 This·is·the·default·form·of·run:
244 $·python·-m·examples.performance·single_inserts243 $·python·-m·examples.performance·single_inserts
245 Tests·to·run:·test_orm_commit,·test_bulk_save,244 Tests·to·run:·test_orm_commit,·test_bulk_save,
246 ··············test_bulk_insert_dictionaries,·test_core,245 ··············test_bulk_insert_dictionaries,·test_core,
247 ··············test_core_query_caching,·test_dbapi_raw_w_connect,246 ··············test_core_query_caching,·test_dbapi_raw_w_connect,
248 ··············test_dbapi_raw_w_pool247 ··············test_dbapi_raw_w_pool
Offset 468, 28 lines modifiedOffset 467, 28 lines modified
468 Several·examples·that·illustrate·the·technique·of·intercepting·changes·that467 Several·examples·that·illustrate·the·technique·of·intercepting·changes·that
469 would·be·first·interpreted·as·an·UPDATE·on·a·row,·and·instead·turning·it·into468 would·be·first·interpreted·as·an·UPDATE·on·a·row,·and·instead·turning·it·into
470 an·INSERT·of·a·new·row,·leaving·the·previous·row·intact·as·a·historical469 an·INSERT·of·a·new·row,·leaving·the·previous·row·intact·as·a·historical
471 version.470 version.
472 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·history471 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
473 row·to·a·separate·history·table.472 row·to·a·separate·history·table.
474 Listing·of·files:473 Listing·of·files:
475 ····*·_\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 
476 ······on·objects,·turning·an·UPDATE·statement·on·a·single·row·into·an·INSERT 
477 ······statement,·so·that·a·new·row·is·inserted·with·the·new·data,·keeping·the 
478 ······old·row·intact. 
479 _.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·technique474 ····*·_.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
480 of·versioned_rows.py,·but·also·emits·an·UPDATE·on·the·o.ol.ld.d·row·to·affect·a475 ······technique·of·versioned_rows.py,·but·also·emits·an·UPDATE·on·the·o.ol.ld.d·row
 476 ······to·affect·a·change·in·timestamp.·Also·includes·a
481 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·to477 ······_.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
 478 ······recent·version.
482 limit·queries·to·only·the·most·recent·version. 
483 _\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, 
484 turning·an·UPDATE·statement·on·a·single·row·into·an·INSERT·statement,·so·that·a 
485 new·row·is·inserted·with·the·new·data,·keeping·the·old·row·intact. 
486 _\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·the479 _\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
487 concept·of·a·“vertical·table”·structure,·like·those·illustrated·in·_\x8V_\x8e_\x8r_\x8t_\x8i_\x8c_\x8a_\x8l480 concept·of·a·“vertical·table”·structure,·like·those·illustrated·in·_\x8V_\x8e_\x8r_\x8t_\x8i_\x8c_\x8a_\x8l
488 _\x8A_\x8t_\x8t_\x8r_\x8i_\x8b_\x8u_\x8t_\x8e_\x8·_\x8M_\x8a_\x8p_\x8p_\x8i_\x8n_\x8g·examples.481 _\x8A_\x8t_\x8t_\x8r_\x8i_\x8b_\x8u_\x8t_\x8e_\x8·_\x8M_\x8a_\x8p_\x8p_\x8i_\x8n_\x8g·examples.
Max diff block lines reached; 7243/18155 bytes (39.90%) of diff not shown.