Offset 1, 5 lines modified | Offset 1, 5 lines modified | ||
1 | · | 1 | ·0b93465321e064b297527355fb26075f·3956352·doc·optional·python-sqlalchemy-doc_2.0.32+ds1-1_all.deb |
2 | ·57e85c6e2ab3e9e74706178cfb04ebe7·1642772·debug·optional·python3-sqlalchemy-ext-dbgsym_2.0.32+ds1-1_i386.deb | 2 | ·57e85c6e2ab3e9e74706178cfb04ebe7·1642772·debug·optional·python3-sqlalchemy-ext-dbgsym_2.0.32+ds1-1_i386.deb |
3 | ·99e33d19e086a239d6a3e101fe1e0244·194244·python·optional·python3-sqlalchemy-ext_2.0.32+ds1-1_i386.deb | 3 | ·99e33d19e086a239d6a3e101fe1e0244·194244·python·optional·python3-sqlalchemy-ext_2.0.32+ds1-1_i386.deb |
4 | ·0955e7f12a0b73c1ab8406c88fbab7d2·1196068·python·optional·python3-sqlalchemy_2.0.32+ds1-1_all.deb | 4 | ·0955e7f12a0b73c1ab8406c88fbab7d2·1196068·python·optional·python3-sqlalchemy_2.0.32+ds1-1_all.deb |
Offset 1, 3 lines modified | Offset 1, 3 lines modified | ||
1 | -rw-r--r--···0········0········0········4·2024-08-23·07:52:58.000000·debian-binary | 1 | -rw-r--r--···0········0········0········4·2024-08-23·07:52:58.000000·debian-binary |
2 | -rw-r--r--···0········0········0····1392 | 2 | -rw-r--r--···0········0········0····13920·2024-08-23·07:52:58.000000·control.tar.xz |
3 | -rw-r--r--···0········0········0··3942 | 3 | -rw-r--r--···0········0········0··3942240·2024-08-23·07:52:58.000000·data.tar.xz |
Offset 1226, 28 lines modified | Offset 1226, 28 lines modified | ||
1226 | </p> | 1226 | </p> |
1227 | </li> | 1227 | </li> |
1228 | </ul> | 1228 | </ul> |
1229 | </section> | 1229 | </section> |
1230 | <section·id="change-1.4.53-sql"> | 1230 | <section·id="change-1.4.53-sql"> |
1231 | <h3>sql<a·class="headerlink"·href="#change-1.4.53-sql"·title="Link·to·this·heading">¶</a></h3> | 1231 | <h3>sql<a·class="headerlink"·href="#change-1.4.53-sql"·title="Link·to·this·heading">¶</a></h3> |
1232 | <ul·class="simple"> | 1232 | <ul·class="simple"> |
1233 | <li><p·class="caption"·id="change-1.4.53-4"><span·class="target"·id="change-8ddacf428ed0a4277e0ed3520fc04c80"><strong>[sql]·[bug]</strong>·<a·class="changelog-reference·headerlink·reference·internal"·href="#change-8ddacf428ed0a4277e0ed3520fc04c80">¶</a></span><p>Fixed·caching·issue·where·using·the·<a·class="reference·internal"·href="../core/selectable.html#sqlalchemy.sql.expression.TextualSelect.add_cte"·title="sqlalchemy.sql.expression.TextualSelect.add_cte"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">TextualSelect.add_cte()</span></code></a>·method | ||
1234 | of·the·<a·class="reference·internal"·href="../core/selectable.html#sqlalchemy.sql.expression.TextualSelect"·title="sqlalchemy.sql.expression.TextualSelect"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">TextualSelect</span></code></a>·construct·would·not·set·a·correct·cache·key | ||
1235 | which·distinguished·between·different·CTE·expressions.</p> | ||
1236 | <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/11471">#11471</a></p> | ||
1237 | </p> | ||
1238 | </li> | ||
1233 | <li><p·class="caption"·id="change-1.4.53- | 1239 | <li><p·class="caption"·id="change-1.4.53-5"><span·class="target"·id="change-6f089f9f81be82b33f2fe473f6f3e4e3"><strong>[sql]·[bug]</strong>·<a·class="changelog-reference·headerlink·reference·internal"·href="#change-6f089f9f81be82b33f2fe473f6f3e4e3">¶</a></span><p>Fixed·caching·issue·where·the |
1234 | <a·class="reference·internal"·href="../core/selectable.html#sqlalchemy.sql.expression.Select.with_for_update.params.key_share"·title="sqlalchemy.sql.expression.Select.with_for_update"><code·class="xref·py·py-paramref·docutils·literal·notranslate"><span·class="pre">Select.with_for_update.key_share</span></code></a>·element·of | 1240 | <a·class="reference·internal"·href="../core/selectable.html#sqlalchemy.sql.expression.Select.with_for_update.params.key_share"·title="sqlalchemy.sql.expression.Select.with_for_update"><code·class="xref·py·py-paramref·docutils·literal·notranslate"><span·class="pre">Select.with_for_update.key_share</span></code></a>·element·of |
1235 | <a·class="reference·internal"·href="../core/selectable.html#sqlalchemy.sql.expression.Select.with_for_update"·title="sqlalchemy.sql.expression.Select.with_for_update"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">Select.with_for_update()</span></code></a>·was·not·considered·as·part·of·the·cache | 1241 | <a·class="reference·internal"·href="../core/selectable.html#sqlalchemy.sql.expression.Select.with_for_update"·title="sqlalchemy.sql.expression.Select.with_for_update"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">Select.with_for_update()</span></code></a>·was·not·considered·as·part·of·the·cache |
1236 | key,·leading·to·incorrect·caching·if·different·variations·of·this·parameter | 1242 | key,·leading·to·incorrect·caching·if·different·variations·of·this·parameter |
1237 | were·used·with·an·otherwise·identical·statement.</p> | 1243 | were·used·with·an·otherwise·identical·statement.</p> |
1238 | <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/11544">#11544</a></p> | 1244 | <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/11544">#11544</a></p> |
1239 | </p> | 1245 | </p> |
1240 | </li> | 1246 | </li> |
1241 | <li><p·class="caption"·id="change-1.4.53-5"><span·class="target"·id="change-8ddacf428ed0a4277e0ed3520fc04c80"><strong>[sql]·[bug]</strong>·<a·class="changelog-reference·headerlink·reference·internal"·href="#change-8ddacf428ed0a4277e0ed3520fc04c80">¶</a></span><p>Fixed·caching·issue·where·using·the·<a·class="reference·internal"·href="../core/selectable.html#sqlalchemy.sql.expression.TextualSelect.add_cte"·title="sqlalchemy.sql.expression.TextualSelect.add_cte"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">TextualSelect.add_cte()</span></code></a>·method | ||
1242 | of·the·<a·class="reference·internal"·href="../core/selectable.html#sqlalchemy.sql.expression.TextualSelect"·title="sqlalchemy.sql.expression.TextualSelect"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">TextualSelect</span></code></a>·construct·would·not·set·a·correct·cache·key | ||
1243 | which·distinguished·between·different·CTE·expressions.</p> | ||
1244 | <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/11471">#11471</a></p> | ||
1245 | </p> | ||
1246 | </li> | ||
1247 | </ul> | 1247 | </ul> |
1248 | </section> | 1248 | </section> |
1249 | <section·id="change-1.4.53-mypy"> | 1249 | <section·id="change-1.4.53-mypy"> |
1250 | <h3>mypy<a·class="headerlink"·href="#change-1.4.53-mypy"·title="Link·to·this·heading">¶</a></h3> | 1250 | <h3>mypy<a·class="headerlink"·href="#change-1.4.53-mypy"·title="Link·to·this·heading">¶</a></h3> |
1251 | <ul·class="simple"> | 1251 | <ul·class="simple"> |
1252 | <li><p·class="caption"·id="change-1.4.53-6"><span·class="target"·id="change-78f7d51a494ca4abbbe5318f9f951f7b"><strong>[mypy]·[bug]</strong>·<a·class="changelog-reference·headerlink·reference·internal"·href="#change-78f7d51a494ca4abbbe5318f9f951f7b">¶</a></span><p>The·deprecated·mypy·plugin·is·no·longer·fully·functional·with·the·latest | 1252 | <li><p·class="caption"·id="change-1.4.53-6"><span·class="target"·id="change-78f7d51a494ca4abbbe5318f9f951f7b"><strong>[mypy]·[bug]</strong>·<a·class="changelog-reference·headerlink·reference·internal"·href="#change-78f7d51a494ca4abbbe5318f9f951f7b">¶</a></span><p>The·deprecated·mypy·plugin·is·no·longer·fully·functional·with·the·latest |
1253 | series·of·mypy·1.11.0,·as·changes·in·the·mypy·interpreter·are·no·longer | 1253 | series·of·mypy·1.11.0,·as·changes·in·the·mypy·interpreter·are·no·longer |
Offset 808, 24 lines modified | Offset 808, 24 lines modified | ||
808 | ······sqlalchemy.util.await_only()·directly. | 808 | ······sqlalchemy.util.await_only()·directly. |
809 | [\x8[e\x8en\x8ng\x8gi\x8in\x8ne\x8e]\x8]·[\x8[b\x8bu\x8ug\x8g]\x8]·_\x8¶ | 809 | [\x8[e\x8en\x8ng\x8gi\x8in\x8ne\x8e]\x8]·[\x8[b\x8bu\x8ug\x8g]\x8]·_\x8¶ |
810 | Adjustments·to·the·C·extensions,·which·are·specific·to·the·SQLAlchemy·1.x | 810 | Adjustments·to·the·C·extensions,·which·are·specific·to·the·SQLAlchemy·1.x |
811 | series,·to·work·under·Python·3.13.·Pull·request·courtesy·Ben·Beasley. | 811 | series,·to·work·under·Python·3.13.·Pull·request·courtesy·Ben·Beasley. |
812 | References:·_\x8#_\x81_\x81_\x84_\x89_\x89 | 812 | References:·_\x8#_\x81_\x81_\x84_\x89_\x89 |
813 | *\x8**\x8**\x8**\x8*·s\x8sq\x8ql\x8l_\x8?\x8¶·*\x8**\x8**\x8**\x8* | 813 | *\x8**\x8**\x8**\x8*·s\x8sq\x8ql\x8l_\x8?\x8¶·*\x8**\x8**\x8**\x8* |
814 | ····*·[\x8[s\x8sq\x8ql\x8l]\x8]·[\x8[b\x8bu\x8ug\x8g]\x8]·_\x8¶ | 814 | ····*·[\x8[s\x8sq\x8ql\x8l]\x8]·[\x8[b\x8bu\x8ug\x8g]\x8]·_\x8¶ |
815 | ······Fixed·caching·issue·where·using·the·_\x8T_\x8e_\x8x_\x8t_\x8u_\x8a_\x8l_\x8S_\x8e_\x8l_\x8e_\x8c_\x8t_\x8._\x8a_\x8d_\x8d_\x8__\x8c_\x8t_\x8e_\x8(_\x8)·method·of·the | ||
816 | ······_\x8T_\x8e_\x8x_\x8t_\x8u_\x8a_\x8l_\x8S_\x8e_\x8l_\x8e_\x8c_\x8t·construct·would·not·set·a·correct·cache·key·which | ||
817 | ······distinguished·between·different·CTE·expressions. | ||
815 | ······Fixed·caching·issue·where·the·_\x8S_\x8e_\x8l_\x8e_\x8c_\x8t_\x8._\x8w_\x8i_\x8t_\x8h_\x8__\x8f_\x8o_\x8r_\x8__\x8u_\x8p_\x8d_\x8a_\x8t_\x8e_\x8._\x8k_\x8e_\x8y_\x8__\x8s_\x8h_\x8a_\x8r_\x8e·element·of | ||
816 | ······_\x8S_\x8e_\x8l_\x8e_\x8c_\x8t_\x8._\x8w_\x8i_\x8t_\x8h_\x8__\x8f_\x8o_\x8r_\x8__\x8u_\x8p_\x8d_\x8a_\x8t_\x8e_\x8(_\x8)·was·not·considered·as·part·of·the·cache·key, | ||
817 | ······leading·to·incorrect·caching·if·different·variations·of·this·parameter | ||
818 | ······were·used·with·an·otherwise·identical·statement. | ||
819 | ······References:·_\x8#_\x81_\x81_\x8 | 818 | ······References:·_\x8#_\x81_\x81_\x84_.7_.1 |
820 | [\x8[s\x8sq\x8ql\x8l]\x8]·[\x8[b\x8bu\x8ug\x8g]\x8]·_\x8¶ | 819 | [\x8[s\x8sq\x8ql\x8l]\x8]·[\x8[b\x8bu\x8ug\x8g]\x8]·_\x8¶ |
821 | Fixed·caching·issue·where·using·the·_\x8T_\x8e_\x8x_\x8t_\x8u_\x8a_\x8l_\x8S_\x8e_\x8l_\x8e_\x8c_\x8t_\x8._\x8a_\x8d_\x8d_\x8__\x8c_\x8t_\x8e_\x8(_\x8)·method·of·the | ||
822 | _\x8T_\x8e_\x8x_\x8t_\x8u_\x8a_\x8l_\x8S_\x8e_\x8l_\x8e_\x8c_\x8t·construct·would·not·set·a·correct·cache·key·which·distinguished | ||
823 | 820 | Fixed·caching·issue·where·the·_.S_.e_.l_.e_.c_.t_.._.w_.i_.t_.h_.__.f_.o_.r_.__.u_.p_.d_.a_.t_.e_.._.k_.e_.y_.__.s_.h_.a_.r_.e·element·of | |
821 | _\x8S_\x8e_\x8l_\x8e_\x8c_\x8t_\x8._\x8w_\x8i_\x8t_\x8h_\x8__\x8f_\x8o_\x8r_\x8__\x8u_\x8p_\x8d_\x8a_\x8t_\x8e_\x8(_\x8)·was·not·considered·as·part·of·the·cache·key,·leading | ||
822 | to·incorrect·caching·if·different·variations·of·this·parameter·were·used·with | ||
823 | an·otherwise·identical·statement. | ||
824 | References:·_\x8#_\x81_\x81_\x8 | 824 | References:·_\x8#_\x81_\x81_\x85_.4_.4 |
825 | *\x8**\x8**\x8**\x8*·m\x8my\x8yp\x8py\x8y_\x8?\x8¶·*\x8**\x8**\x8**\x8* | 825 | *\x8**\x8**\x8**\x8*·m\x8my\x8yp\x8py\x8y_\x8?\x8¶·*\x8**\x8**\x8**\x8* |
826 | ····*·[\x8[m\x8my\x8yp\x8py\x8y]\x8]·[\x8[b\x8bu\x8ug\x8g]\x8]·_\x8¶ | 826 | ····*·[\x8[m\x8my\x8yp\x8py\x8y]\x8]·[\x8[b\x8bu\x8ug\x8g]\x8]·_\x8¶ |
827 | ······The·deprecated·mypy·plugin·is·no·longer·fully·functional·with·the·latest | 827 | ······The·deprecated·mypy·plugin·is·no·longer·fully·functional·with·the·latest |
828 | ······series·of·mypy·1.11.0,·as·changes·in·the·mypy·interpreter·are·no·longer | 828 | ······series·of·mypy·1.11.0,·as·changes·in·the·mypy·interpreter·are·no·longer |
829 | ······compatible·with·the·approach·used·by·the·plugin.·If·code·is·dependent·on | 829 | ······compatible·with·the·approach·used·by·the·plugin.·If·code·is·dependent·on |
830 | ······the·mypy·plugin·with·sqlalchemy2-stubs,·it’s·recommended·to·pin·mypy·to | 830 | ······the·mypy·plugin·with·sqlalchemy2-stubs,·it’s·recommended·to·pin·mypy·to |
831 | ······be·below·the·1.11.0·series.·Seek·upgrading·to·the·2.0·series·of | 831 | ······be·below·the·1.11.0·series.·Seek·upgrading·to·the·2.0·series·of |
Offset 7935, 31 lines modified | Offset 7935, 31 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·RETURNING | 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·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-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·the | ||
7944 | 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·than | ||
7946 | 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> | ||
7948 | </p> | ||
7949 | </li> | ||
7942 | <li><p·class="caption"·id="change-2.0.0b1-8 | 7950 | <li><p·class="caption"·id="change-2.0.0b1-87"><span·class="target"·id="change-74fee584f531c832d0d97ea94be754b8"><strong>[sqlite]·[performance]·[usecase]</strong>·<a·class="changelog-reference·headerlink·reference·internal"·href="#change-74fee584f531c832d0d97ea94be754b8">¶</a></span><p>SQLite·datetime,·date,·and·time·datatypes·now·use·Python·standard·lib |
7943 | <code·class="docutils·literal·notranslate"><span·class="pre">fromisoformat()</span></code>·methods·in·order·to·parse·incoming·datetime,·date,·and | 7951 | <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 | 7952 | time·string·values.·This·improves·performance·vs.·the·previous·regular |
7945 | expression-based·approach,·and·also·automatically·accommodates·for·datetime | 7953 | expression-based·approach,·and·also·automatically·accommodates·for·datetime |
7946 | and·time·formats·that·contain·either·a·six-digit·“microseconds”·format·or·a | 7954 | and·time·formats·that·contain·either·a·six-digit·“microseconds”·format·or·a |
7947 | three-digit·“milliseconds”·format.</p> | 7955 | three-digit·“milliseconds”·format.</p> |
7948 | <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/7029">#7029</a></p> | 7956 | <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/7029">#7029</a></p> |
7949 | </p> | 7957 | </p> |
7950 | </li> | 7958 | </li> |
7951 | <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 | ||
7952 | that·may·refer·to·additional·tables·within·the·WHERE·criteria·of·the | ||
7953 | statement·without·the·need·to·use·subqueries.·This·syntax·is·invoked | ||
7954 | 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 | ||
7955 | one·table·or·other·entity·or·selectable·is·used.</p> | ||
7956 | <p>References:·<a·class="reference·external"·href="https://www.sqlalchemy.org/trac/ticket/7185">#7185</a></p> | ||
7957 | </p> | ||
7958 | </li> | ||
7959 | <li><p·class="caption"·id="change-2.0.0b1-88"><span·class="target"·id="change-b11607250a6e056103e2b2d1205be1a8"><strong>[sqlite]·[bug]</strong>·<a·class="changelog-reference·headerlink·reference·internal"·href="#change-b11607250a6e056103e2b2d1205be1a8">¶</a></span><p>Removed·the·warning·that·emits·from·the·<a·class="reference·internal"·href="../core/type_basics.html#sqlalchemy.types.Numeric"·title="sqlalchemy.types.Numeric"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Numeric</span></code></a>·type·about | 7959 | <li><p·class="caption"·id="change-2.0.0b1-88"><span·class="target"·id="change-b11607250a6e056103e2b2d1205be1a8"><strong>[sqlite]·[bug]</strong>·<a·class="changelog-reference·headerlink·reference·internal"·href="#change-b11607250a6e056103e2b2d1205be1a8">¶</a></span><p>Removed·the·warning·that·emits·from·the·<a·class="reference·internal"·href="../core/type_basics.html#sqlalchemy.types.Numeric"·title="sqlalchemy.types.Numeric"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Numeric</span></code></a>·type·about |
7960 | DBAPIs·not·supporting·Decimal·values·natively.·This·warning·was·oriented | 7960 | DBAPIs·not·supporting·Decimal·values·natively.·This·warning·was·oriented |
7961 | towards·SQLite,·which·does·not·have·any·real·way·without·additional | 7961 | towards·SQLite,·which·does·not·have·any·real·way·without·additional |
7962 | extensions·or·workarounds·of·handling·precision·numeric·values·more·than·15 | 7962 | extensions·or·workarounds·of·handling·precision·numeric·values·more·than·15 |
7963 | significant·digits·as·it·only·uses·floating·point·math·to·represent | 7963 | significant·digits·as·it·only·uses·floating·point·math·to·represent |
7964 | numbers.·As·this·is·a·known·and·documented·limitation·in·SQLite·itself,·and | 7964 | numbers.·As·this·is·a·known·and·documented·limitation·in·SQLite·itself,·and |
7965 | not·a·quirk·of·the·pysqlite·driver,·there’s·no·need·for·SQLAlchemy·to·warn | 7965 | not·a·quirk·of·the·pysqlite·driver,·there’s·no·need·for·SQLAlchemy·to·warn |
Offset 5471, 29 lines modified | Offset 5471, 29 lines modified | ||
5471 | ······See·also | 5471 | ······See·also |
5472 | ······_\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 | 5472 | ······_\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 |
5473 | ······References:·_\x8#_\x88_\x82_\x83_\x84 | 5473 | ······References:·_\x8#_\x88_\x82_\x83_\x84 |
5474 | [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[u\x8us\x8se\x8ec\x8ca\x8as\x8se\x8e]\x8]·_\x8¶ | 5474 | [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[u\x8us\x8se\x8ec\x8ca\x8as\x8se\x8e]\x8]·_\x8¶ |
5475 | Added·RETURNING·support·for·the·SQLite·dialect.·SQLite·supports·RETURNING·since | 5475 | Added·RETURNING·support·for·the·SQLite·dialect.·SQLite·supports·RETURNING·since |
5476 | version·3.35. | 5476 | version·3.35. |
5477 | References:·_\x8#_\x86_\x81_\x89_\x85 | 5477 | References:·_\x8#_\x86_\x81_\x89_\x85 |
5478 | [\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¶ | ||
5479 | SQLite·datetime,·date,·and·time·datatypes·now·use·Python·standard·lib | ||
5480 | fromisoformat()·methods·in·order·to·parse·incoming·datetime,·date,·and·time | ||
5481 | string·values.·This·improves·performance·vs.·the·previous·regular·expression- | ||
5482 | based·approach,·and·also·automatically·accommodates·for·datetime·and·time | ||
5483 | formats·that·contain·either·a·six-digit·“microseconds”·format·or·a·three-digit | ||
5484 | “milliseconds”·format. | ||
5485 | References:·_\x8#_\x87_\x80_\x82_\x89 | ||
5486 | [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[u\x8us\x8se\x8ec\x8ca\x8as\x8se\x8e]\x8]·_\x8¶ | 5478 | [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[u\x8us\x8se\x8ec\x8ca\x8as\x8se\x8e]\x8]·_\x8¶ |
5487 | The·SQLite·dialect·now·supports·UPDATE..FROM·syntax,·for·UPDATE·statements·that | 5479 | The·SQLite·dialect·now·supports·UPDATE..FROM·syntax,·for·UPDATE·statements·that |
5488 | may·refer·to·additional·tables·within·the·WHERE·criteria·of·the·statement | 5480 | may·refer·to·additional·tables·within·the·WHERE·criteria·of·the·statement |
5489 | without·the·need·to·use·subqueries.·This·syntax·is·invoked·automatically·when | 5481 | without·the·need·to·use·subqueries.·This·syntax·is·invoked·automatically·when |
5490 | using·the·_\x8U_\x8p_\x8d_\x8a_\x8t_\x8e·construct·when·more·than·one·table·or·other·entity·or | 5482 | using·the·_\x8U_\x8p_\x8d_\x8a_\x8t_\x8e·construct·when·more·than·one·table·or·other·entity·or |
5491 | selectable·is·used. | 5483 | selectable·is·used. |
5492 | References:·_\x8#_\x87_\x81_\x88_\x85 | 5484 | References:·_\x8#_\x87_\x81_\x88_\x85 |
5485 | [\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¶ | ||
5486 | SQLite·datetime,·date,·and·time·datatypes·now·use·Python·standard·lib | ||
5487 | fromisoformat()·methods·in·order·to·parse·incoming·datetime,·date,·and·time | ||
5488 | string·values.·This·improves·performance·vs.·the·previous·regular·expression- | ||
5489 | based·approach,·and·also·automatically·accommodates·for·datetime·and·time | ||
5490 | formats·that·contain·either·a·six-digit·“microseconds”·format·or·a·three-digit | ||
5491 | “milliseconds”·format. | ||
5492 | References:·_\x8#_\x87_\x80_\x82_\x89 | ||
5493 | [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[b\x8bu\x8ug\x8g]\x8]·_\x8¶ | 5493 | [\x8[s\x8sq\x8ql\x8li\x8it\x8te\x8e]\x8]·[\x8[b\x8bu\x8ug\x8g]\x8]·_\x8¶ |
5494 | Removed·the·warning·that·emits·from·the·_\x8N_\x8u_\x8m_\x8e_\x8r_\x8i_\x8c·type·about·DBAPIs·not | 5494 | Removed·the·warning·that·emits·from·the·_\x8N_\x8u_\x8m_\x8e_\x8r_\x8i_\x8c·type·about·DBAPIs·not |
5495 | supporting·Decimal·values·natively.·This·warning·was·oriented·towards·SQLite, | 5495 | supporting·Decimal·values·natively.·This·warning·was·oriented·towards·SQLite, |
5496 | which·does·not·have·any·real·way·without·additional·extensions·or·workarounds | 5496 | which·does·not·have·any·real·way·without·additional·extensions·or·workarounds |
5497 | of·handling·precision·numeric·values·more·than·15·significant·digits·as·it·only | 5497 | of·handling·precision·numeric·values·more·than·15·significant·digits·as·it·only |
5498 | uses·floating·point·math·to·represent·numbers.·As·this·is·a·known·and | 5498 | uses·floating·point·math·to·represent·numbers.·As·this·is·a·known·and |
5499 | documented·limitation·in·SQLite·itself,·and·not·a·quirk·of·the·pysqlite·driver, | 5499 | documented·limitation·in·SQLite·itself,·and·not·a·quirk·of·the·pysqlite·driver, |
Offset 299, 49 lines modified | Offset 299, 49 lines modified | ||
299 | </section> | 299 | </section> |
300 | <section·id="module-examples.association"> | 300 | <section·id="module-examples.association"> |
301 | <span·id="associations"></span><span·id="examples-associations"></span><h3>Associations<a·class="headerlink"·href="#module-examples.association"·title="Link·to·this·heading">¶</a></h3> | 301 | <span·id="associations"></span><span·id="examples-associations"></span><h3>Associations<a·class="headerlink"·href="#module-examples.association"·title="Link·to·this·heading">¶</a></h3> |
302 | <p>Examples·illustrating·the·usage·of·the·“association·object”·pattern, | 302 | <p>Examples·illustrating·the·usage·of·the·“association·object”·pattern, |
303 | where·an·intermediary·class·mediates·the·relationship·between·two | 303 | where·an·intermediary·class·mediates·the·relationship·between·two |
304 | classes·that·are·associated·in·a·many-to-many·pattern.</p> | 304 | classes·that·are·associated·in·a·many-to-many·pattern.</p> |
305 | <p>Listing·of·files:<ul·class="simple"> | 305 | <p>Listing·of·files:<ul·class="simple"> |
306 | <li><p><p><a·class="reference·external"·href="../_modules/examples/association/basic_association.html">basic_association.py</a>·-·Illustrate·a·many-to-many·relationship·between·an | ||
307 | “Order”·and·a·collection·of·“Item”·objects,·associating·a·purchase·price | ||
308 | with·each·via·an·association·object·called·“OrderItem”</p> | ||
309 | </p></li> | ||
306 | <li><p><p><a·class="reference·external"·href="../_modules/examples/association/dict_of_sets_with_default.html">dict_of_sets_with_default.py</a>·-·An·advanced·association·proxy·example·which | 310 | <li><p><p><a·class="reference·external"·href="../_modules/examples/association/dict_of_sets_with_default.html">dict_of_sets_with_default.py</a>·-·An·advanced·association·proxy·example·which |
307 | illustrates·nesting·of·association·proxies·to·produce·multi-level·Python | 311 | illustrates·nesting·of·association·proxies·to·produce·multi-level·Python |
308 | collections,·in·this·case·a·dictionary·with·string·keys·and·sets·of·integers | 312 | collections,·in·this·case·a·dictionary·with·string·keys·and·sets·of·integers |
309 | as·values,·which·conceal·the·underlying·mapped·classes.</p> | 313 | as·values,·which·conceal·the·underlying·mapped·classes.</p> |
310 | </p></li> | 314 | </p></li> |
311 | <li><p><p><a·class="reference·external"·href="../_modules/examples/association/proxied_association.html">proxied_association.py</a>·-·Same·example·as·basic_association,·adding·in | 315 | <li><p><p><a·class="reference·external"·href="../_modules/examples/association/proxied_association.html">proxied_association.py</a>·-·Same·example·as·basic_association,·adding·in |
312 | usage·of·<a·class="reference·internal"·href="extensions/associationproxy.html#module-sqlalchemy.ext.associationproxy"·title="sqlalchemy.ext.associationproxy"><code·class="xref·py·py-mod·docutils·literal·notranslate"><span·class="pre">sqlalchemy.ext.associationproxy</span></code></a>·to·make·explicit·references | 316 | usage·of·<a·class="reference·internal"·href="extensions/associationproxy.html#module-sqlalchemy.ext.associationproxy"·title="sqlalchemy.ext.associationproxy"><code·class="xref·py·py-mod·docutils·literal·notranslate"><span·class="pre">sqlalchemy.ext.associationproxy</span></code></a>·to·make·explicit·references |
313 | to·<code·class="docutils·literal·notranslate"><span·class="pre">OrderItem</span></code>·optional.</p> | 317 | to·<code·class="docutils·literal·notranslate"><span·class="pre">OrderItem</span></code>·optional.</p> |
314 | </p></li> | 318 | </p></li> |
315 | <li><p><p><a·class="reference·external"·href="../_modules/examples/association/basic_association.html">basic_association.py</a>·-·Illustrate·a·many-to-many·relationship·between·an | ||
316 | “Order”·and·a·collection·of·“Item”·objects,·associating·a·purchase·price | ||
317 | with·each·via·an·association·object·called·“OrderItem”</p> | ||
318 | </p></li> | ||
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_writeonly.html">async_orm_writeonly.py</a>·-·Illustrates·using·<strong>write·only·relationships</strong>·for·simpler·handling | 326 | <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 |
327 | of·ORM·collections·under·asyncio.</p> | 327 | of·ORM·collections·under·asyncio.</p> |
328 | </p></li> | 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>·object | ||
330 | for·asynchronous·ORM·use.</p> | ||
331 | </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 | 332 | <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 | for·asynchronous·ORM·use,·including·the·optional·run_sync()·method.</p> |
331 | </p></li> | 334 | </p></li> |
335 | <li><p><p><a·class="reference·external"·href="../_modules/examples/asyncio/basic.html">basic.py</a>·-·Illustrates·the·asyncio·engine·/·connection·interface.</p> | ||
336 | </p></li> | ||
332 | <li><p><p><a·class="reference·external"·href="../_modules/examples/asyncio/gather_orm_statements.html">gather_orm_statements.py</a>·-·Illustrates·how·to·run·many·statements·concurrently·using·<code·class="docutils·literal·notranslate"><span·class="pre">asyncio.gather()</span></code> | 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> |
333 | along·many·asyncio·database·connections,·merging·ORM·results·into·a·single | 338 | along·many·asyncio·database·connections,·merging·ORM·results·into·a·single |
334 | <code·class="docutils·literal·notranslate"><span·class="pre">AsyncSession</span></code>.</p> | 339 | <code·class="docutils·literal·notranslate"><span·class="pre">AsyncSession</span></code>.</p> |
335 | </p></li> | 340 | </p></li> |
336 | <li><p><p><a·class="reference·external"·href="../_modules/examples/asyncio/basic.html">basic.py</a>·-·Illustrates·the·asyncio·engine·/·connection·interface.</p> | ||
337 | </p></li> | ||
338 | <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 | ||
339 | for·asynchronous·ORM·use.</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.···The | 346 | <p>An·example·of·persistence·for·a·directed·graph·structure.···The |
347 | graph·is·stored·as·a·collection·of·edges,·each·referencing·both·a | 347 | graph·is·stored·as·a·collection·of·edges,·each·referencing·both·a |
Offset 378, 32 lines modified | Offset 378, 32 lines modified | ||
378 | subclassing·the·<code·class="docutils·literal·notranslate"><span·class="pre">HasAddresses</span></code>·mixin,·which·ensures·that·the | 378 | 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>·collection | 379 | 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>·scripts | 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>·scripts |
382 | are·modernized·versions·of·recipes·presented·in·the·2007·blog·post | 382 | 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/discriminator_on_association.html">discriminator_on_association.py</a>·-·Illustrates·a·mixin·which·provides·a·generic·association | ||
386 | using·a·single·target·table·and·a·single·association·table, | ||
387 | referred·to·by·all·parent·tables.··The·association·table | ||
388 | contains·a·“discriminator”·column·which·determines·what·type·of | ||
389 | parent·object·associates·to·each·particular·row·in·the·association | ||
390 | table.</p> | ||
391 | </p></li> | ||
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 | 392 | <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 | 393 | objects·within·individual·tables,·each·one·generated·to·persist |
387 | those·objects·on·behalf·of·a·particular·parent·class.</p> | 394 | those·objects·on·behalf·of·a·particular·parent·class.</p> |
388 | </p></li> | 395 | </p></li> |
389 | <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 | 396 | <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 |
390 | to·that·of·popular·frameworks·such·as·Django,·ROR,·etc.··This | 397 | to·that·of·popular·frameworks·such·as·Django,·ROR,·etc.··This |
391 | approach·bypasses·standard·referential·integrity | 398 | approach·bypasses·standard·referential·integrity |
392 | practices,·in·that·the·“foreign·key”·column·is·not·actually | 399 | practices,·in·that·the·“foreign·key”·column·is·not·actually |
393 | constrained·to·refer·to·any·particular·table;·instead, | 400 | constrained·to·refer·to·any·particular·table;·instead, |
394 | in-application·logic·is·used·to·determine·which·table·is·referenced.</p> | 401 | in-application·logic·is·used·to·determine·which·table·is·referenced.</p> |
395 | </p></li> | 402 | </p></li> |
396 | <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 | ||
397 | using·a·single·target·table·and·a·single·association·table, | ||
398 | referred·to·by·all·parent·tables.··The·association·table | ||
399 | contains·a·“discriminator”·column·which·determines·what·type·of | ||
400 | parent·object·associates·to·each·particular·row·in·the·association | ||
401 | table.</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 | 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. | 404 | via·a·individually·generated·association·tables·for·each·parent·class. |
405 | The·associated·objects·themselves·are·persisted·in·a·single·table | 405 | The·associated·objects·themselves·are·persisted·in·a·single·table |
406 | shared·among·all·parents.</p> | 406 | shared·among·all·parents.</p> |
407 | </p></li> | 407 | </p></li> |
408 | </ul> | 408 | </ul> |
409 | </p> | 409 | </p> |
Offset 477, 29 lines modified | Offset 477, 29 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/ | 484 | <li><p><p><a·class="reference·external"·href="../_modules/examples/performance/single_inserts.html">single_inserts.py</a>·-·In·this·series·of·tests,·we’re·looking·at·a·method·that·inserts·a·row |
485 | within·a·distinct·transaction,·and·afterwards·returns·to·essentially·a | ||
486 | “closed”·state.···This·would·be·analogous·to·an·API·call·that·starts·up | ||
487 | a·database·connection,·inserts·the·row,·commits·and·closes.</p> | ||
485 | of·very·small·and·simple·rows.</p> | ||
486 | </p></li> | ||
487 | <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 | ||
488 | of·rows·in·bulk.</p> | ||
489 | </p></li> | 488 | </p></li> |
490 | <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 | 489 | <li><p><p><a·class="reference·external"·href="../_modules/examples/performance/short_selects.html">short_selects.py</a>·-·This·series·of·tests·illustrates·different·ways·to·SELECT·a·single |
491 | record·by·primary·key</p> | 490 | record·by·primary·key</p> |
492 | </p></li> | 491 | </p></li> |
493 | <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> | 492 | <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> |
494 | </p></li> | 493 | </p></li> |
494 | <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 | ||
495 | of·rows·in·bulk.</p> | ||
496 | </p></li> | ||
495 | <li><p><p><a·class="reference·external"·href="../_modules/examples/performance/ | 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 | within·a·distinct·transaction,·and·afterwards·returns·to·essentially·a | ||
497 | “closed”·state.···This·would·be·analogous·to·an·API·call·that·starts·up | ||
Max diff block lines reached; 7299/17943 bytes (40.68%) of diff not shown. |
Offset 96, 37 lines modified | Offset 96, 37 lines modified | ||
96 | Listing·of·files: | 96 | Listing·of·files: |
97 | ····*·_\x8a_\x8d_\x8j_\x8a_\x8c_\x8e_\x8n_\x8c_\x8y_\x8__\x8l_\x8i_\x8s_\x8t_\x8._\x8p_\x8y | 97 | ····*·_\x8a_\x8d_\x8j_\x8a_\x8c_\x8e_\x8n_\x8c_\x8y_\x8__\x8l_\x8i_\x8s_\x8t_\x8._\x8p_\x8y |
98 | *\x8**\x8**\x8**\x8*·A\x8As\x8ss\x8so\x8oc\x8ci\x8ia\x8at\x8ti\x8io\x8on\x8ns\x8s_\x8?\x8¶·*\x8**\x8**\x8**\x8* | 98 | *\x8**\x8**\x8**\x8*·A\x8As\x8ss\x8so\x8oc\x8ci\x8ia\x8at\x8ti\x8io\x8on\x8ns\x8s_\x8?\x8¶·*\x8**\x8**\x8**\x8* |
99 | Examples·illustrating·the·usage·of·the·“association·object”·pattern,·where·an | 99 | Examples·illustrating·the·usage·of·the·“association·object”·pattern,·where·an |
100 | intermediary·class·mediates·the·relationship·between·two·classes·that·are | 100 | intermediary·class·mediates·the·relationship·between·two·classes·that·are |
101 | associated·in·a·many-to-many·pattern. | 101 | associated·in·a·many-to-many·pattern. |
102 | Listing·of·files: | 102 | Listing·of·files: |
103 | ····*·_\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 | ||
104 | ······“Order”·and·a·collection·of·“Item”·objects,·associating·a·purchase·price | ||
105 | ······with·each·via·an·association·object·called·“OrderItem” | ||
103 | 106 | _.d_.i_.c_.t_.__.o_.f_.__.s_.e_.t_.s_.__.w_.i_.t_.h_.__.d_.e_.f_.a_.u_.l_.t_.._.p_.y·-·An·advanced·association·proxy·example·which | |
104 | 107 | illustrates·nesting·of·association·proxies·to·produce·multi-level·Python | |
105 | 108 | collections,·in·this·case·a·dictionary·with·string·keys·and·sets·of·integers·as | |
106 | 109 | values,·which·conceal·the·underlying·mapped·classes. | |
107 | _\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 | 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·of |
108 | _\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 | 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·OrderItem |
109 | optional. | 112 | 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·an | ||
111 | “Order”·and·a·collection·of·“Item”·objects,·associating·a·purchase·price·with | ||
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__\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 | 116 | ····*·_\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 |
117 | ······simpler·handling·of·ORM·collections·under·asyncio. | 117 | ······simpler·handling·of·ORM·collections·under·asyncio. |
118 | _\x8a_\x8s_\x8y_\x8n_\x8c_\x8__\x8o_\x8r_\x8m_\x8._\x8p_\x8y·-·Illustrates·use·of·the·sqlalchemy.ext.asyncio.AsyncSession | ||
119 | 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 | 120 | _\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. | 121 | object·for·asynchronous·ORM·use,·including·the·optional·run_sync()·method. |
122 | _\x8b_\x8a_\x8s_\x8i_\x8c_\x8._\x8p_\x8y·-·Illustrates·the·asyncio·engine·/·connection·interface. | ||
120 | _\x8g_\x8a_\x8t_\x8h_\x8e_\x8r_\x8__\x8o_\x8r_\x8m_\x8__\x8s_\x8t_\x8a_\x8t_\x8e_\x8m_\x8e_\x8n_\x8t_\x8s_\x8._\x8p_\x8y·-·Illustrates·how·to·run·many·statements·concurrently | 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·concurrently |
121 | using·asyncio.gather()·along·many·asyncio·database·connections,·merging·ORM | 124 | using·asyncio.gather()·along·many·asyncio·database·connections,·merging·ORM |
122 | results·into·a·single·AsyncSession. | 125 | results·into·a·single·AsyncSession. |
123 | _\x8b_\x8a_\x8s_\x8i_\x8c_\x8._\x8p_\x8y·-·Illustrates·the·asyncio·engine·/·connection·interface. | ||
124 | _\x8a_\x8s_\x8y_\x8n_\x8c_\x8__\x8o_\x8r_\x8m_\x8._\x8p_\x8y·-·Illustrates·use·of·the·sqlalchemy.ext.asyncio.AsyncSession | ||
125 | object·for·asynchronous·ORM·use. | ||
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·stored | 127 | 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”·node | 128 | 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, 27 lines modified | Offset 148, 27 lines modified | ||
148 | Supplier,·both·subclassing·the·HasAddresses·mixin,·which·ensures·that·the | 148 | Supplier,·both·subclassing·the·HasAddresses·mixin,·which·ensures·that·the |
149 | parent·class·is·provided·with·an·addresses·collection·which·contains·Address | 149 | 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·modernized | 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·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_\x8s | 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_\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 | ····*·_\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 | ||
156 | ······generic·association·using·a·single·target·table·and·a·single·association | ||
157 | ······table,·referred·to·by·all·parent·tables.·The·association·table·contains·a | ||
158 | ······“discriminator”·column·which·determines·what·type·of·parent·object | ||
159 | ······associates·to·each·particular·row·in·the·association·table. | ||
155 | 160 | _\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 | |
156 | 161 | association·objects·within·individual·tables,·each·one·generated·to·persist | |
157 | 162 | those·objects·on·behalf·of·a·particular·parent·class. | |
158 | _\x8g_\x8e_\x8n_\x8e_\x8r_\x8i_\x8c_\x8__\x8f_\x8k_\x8._\x8p_\x8y·-·Illustrates·a·so-called·“generic·foreign·key”,·in·a·similar | 163 | _\x8g_\x8e_\x8n_\x8e_\x8r_\x8i_\x8c_\x8__\x8f_\x8k_\x8._\x8p_\x8y·-·Illustrates·a·so-called·“generic·foreign·key”,·in·a·similar |
159 | fashion·to·that·of·popular·frameworks·such·as·Django,·ROR,·etc.·This·approach | 164 | fashion·to·that·of·popular·frameworks·such·as·Django,·ROR,·etc.·This·approach |
160 | bypasses·standard·referential·integrity·practices,·in·that·the·“foreign·key” | 165 | bypasses·standard·referential·integrity·practices,·in·that·the·“foreign·key” |
161 | column·is·not·actually·constrained·to·refer·to·any·particular·table;·instead, | 166 | column·is·not·actually·constrained·to·refer·to·any·particular·table;·instead, |
162 | in-application·logic·is·used·to·determine·which·table·is·referenced. | 167 | in-application·logic·is·used·to·determine·which·table·is·referenced. |
163 | _\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 | ||
164 | association·using·a·single·target·table·and·a·single·association·table, | ||
165 | referred·to·by·all·parent·tables.·The·association·table·contains·a | ||
166 | “discriminator”·column·which·determines·what·type·of·parent·object·associates | ||
167 | to·each·particular·row·in·the·association·table. | ||
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 | 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 | 169 | association·via·a·individually·generated·association·tables·for·each·parent |
170 | class.·The·associated·objects·themselves·are·persisted·in·a·single·table·shared | 170 | class.·The·associated·objects·themselves·are·persisted·in·a·single·table·shared |
171 | among·all·parents. | 171 | among·all·parents. |
172 | *\x8**\x8**\x8**\x8*·M\x8Ma\x8at\x8te\x8er\x8ri\x8ia\x8al\x8li\x8iz\x8ze\x8ed\x8d·P\x8Pa\x8at\x8th\x8hs\x8s_\x8?\x8¶·*\x8**\x8**\x8**\x8* | 172 | *\x8**\x8**\x8**\x8*·M\x8Ma\x8at\x8te\x8er\x8ri\x8ia\x8al\x8li\x8iz\x8ze\x8ed\x8d·P\x8Pa\x8at\x8th\x8hs\x8s_\x8?\x8¶·*\x8**\x8**\x8**\x8* |
173 | Illustrates·the·“materialized·paths”·pattern·for·hierarchical·data·using·the | 173 | Illustrates·the·“materialized·paths”·pattern·for·hierarchical·data·using·the |
174 | SQLAlchemy·ORM. | 174 | SQLAlchemy·ORM. |
Offset 220, 25 lines modified | Offset 220, 26 lines modified | ||
220 | $·python·-m·examples.performance·bulk_inserts·\ | 220 | $·python·-m·examples.performance·bulk_inserts·\ |
221 | ····--dburl·mysql+mysqldb://scott:tiger@localhost/test·\ | 221 | ····--dburl·mysql+mysqldb://scott:tiger@localhost/test·\ |
222 | ····--profile·--num·1000 | 222 | ····--profile·--num·1000 |
223 | See·also | 223 | See·also |
224 | _\x8H_\x8o_\x8w_\x8·_\x8c_\x8a_\x8n_\x8·_\x8I_\x8·_\x8p_\x8r_\x8o_\x8f_\x8i_\x8l_\x8e_\x8·_\x8a_\x8·_\x8S_\x8Q_\x8L_\x8A_\x8l_\x8c_\x8h_\x8e_\x8m_\x8y_\x8·_\x8p_\x8o_\x8w_\x8e_\x8r_\x8e_\x8d_\x8·_\x8a_\x8p_\x8p_\x8l_\x8i_\x8c_\x8a_\x8t_\x8i_\x8o_\x8n_\x8? | 224 | _\x8H_\x8o_\x8w_\x8·_\x8c_\x8a_\x8n_\x8·_\x8I_\x8·_\x8p_\x8r_\x8o_\x8f_\x8i_\x8l_\x8e_\x8·_\x8a_\x8·_\x8S_\x8Q_\x8L_\x8A_\x8l_\x8c_\x8h_\x8e_\x8m_\x8y_\x8·_\x8p_\x8o_\x8w_\x8e_\x8r_\x8e_\x8d_\x8·_\x8a_\x8p_\x8p_\x8l_\x8i_\x8c_\x8a_\x8t_\x8i_\x8o_\x8n_\x8? |
225 | *\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* |
226 | Listing·of·files: | 226 | Listing·of·files: |
227 | ····*·_\x8 | 227 | ····*·_\x8s_.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 |
228 | ······load·a·large·number·of·very·small·and·simple·rows. | ||
229 | _\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 | ||
230 | 228 | ······that·inserts·a·row·within·a·distinct·transaction,·and·afterwards·returns | |
229 | ······to·essentially·a·“closed”·state.·This·would·be·analogous·to·an·API·call | ||
230 | ······that·starts·up·a·database·connection,·inserts·the·row,·commits·and | ||
231 | ······closes. | ||
231 | _\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 | 232 | _\x8s_\x8h_\x8o_\x8r_\x8t_\x8__\x8s_\x8e_\x8l_\x8e_\x8c_\x8t_\x8s_\x8._\x8p_\x8y·-·This·series·of·tests·illustrates·different·ways·to·SELECT·a |
232 | single·record·by·primary·key | 233 | single·record·by·primary·key |
233 | _\x8__\x8__\x8m_\x8a_\x8i_\x8n_\x8__\x8__\x8._\x8p_\x8y·-·Allows·the·examples/performance·package·to·be·run·as·a·script. | 234 | _\x8__\x8__\x8m_\x8a_\x8i_\x8n_\x8__\x8__\x8._\x8p_\x8y·-·Allows·the·examples/performance·package·to·be·run·as·a·script. |
235 | _\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 | ||
236 | large·number·of·rows·in·bulk. | ||
234 | _\x8 | 237 | _\x8l_.a_.r_.g_.e_.__.r_.e_.s_.u_.l_.t_.s_.e_.t_.s_.._.p_.y·-·In·this·series·of·tests,·we·are·looking·at·time·to·load·a |
238 | large·number·of·very·small·and·simple·rows. | ||
235 | inserts·a·row·within·a·distinct·transaction,·and·afterwards·returns·to | ||
236 | essentially·a·“closed”·state.·This·would·be·analogous·to·an·API·call·that | ||
237 | starts·up·a·database·connection,·inserts·the·row,·commits·and·closes. | ||
238 | _\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 | 239 | _\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 |
239 | a·large·number·of·rows·in·bulk·(under·construction!·there’s·just·one·test·at | 240 | a·large·number·of·rows·in·bulk·(under·construction!·there’s·just·one·test·at |
240 | the·moment) | 241 | the·moment) |
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* | 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* |
242 | This·is·the·default·form·of·run: | 243 | This·is·the·default·form·of·run: |
243 | $·python·-m·examples.performance·single_inserts | 244 | $·python·-m·examples.performance·single_inserts |
244 | Tests·to·run:·test_orm_commit,·test_bulk_save, | 245 | Tests·to·run:·test_orm_commit,·test_bulk_save, |
Offset 467, 27 lines modified | Offset 468, 28 lines modified | ||
467 | Several·examples·that·illustrate·the·technique·of·intercepting·changes·that | 468 | Several·examples·that·illustrate·the·technique·of·intercepting·changes·that |
468 | would·be·first·interpreted·as·an·UPDATE·on·a·row,·and·instead·turning·it·into | 469 | would·be·first·interpreted·as·an·UPDATE·on·a·row,·and·instead·turning·it·into |
469 | an·INSERT·of·a·new·row,·leaving·the·previous·row·intact·as·a·historical | 470 | an·INSERT·of·a·new·row,·leaving·the·previous·row·intact·as·a·historical |
470 | version. | 471 | version. |
471 | 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 | 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·history |
472 | row·to·a·separate·history·table. | 473 | row·to·a·separate·history·table. |
473 | Listing·of·files: | 474 | Listing·of·files: |
474 | ····*·_\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 | ||
475 | ······the·concept·of·a·“vertical·table”·structure,·like·those·illustrated·in | ||
476 | ······_\x8V_\x8e_\x8r_\x8t_\x8i_\x8c_\x8a_\x8l_\x8·_\x8A_\x8t_\x8t_\x8r_\x8i_\x8b_\x8u_\x8t_\x8e_\x8·_\x8M_\x8a_\x8p_\x8p_\x8i_\x8n_\x8g·examples. | ||
477 | _\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, | ||
478 | turning·an·UPDATE·statement·on·a·single·row·into·an·INSERT·statement,·so·that·a | ||
479 | new·row·is·inserted·with·the·new·data,·keeping·the·old·row·intact. | ||
480 | _.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 | 475 | ····*·_.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 |
481 | of·versioned_rows.py,·but·also·emits·an·UPDATE·on·the·o.ol.ld.d·row | 476 | ······technique·of·versioned_rows.py,·but·also·emits·an·UPDATE·on·the·o.ol.ld.d·row |
477 | ······to·affect·a·change·in·timestamp.·Also·includes·a | ||
482 | 478 | ······_.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 | |
483 | 479 | ······recent·version. | |
Max diff block lines reached; 3153/13780 bytes (22.88%) of diff not shown. |