1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
<html xmlns="http://www.w3.org/1999/xhtml">
6
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
13
SQLAlchemy 0.8 Documentation
17
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
18
<link rel="stylesheet" href="../_static/docs.css" type="text/css" />
20
<script type="text/javascript">
21
var DOCUMENTATION_OPTIONS = {
24
COLLAPSE_MODINDEX: false,
28
<script type="text/javascript" src="../_static/jquery.js"></script>
29
<script type="text/javascript" src="../_static/underscore.js"></script>
30
<script type="text/javascript" src="../_static/doctools.js"></script>
31
<script type="text/javascript" src="../_static/init.js"></script>
32
<link rel="index" title="Index" href="../genindex.html" />
33
<link rel="search" title="Search" href="../search.html" />
34
<link rel="copyright" title="Copyright" href="../copyright.html" />
35
<link rel="top" title="SQLAlchemy 0.8 Documentation" href="../index.html" />
36
<link rel="up" title="Changes and Migration" href="index.html" />
37
<link rel="next" title="0.3 Changelog" href="changelog_03.html" />
38
<link rel="prev" title="0.5 Changelog" href="changelog_05.html" />
53
<div id="docs-container">
57
<div id="docs-header">
58
<h1>SQLAlchemy 0.8 Documentation</h1>
60
<div id="docs-search">
62
<form class="search" action="../search.html" method="get">
63
<input type="text" name="q" size="18" /> <input type="submit" value="Search" />
64
<input type="hidden" name="check_keywords" value="yes" />
65
<input type="hidden" name="area" value="default" />
69
<div id="docs-version-header">
70
Release: <span class="version-num">0.8.2</span> | Release Date: July 3, 2013
77
<div id="docs-top-navigation">
78
<div id="docs-top-page-control" class="docs-navigation-links">
81
<a href="changelog_05.html" title="previous chapter">0.5 Changelog</a>
84
<a href="changelog_03.html" title="next chapter">0.3 Changelog</a>
88
<a href="../contents.html">Table of Contents</a> |
89
<a href="../genindex.html">Index</a>
90
| <a href="../_sources/changelog/changelog_04.txt">view source
95
<div id="docs-navigation-banner">
96
<a href="../index.html">SQLAlchemy 0.8 Documentation</a>
97
» <a href="index.html" title="Changes and Migration">Changes and Migration</a>
111
<div id="docs-body-container">
113
<div id="docs-sidebar">
114
<h3><a href="../index.html">Table of Contents</a></h3>
116
<li><a class="reference internal" href="#">0.4 Changelog</a><ul>
117
<li><a class="reference internal" href="#change-0.4.8">0.4.8</a><ul>
118
<li><a class="reference internal" href="#change-0.4.8-orm">orm</a></li>
119
<li><a class="reference internal" href="#change-0.4.8-sql">sql</a></li>
120
<li><a class="reference internal" href="#change-0.4.8-mysql">mysql</a></li>
121
<li><a class="reference internal" href="#change-0.4.8-sqlite">sqlite</a></li>
122
<li><a class="reference internal" href="#change-0.4.8-oracle">oracle</a></li>
125
<li><a class="reference internal" href="#change-0.4.7p1">0.4.7p1</a><ul>
126
<li><a class="reference internal" href="#change-0.4.7p1-orm">orm</a></li>
129
<li><a class="reference internal" href="#change-0.4.7">0.4.7</a><ul>
130
<li><a class="reference internal" href="#change-0.4.7-orm">orm</a></li>
131
<li><a class="reference internal" href="#change-0.4.7-sql">sql</a></li>
132
<li><a class="reference internal" href="#change-0.4.7-schema">schema</a></li>
133
<li><a class="reference internal" href="#change-0.4.7-mysql">mysql</a></li>
134
<li><a class="reference internal" href="#change-0.4.7-oracle">oracle</a></li>
135
<li><a class="reference internal" href="#change-0.4.7-misc">misc</a></li>
138
<li><a class="reference internal" href="#change-0.4.6">0.4.6</a><ul>
139
<li><a class="reference internal" href="#change-0.4.6-orm">orm</a></li>
140
<li><a class="reference internal" href="#change-0.4.6-orm-declarative">orm declarative</a></li>
141
<li><a class="reference internal" href="#change-0.4.6-sql">sql</a></li>
142
<li><a class="reference internal" href="#change-0.4.6-mssql">mssql</a></li>
143
<li><a class="reference internal" href="#change-0.4.6-firebird">firebird</a></li>
144
<li><a class="reference internal" href="#change-0.4.6-misc">misc</a></li>
147
<li><a class="reference internal" href="#change-0.4.5">0.4.5</a><ul>
148
<li><a class="reference internal" href="#change-0.4.5-orm">orm</a></li>
149
<li><a class="reference internal" href="#change-0.4.5-orm-declarative">orm declarative</a></li>
150
<li><a class="reference internal" href="#change-0.4.5-sql">sql</a></li>
151
<li><a class="reference internal" href="#change-0.4.5-mysql">mysql</a></li>
152
<li><a class="reference internal" href="#change-0.4.5-mssql">mssql</a></li>
153
<li><a class="reference internal" href="#change-0.4.5-oracle">oracle</a></li>
154
<li><a class="reference internal" href="#change-0.4.5-misc">misc</a></li>
157
<li><a class="reference internal" href="#change-0.4.4">0.4.4</a><ul>
158
<li><a class="reference internal" href="#change-0.4.4-orm">orm</a></li>
159
<li><a class="reference internal" href="#change-0.4.4-sql">sql</a></li>
160
<li><a class="reference internal" href="#change-0.4.4-misc">misc</a></li>
163
<li><a class="reference internal" href="#change-0.4.3">0.4.3</a><ul>
164
<li><a class="reference internal" href="#change-0.4.3-general">general</a></li>
165
<li><a class="reference internal" href="#change-0.4.3-orm">orm</a></li>
166
<li><a class="reference internal" href="#change-0.4.3-sql">sql</a></li>
167
<li><a class="reference internal" href="#change-0.4.3-misc">misc</a></li>
170
<li><a class="reference internal" href="#change-0.4.2p3">0.4.2p3</a><ul>
171
<li><a class="reference internal" href="#change-0.4.2p3-general">general</a></li>
172
<li><a class="reference internal" href="#change-0.4.2p3-orm">orm</a></li>
173
<li><a class="reference internal" href="#change-0.4.2p3-sql">sql</a></li>
174
<li><a class="reference internal" href="#change-0.4.2p3-misc">misc</a></li>
177
<li><a class="reference internal" href="#change-0.4.2">0.4.2</a><ul>
178
<li><a class="reference internal" href="#change-0.4.2-orm">orm</a></li>
179
<li><a class="reference internal" href="#change-0.4.2-sql">sql</a></li>
180
<li><a class="reference internal" href="#change-0.4.2-firebird">firebird</a></li>
181
<li><a class="reference internal" href="#change-0.4.2-misc">misc</a></li>
184
<li><a class="reference internal" href="#change-0.4.1">0.4.1</a><ul>
185
<li><a class="reference internal" href="#change-0.4.1-orm">orm</a></li>
186
<li><a class="reference internal" href="#change-0.4.1-sql">sql</a></li>
187
<li><a class="reference internal" href="#change-0.4.1-misc">misc</a></li>
190
<li><a class="reference internal" href="#change-0.4.0">0.4.0</a></li>
191
<li><a class="reference internal" href="#change-0.4.0beta6">0.4.0beta6</a></li>
192
<li><a class="reference internal" href="#change-0.4.0beta5">0.4.0beta5</a></li>
193
<li><a class="reference internal" href="#change-0.4.0beta4">0.4.0beta4</a></li>
194
<li><a class="reference internal" href="#change-0.4.0beta3">0.4.0beta3</a></li>
195
<li><a class="reference internal" href="#change-0.4.0beta2">0.4.0beta2</a><ul>
196
<li><a class="reference internal" href="#change-0.4.0beta2-oracle">oracle</a></li>
197
<li><a class="reference internal" href="#change-0.4.0beta2-misc">misc</a></li>
200
<li><a class="reference internal" href="#change-0.4.0beta1">0.4.0beta1</a><ul>
201
<li><a class="reference internal" href="#change-0.4.0beta1-orm">orm</a></li>
202
<li><a class="reference internal" href="#change-0.4.0beta1-sql">sql</a></li>
203
<li><a class="reference internal" href="#change-0.4.0beta1-mysql">mysql</a></li>
204
<li><a class="reference internal" href="#change-0.4.0beta1-oracle">oracle</a></li>
205
<li><a class="reference internal" href="#change-0.4.0beta1-misc">misc</a></li>
213
<h4>Previous Topic</h4>
215
<a href="changelog_05.html" title="previous chapter">0.5 Changelog</a>
219
<a href="changelog_03.html" title="next chapter">0.3 Changelog</a>
223
<h4>Quick Search</h4>
225
<form class="search" action="../search.html" method="get">
226
<input type="text" name="q" size="18" /> <input type="submit" value="Search" />
227
<input type="hidden" name="check_keywords" value="yes" />
228
<input type="hidden" name="area" value="default" />
234
<div id="docs-body" class="withsidebar" >
236
<div class="section" id="changelog">
237
<h1>0.4 Changelog<a class="headerlink" href="#changelog" title="Permalink to this headline">¶</a></h1>
238
<div class="section" id="change-0.4.8">
239
<h2>0.4.8<a class="headerlink" href="#change-0.4.8" title="Permalink to this headline">¶</a></h2>
240
Released: Sun Oct 12 2008<div class="section" id="change-0.4.8-orm">
241
<h3>orm<a class="headerlink" href="#change-0.4.8-orm" title="Permalink to this headline">¶</a></h3>
243
<li><p id="change-0.4.8-0"><span class="target" id="change-4000d9f2d4389a85854ede3e007aaba5"><strong>[orm] </strong></span>Fixed bug regarding inherit_condition passed
244
with “A=B” versus “B=A” leading to errors<a class="changeset-link reference internal" href="#change-4000d9f2d4389a85854ede3e007aaba5">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1039">#1039</a></p>
247
<li><p id="change-0.4.8-1"><span class="target" id="change-2690aa1e520f493331cb61a6326c56c4"><strong>[orm] </strong></span>Changes made to new, dirty and deleted
249
SessionExtension.before_flush() will take
250
effect for that flush.<a class="changeset-link reference internal" href="#change-2690aa1e520f493331cb61a6326c56c4">(link)</a><p></p>
253
<li><p id="change-0.4.8-2"><span class="target" id="change-13623d94e18e8b3b92030ae525a030ec"><strong>[orm] </strong></span>Added label() method to InstrumentedAttribute
254
to establish forwards compatibility with 0.5.<a class="changeset-link reference internal" href="#change-13623d94e18e8b3b92030ae525a030ec">(link)</a><p></p>
259
<div class="section" id="change-0.4.8-sql">
260
<h3>sql<a class="headerlink" href="#change-0.4.8-sql" title="Permalink to this headline">¶</a></h3>
262
<li><p id="change-0.4.8-3"><span class="target" id="change-7fee195a017ac2215e80b38b868365e9"><strong>[sql] </strong></span>column.in_(someselect) can now be used as
263
a columns-clause expression without the subquery
264
bleeding into the FROM clause<a class="changeset-link reference internal" href="#change-7fee195a017ac2215e80b38b868365e9">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1074">#1074</a></p>
269
<div class="section" id="change-0.4.8-mysql">
270
<h3>mysql<a class="headerlink" href="#change-0.4.8-mysql" title="Permalink to this headline">¶</a></h3>
272
<li><p id="change-0.4.8-4"><span class="target" id="change-341091ae1d33ebc9cf02df1ca798516a"><strong>[mysql] </strong></span>Added MSMediumInteger type.<a class="changeset-link reference internal" href="#change-341091ae1d33ebc9cf02df1ca798516a">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1146">#1146</a></p>
277
<div class="section" id="change-0.4.8-sqlite">
278
<h3>sqlite<a class="headerlink" href="#change-0.4.8-sqlite" title="Permalink to this headline">¶</a></h3>
280
<li><p id="change-0.4.8-5"><span class="target" id="change-67cbed9a85982025c41cb138787f8f47"><strong>[sqlite] </strong></span>Supplied a custom strftime() function which
281
handles dates before 1900.<a class="changeset-link reference internal" href="#change-67cbed9a85982025c41cb138787f8f47">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/968">#968</a></p>
284
<li><p id="change-0.4.8-6"><span class="target" id="change-7cabaeb41bcd3c0b9074d2704bca61c6"><strong>[sqlite] </strong></span>String’s (and Unicode’s, UnicodeText’s, etc.)
285
convert_unicode logic disabled in the sqlite dialect,
286
to adjust for pysqlite 2.5.0’s new requirement that
287
only Python unicode objects are accepted;
288
<a class="reference external" href="http://itsystementwicklung.de/pipermail/list-pysqlite/2008-March/000018.html">http://itsystementwicklung.de/pipermail/list-pysqlite/2008-March/000018.html</a><a class="changeset-link reference internal" href="#change-7cabaeb41bcd3c0b9074d2704bca61c6">(link)</a><p></p>
293
<div class="section" id="change-0.4.8-oracle">
294
<h3>oracle<a class="headerlink" href="#change-0.4.8-oracle" title="Permalink to this headline">¶</a></h3>
296
<li><p id="change-0.4.8-7"><span class="target" id="change-c1ece36939d26084e64ecd6b3519de17"><strong>[oracle] </strong></span>has_sequence() now takes schema name into account<a class="changeset-link reference internal" href="#change-c1ece36939d26084e64ecd6b3519de17">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1155">#1155</a></p>
299
<li><p id="change-0.4.8-8"><span class="target" id="change-e15a9ca2c0e8d6a5e56b4fc468592e10"><strong>[oracle] </strong></span>added BFILE to the list of reflected types<a class="changeset-link reference internal" href="#change-e15a9ca2c0e8d6a5e56b4fc468592e10">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1121">#1121</a></p>
305
<div class="section" id="change-0.4.7p1">
306
<h2>0.4.7p1<a class="headerlink" href="#change-0.4.7p1" title="Permalink to this headline">¶</a></h2>
307
Released: Thu Jul 31 2008<div class="section" id="change-0.4.7p1-orm">
308
<h3>orm<a class="headerlink" href="#change-0.4.7p1-orm" title="Permalink to this headline">¶</a></h3>
310
<li><p id="change-0.4.7p1-0"><span class="target" id="change-ca86704307b8ec36130159c1a86b7082"><strong>[orm] </strong></span>Added “add()” and “add_all()” to scoped_session
311
methods. Workaround for 0.4.7:<blockquote>
312
<div>from sqlalchemy.orm.scoping import ScopedSession,instrument
314
<div>ScopedSession, “add”, instrument(“add”))</div></blockquote>
315
<dl class="docutils">
317
<dd>ScopedSession, “add_all”, instrument(“add_all”))</dd>
320
<a class="changeset-link reference internal" href="#change-ca86704307b8ec36130159c1a86b7082">(link)</a><p></p>
323
<li><p id="change-0.4.7p1-1"><span class="target" id="change-8150f6bc3321b0e5940f462af85fea59"><strong>[orm] </strong></span>Fixed non-2.3 compatible usage of set() and generator
324
expression within relation().<a class="changeset-link reference internal" href="#change-8150f6bc3321b0e5940f462af85fea59">(link)</a><p></p>
330
<div class="section" id="change-0.4.7">
331
<h2>0.4.7<a class="headerlink" href="#change-0.4.7" title="Permalink to this headline">¶</a></h2>
332
Released: Sat Jul 26 2008<div class="section" id="change-0.4.7-orm">
333
<h3>orm<a class="headerlink" href="#change-0.4.7-orm" title="Permalink to this headline">¶</a></h3>
335
<li><p id="change-0.4.7-0"><span class="target" id="change-96d6f0048a53ef8280afa881d15981e4"><strong>[orm] </strong></span>The contains() operator when used with many-to-many
336
will alias() the secondary (association) table so
337
that multiple contains() calls will not conflict
338
with each other<a class="changeset-link reference internal" href="#change-96d6f0048a53ef8280afa881d15981e4">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1058">#1058</a></p>
341
<li><p id="change-0.4.7-1"><span class="target" id="change-043f1fb5d04c32f0e61d5443a46b23e6"><strong>[orm] </strong></span>fixed bug preventing merge() from functioning in
342
conjunction with a comparable_property()<a class="changeset-link reference internal" href="#change-043f1fb5d04c32f0e61d5443a46b23e6">(link)</a><p></p>
345
<li><p id="change-0.4.7-2"><span class="target" id="change-2c1a9b40953961921023dfe557a4326c"><strong>[orm] </strong></span>the enable_typechecks=False setting on relation()
346
now only allows subtypes with inheriting mappers.
347
Totally unrelated types, or subtypes not set up with
348
mapper inheritance against the target mapper are
349
still not allowed.<a class="changeset-link reference internal" href="#change-2c1a9b40953961921023dfe557a4326c">(link)</a><p></p>
352
<li><p id="change-0.4.7-3"><span class="target" id="change-25f41185c603cbb10bde56a17f623433"><strong>[orm] </strong></span>Added is_active flag to Sessions to detect when
353
a transaction is in progress. This
354
flag is always True with a “transactional”
355
(in 0.5 a non-“autocommit”) Session.<a class="changeset-link reference internal" href="#change-25f41185c603cbb10bde56a17f623433">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/976">#976</a></p>
360
<div class="section" id="change-0.4.7-sql">
361
<h3>sql<a class="headerlink" href="#change-0.4.7-sql" title="Permalink to this headline">¶</a></h3>
363
<li><p id="change-0.4.7-4"><span class="target" id="change-01ca8336bd39c6bb69577aad5d1d730e"><strong>[sql] </strong></span>Fixed bug when calling select([literal(‘foo’)])
364
or select([bindparam(‘foo’)]).<a class="changeset-link reference internal" href="#change-01ca8336bd39c6bb69577aad5d1d730e">(link)</a><p></p>
369
<div class="section" id="change-0.4.7-schema">
370
<h3>schema<a class="headerlink" href="#change-0.4.7-schema" title="Permalink to this headline">¶</a></h3>
372
<li><p id="change-0.4.7-5"><span class="target" id="change-738cf5e3972ba6f7723c2c7acf6decc9"><strong>[schema] </strong></span>create_all(), drop_all(), create(), drop() all raise
373
an error if the table name or schema name contains
374
more characters than that dialect’s configured
375
character limit. Some DB’s can handle too-long
376
table names during usage, and SQLA can handle this
377
as well. But various reflection/
378
checkfirst-during-create scenarios fail since we are
379
looking for the name within the DB’s catalog tables.<a class="changeset-link reference internal" href="#change-738cf5e3972ba6f7723c2c7acf6decc9">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/571">#571</a></p>
382
<li><p id="change-0.4.7-6"><span class="target" id="change-d85ff361d06db88fdb94e3932a143ad0"><strong>[schema] </strong></span>The index name generated when you say “index=True”
383
on a Column is truncated to the length appropriate
384
for the dialect. Additionally, an Index with a too-
385
long name cannot be explicitly dropped with
386
Index.drop(), similar to.<a class="changeset-link reference internal" href="#change-d85ff361d06db88fdb94e3932a143ad0">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/571">#571</a>, <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/820">#820</a></p>
391
<div class="section" id="change-0.4.7-mysql">
392
<h3>mysql<a class="headerlink" href="#change-0.4.7-mysql" title="Permalink to this headline">¶</a></h3>
394
<li><p id="change-0.4.7-7"><span class="target" id="change-0514aaebdc79f7f9ff25dca47dc4b225"><strong>[mysql] </strong></span>Added ‘CALL’ to the list of SQL keywords which return
395
result rows.<a class="changeset-link reference internal" href="#change-0514aaebdc79f7f9ff25dca47dc4b225">(link)</a><p></p>
400
<div class="section" id="change-0.4.7-oracle">
401
<h3>oracle<a class="headerlink" href="#change-0.4.7-oracle" title="Permalink to this headline">¶</a></h3>
403
<li><p id="change-0.4.7-8"><span class="target" id="change-aca4b41d0da66d4a3bd0e82c3a84cf5a"><strong>[oracle] </strong></span>Oracle get_default_schema_name() “normalizes” the name
404
before returning, meaning it returns a lower-case name
405
when the identifier is detected as case insensitive.<a class="changeset-link reference internal" href="#change-aca4b41d0da66d4a3bd0e82c3a84cf5a">(link)</a><p></p>
408
<li><p id="change-0.4.7-9"><span class="target" id="change-b47186d61937faba11d31de8eb03a326"><strong>[oracle] </strong></span>creating/dropping tables takes schema name into account
409
when searching for the existing table, so that tables
410
in other owner namespaces with the same name do not
411
conflict<a class="changeset-link reference internal" href="#change-b47186d61937faba11d31de8eb03a326">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/709">#709</a></p>
414
<li><p id="change-0.4.7-10"><span class="target" id="change-7568973ef20ea5f8c81322c145b9057f"><strong>[oracle] </strong></span>Cursors now have “arraysize” set to 50 by default on
415
them, the value of which is configurable using the
416
“arraysize” argument to create_engine() with the
417
Oracle dialect. This to account for cx_oracle’s default
418
setting of “1”, which has the effect of many round trips
419
being sent to Oracle. This actually works well in
420
conjunction with BLOB/CLOB-bound cursors, of which
421
there are any number available but only for the life of
422
that row request (so BufferedColumnRow is still needed,
423
but less so).<a class="changeset-link reference internal" href="#change-7568973ef20ea5f8c81322c145b9057f">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1062">#1062</a></p>
426
<li><p id="change-0.4.7-11"><span class="target" id="change-f9736a0cc3c4e162b300a782b7eca3f9"><strong>[oracle] </strong></span><dl class="docutils">
428
<dd><ul class="first last">
429
<li>add SLFloat type, which matches the SQLite REAL
430
type affinity. Previously, only SLNumeric was provided
431
which fulfills NUMERIC affinity, but that’s not the
436
<a class="changeset-link reference internal" href="#change-f9736a0cc3c4e162b300a782b7eca3f9">(link)</a><p></p>
441
<div class="section" id="change-0.4.7-misc">
442
<h3>misc<a class="headerlink" href="#change-0.4.7-misc" title="Permalink to this headline">¶</a></h3>
444
<li><p id="change-0.4.7-12"><span class="target" id="change-62dc8bb9ccdb89ab5046417cb1d71934"><strong>[postgres] </strong></span>Repaired server_side_cursors to properly detect
445
text() clauses.<a class="changeset-link reference internal" href="#change-62dc8bb9ccdb89ab5046417cb1d71934">(link)</a><p></p>
448
<li><p id="change-0.4.7-13"><span class="target" id="change-1d3294865f665d0cd4ea5f969d56a278"><strong>[postgres] </strong></span>Added PGCidr type.<a class="changeset-link reference internal" href="#change-1d3294865f665d0cd4ea5f969d56a278">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1092">#1092</a></p>
454
<div class="section" id="change-0.4.6">
455
<h2>0.4.6<a class="headerlink" href="#change-0.4.6" title="Permalink to this headline">¶</a></h2>
456
Released: Sat May 10 2008<div class="section" id="change-0.4.6-orm">
457
<h3>orm<a class="headerlink" href="#change-0.4.6-orm" title="Permalink to this headline">¶</a></h3>
459
<li><p id="change-0.4.6-0"><span class="target" id="change-e31fe2fb2fc3ae1652c5eec0dfa0d711"><strong>[orm] </strong></span>Fix to the recent relation() refactoring which fixes
460
exotic viewonly relations which join between local and
461
remote table multiple times, with a common column shared
462
between the joins.<a class="changeset-link reference internal" href="#change-e31fe2fb2fc3ae1652c5eec0dfa0d711">(link)</a><p></p>
465
<li><p id="change-0.4.6-1"><span class="target" id="change-f75f03e2d2f84749c5a66468e9f1a35f"><strong>[orm] </strong></span>Also re-established viewonly relation() configurations
466
that join across multiple tables.<a class="changeset-link reference internal" href="#change-f75f03e2d2f84749c5a66468e9f1a35f">(link)</a><p></p>
469
<li><p id="change-0.4.6-2"><span class="target" id="change-8eaf754f74a237ae2563356bab985463"><strong>[orm] </strong></span>Added experimental relation() flag to help with
470
primaryjoins across functions, etc.,
471
_local_remote_pairs=[tuples]. This complements a complex
472
primaryjoin condition allowing you to provide the
473
individual column pairs which comprise the relation’s
474
local and remote sides. Also improved lazy load SQL
475
generation to handle placing bind params inside of
476
functions and other expressions. (partial progress
477
towards)<a class="changeset-link reference internal" href="#change-8eaf754f74a237ae2563356bab985463">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/610">#610</a></p>
480
<li><p id="change-0.4.6-3"><span class="target" id="change-cc35ebaf57ac910c9fbb17727e48eac6"><strong>[orm] </strong></span>repaired single table inheritance such that you
481
can single-table inherit from a joined-table inherting
482
mapper without issue.<a class="changeset-link reference internal" href="#change-cc35ebaf57ac910c9fbb17727e48eac6">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1036">#1036</a></p>
485
<li><p id="change-0.4.6-4"><span class="target" id="change-0ff3c2bd9a30aeb035bd70efcc0b5bb4"><strong>[orm] </strong></span>Fixed “concatenate tuple” bug which could occur with
486
Query.order_by() if clause adaption had taken place.<a class="changeset-link reference internal" href="#change-0ff3c2bd9a30aeb035bd70efcc0b5bb4">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1027">#1027</a></p>
489
<li><p id="change-0.4.6-5"><span class="target" id="change-9e5d19c9631cbe865600f279d1869f33"><strong>[orm] </strong></span>Removed ancient assertion that mapped selectables require
490
“alias names” - the mapper creates its own alias now if
491
none is present. Though in this case you need to use the
492
class, not the mapped selectable, as the source of column
493
attributes - so a warning is still issued.<a class="changeset-link reference internal" href="#change-9e5d19c9631cbe865600f279d1869f33">(link)</a><p></p>
496
<li><p id="change-0.4.6-6"><span class="target" id="change-dde11f9e942ea94174168e9c076316e5"><strong>[orm] </strong></span>fixes to the “exists” function involving inheritance (any(),
497
has(), ~contains()); the full target join will be rendered
498
into the EXISTS clause for relations that link to subclasses.<a class="changeset-link reference internal" href="#change-dde11f9e942ea94174168e9c076316e5">(link)</a><p></p>
501
<li><p id="change-0.4.6-7"><span class="target" id="change-104376c27707b3a37374971243e2423c"><strong>[orm] </strong></span>restored usage of append_result() extension method for primary
502
query rows, when the extension is present and only a single-
503
entity result is being returned.<a class="changeset-link reference internal" href="#change-104376c27707b3a37374971243e2423c">(link)</a><p></p>
506
<li><p id="change-0.4.6-8"><span class="target" id="change-302298aee07ec1d1aac10fe144468a7a"><strong>[orm] </strong></span>Also re-established viewonly relation() configurations that
507
join across multiple tables.<a class="changeset-link reference internal" href="#change-302298aee07ec1d1aac10fe144468a7a">(link)</a><p></p>
510
<li><p id="change-0.4.6-9"><span class="target" id="change-6f570f7ef26a5a9b11b822a63353d962"><strong>[orm] </strong></span>removed ancient assertion that mapped selectables require
511
“alias names” - the mapper creates its own alias now if
512
none is present. Though in this case you need to use
513
the class, not the mapped selectable, as the source of
514
column attributes - so a warning is still issued.<a class="changeset-link reference internal" href="#change-6f570f7ef26a5a9b11b822a63353d962">(link)</a><p></p>
517
<li><p id="change-0.4.6-10"><span class="target" id="change-c3ba9d4b644bae5e507a69b17fad45b3"><strong>[orm] </strong></span>refined mapper._save_obj() which was unnecessarily calling
518
__ne__() on scalar values during flush<a class="changeset-link reference internal" href="#change-c3ba9d4b644bae5e507a69b17fad45b3">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1015">#1015</a></p>
521
<li><p id="change-0.4.6-11"><span class="target" id="change-71081f223b7ec2f83fe88a95bb74c96b"><strong>[orm] </strong></span>added a feature to eager loading whereby subqueries set
522
as column_property() with explicit label names (which is not
523
necessary, btw) will have the label anonymized when
524
the instance is part of the eager join, to prevent
525
conflicts with a subquery or column of the same name
526
on the parent object.<a class="changeset-link reference internal" href="#change-71081f223b7ec2f83fe88a95bb74c96b">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1019">#1019</a></p>
529
<li><p id="change-0.4.6-12"><span class="target" id="change-4f3b65db5c0882da0c3b53a68e19daf1"><strong>[orm] </strong></span>set-based collections <a href="#id1"><span class="problematic" id="id2">|</span></a>=, -=, ^= and &= are stricter about
530
their operands and only operate on sets, frozensets or
531
subclasses of the collection type. Previously, they would
532
accept any duck-typed set.<a class="changeset-link reference internal" href="#change-4f3b65db5c0882da0c3b53a68e19daf1">(link)</a><p></p>
535
<li><p id="change-0.4.6-13"><span class="target" id="change-b1518ae6a45f510afd237e22960d4dbc"><strong>[orm] </strong></span>added an example dynamic_dict/dynamic_dict.py, illustrating
536
a simple way to place dictionary behavior on top of
537
a dynamic_loader.<a class="changeset-link reference internal" href="#change-b1518ae6a45f510afd237e22960d4dbc">(link)</a><p></p>
542
<div class="section" id="change-0.4.6-orm-declarative">
543
<h3>orm declarative<a class="headerlink" href="#change-0.4.6-orm-declarative" title="Permalink to this headline">¶</a></h3>
545
<li><p id="change-0.4.6-14"><span class="target" id="change-6e72bcfc5ea35d0926f998977a8d8f6b"><strong>[orm] [extension] [declarative] </strong></span>Joined table inheritance mappers use a slightly relaxed
546
function to create the “inherit condition” to the parent
547
table, so that other foreign keys to not-yet-declared
548
Table objects don’t trigger an error.<a class="changeset-link reference internal" href="#change-6e72bcfc5ea35d0926f998977a8d8f6b">(link)</a><p></p>
551
<li><p id="change-0.4.6-15"><span class="target" id="change-7cf86b76b69093e8eaf193d8766bd8ce"><strong>[orm] [extension] [declarative] </strong></span>fixed reentrant mapper compile hang when
552
a declared attribute is used within ForeignKey,
553
ie. ForeignKey(MyOtherClass.someattribute)<a class="changeset-link reference internal" href="#change-7cf86b76b69093e8eaf193d8766bd8ce">(link)</a><p></p>
558
<div class="section" id="change-0.4.6-sql">
559
<h3>sql<a class="headerlink" href="#change-0.4.6-sql" title="Permalink to this headline">¶</a></h3>
561
<li><p id="change-0.4.6-16"><span class="target" id="change-c0a253c2a3ac8a52b71f9074c836045e"><strong>[sql] </strong></span>Added COLLATE support via the .collate(<collation>)
562
expression operator and collate(<expr>, <collation>) sql
563
function.<a class="changeset-link reference internal" href="#change-c0a253c2a3ac8a52b71f9074c836045e">(link)</a><p></p>
566
<li><p id="change-0.4.6-17"><span class="target" id="change-3425affd500ef60da0ceda4319ff76ac"><strong>[sql] </strong></span>Fixed bug with union() when applied to non-Table connected
567
select statements<a class="changeset-link reference internal" href="#change-3425affd500ef60da0ceda4319ff76ac">(link)</a><p></p>
570
<li><p id="change-0.4.6-18"><span class="target" id="change-c946f492d8c12da19c9976c66867241a"><strong>[sql] </strong></span>improved behavior of text() expressions when used as
571
FROM clauses, such as select().select_from(text(“sometext”))<a class="changeset-link reference internal" href="#change-c946f492d8c12da19c9976c66867241a">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1014">#1014</a></p>
574
<li><p id="change-0.4.6-19"><span class="target" id="change-79b0f66b8b318392d68b1e09fb21dbad"><strong>[sql] </strong></span>Column.copy() respects the value of “autoincrement”,
575
fixes usage with Migrate<a class="changeset-link reference internal" href="#change-79b0f66b8b318392d68b1e09fb21dbad">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1021">#1021</a></p>
580
<div class="section" id="change-0.4.6-mssql">
581
<h3>mssql<a class="headerlink" href="#change-0.4.6-mssql" title="Permalink to this headline">¶</a></h3>
583
<li><p id="change-0.4.6-20"><span class="target" id="change-4bf92261ee5df21cc151f29b57009c2d"><strong>[mssql] </strong></span>Added “odbc_autotranslate” parameter to engine / dburi
584
parameters. Any given string will be passed through to the
585
ODBC connection string as:<blockquote>
586
<div>“AutoTranslate=%s” % odbc_autotranslate</div></blockquote>
587
<a class="changeset-link reference internal" href="#change-4bf92261ee5df21cc151f29b57009c2d">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1005">#1005</a></p>
590
<li><p id="change-0.4.6-21"><span class="target" id="change-c27df151a64a19d159ffaed249f8c5ec"><strong>[mssql] </strong></span>Added “odbc_options” parameter to engine / dburi
591
parameters. The given string is simply appended to the
592
SQLAlchemy-generated odbc connection string.<p>This should obviate the need of adding a myriad of ODBC
593
options in the future.</p>
594
<a class="changeset-link reference internal" href="#change-c27df151a64a19d159ffaed249f8c5ec">(link)</a><p></p>
599
<div class="section" id="change-0.4.6-firebird">
600
<h3>firebird<a class="headerlink" href="#change-0.4.6-firebird" title="Permalink to this headline">¶</a></h3>
602
<li><p id="change-0.4.6-22"><span class="target" id="change-3135f866ba259ae39feef5c8fd6e9dc8"><strong>[firebird] </strong></span>Handle the “SUBSTRING(:string FROM :start FOR :length)”
603
builtin.<a class="changeset-link reference internal" href="#change-3135f866ba259ae39feef5c8fd6e9dc8">(link)</a><p></p>
608
<div class="section" id="change-0.4.6-misc">
609
<h3>misc<a class="headerlink" href="#change-0.4.6-misc" title="Permalink to this headline">¶</a></h3>
611
<li><p id="change-0.4.6-23"><span class="target" id="change-bd1c9b334fbda8764b59adae68a98d7d"><strong>[engines] </strong></span>Pool listeners can now be provided as a dictionary of
612
callables or a (possibly partial) duck-type of
613
PoolListener, your choice.<a class="changeset-link reference internal" href="#change-bd1c9b334fbda8764b59adae68a98d7d">(link)</a><p></p>
616
<li><p id="change-0.4.6-24"><span class="target" id="change-1026db7afd8b57d4eb7e9698f6304feb"><strong>[engines] </strong></span>added “rollback_returned” option to Pool which will
617
disable the rollback() issued when connections are
618
returned. This flag is only safe to use with a database
619
which does not support transactions (i.e. MySQL/MyISAM).<a class="changeset-link reference internal" href="#change-1026db7afd8b57d4eb7e9698f6304feb">(link)</a><p></p>
622
<li><p id="change-0.4.6-25"><span class="target" id="change-84780c3bfb869675d5cab997b68aca56"><strong>[ext] </strong></span>set-based association proxies <a href="#id3"><span class="problematic" id="id4">|</span></a>=, -=, ^= and &= are
623
stricter about their operands and only operate on sets,
624
frozensets or other association proxies. Previously, they
625
would accept any duck-typed set.<a class="changeset-link reference internal" href="#change-84780c3bfb869675d5cab997b68aca56">(link)</a><p></p>
631
<div class="section" id="change-0.4.5">
632
<h2>0.4.5<a class="headerlink" href="#change-0.4.5" title="Permalink to this headline">¶</a></h2>
633
Released: Fri Apr 04 2008<div class="section" id="change-0.4.5-orm">
634
<h3>orm<a class="headerlink" href="#change-0.4.5-orm" title="Permalink to this headline">¶</a></h3>
636
<li><p id="change-0.4.5-0"><span class="target" id="change-2c9bdeacf621a1e5c68e65432e78acc9"><strong>[orm] </strong></span>A small change in behavior to session.merge() - existing
637
objects are checked for based on primary key attributes, not
638
necessarily _instance_key. So the widely requested
639
capability, that:<blockquote>
640
<div>x = MyObject(id=1)
641
x = sess.merge(x)</div></blockquote>
642
<p>will in fact load MyObject with id #1 from the database if
643
present, is now available. merge() still copies the state
644
of the given object to the persistent one, so an example
645
like the above would typically have copied “None” from all
646
attributes of “x” onto the persistent copy. These can be
647
reverted using session.expire(x).</p>
648
<a class="changeset-link reference internal" href="#change-2c9bdeacf621a1e5c68e65432e78acc9">(link)</a><p></p>
651
<li><p id="change-0.4.5-1"><span class="target" id="change-ecb686988dd36c2668f8c1f13ab0b426"><strong>[orm] </strong></span>Also fixed behavior in merge() whereby collection elements
652
present on the destination but not the merged collection
653
were not being removed from the destination.<a class="changeset-link reference internal" href="#change-ecb686988dd36c2668f8c1f13ab0b426">(link)</a><p></p>
656
<li><p id="change-0.4.5-2"><span class="target" id="change-8c3e6ca94ae7018ad418fb8989b56c18"><strong>[orm] </strong></span>Added a more aggressive check for “uncompiled mappers”,
657
helps particularly with declarative layer<a class="changeset-link reference internal" href="#change-8c3e6ca94ae7018ad418fb8989b56c18">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/995">#995</a></p>
660
<li><p id="change-0.4.5-3"><span class="target" id="change-92147b4d8f5dc129bb6af919988b1578"><strong>[orm] </strong></span>The methodology behind “primaryjoin”/”secondaryjoin” has
661
been refactored. Behavior should be slightly more
662
intelligent, primarily in terms of error messages which
663
have been pared down to be more readable. In a slight
664
number of scenarios it can better resolve the correct
665
foreign key than before.<a class="changeset-link reference internal" href="#change-92147b4d8f5dc129bb6af919988b1578">(link)</a><p></p>
668
<li><p id="change-0.4.5-4"><span class="target" id="change-e9af0076f84f16dc139143d25c2481c4"><strong>[orm] </strong></span>Added comparable_property(), adds query Comparator
669
behavior to regular, unmanaged Python properties<a class="changeset-link reference internal" href="#change-e9af0076f84f16dc139143d25c2481c4">(link)</a><p></p>
672
<li><p id="change-0.4.5-5"><span class="target" id="change-9a3c3752fa2fda67a4fbb703fcd690ab"><strong>[orm] [‘machines’] [Company.employees.of_type(Engineer)] </strong></span>the functionality of query.with_polymorphic() has
673
been added to mapper() as a configuration option.<dl class="docutils">
674
<dt>It’s set via several forms:</dt>
675
<dd>with_polymorphic=’*’
676
with_polymorphic=[mappers]
677
with_polymorphic=(‘*’, selectable)
678
with_polymorphic=([mappers], selectable)</dd>
680
<p>This controls the default polymorphic loading strategy
681
for inherited mappers. When a selectable is not given,
682
outer joins are created for all joined-table inheriting
683
mappers requested. Note that the auto-create of joins
684
is not compatible with concrete table inheritance.</p>
685
<p>The existing select_table flag on mapper() is now
686
deprecated and is synonymous with
687
with_polymorphic(‘*’, select_table). Note that the
688
underlying “guts” of select_table have been
689
completely removed and replaced with the newer,
690
more flexible approach.</p>
691
<p>The new approach also automatically allows eager loads
692
to work for subclasses, if they are present, for
695
<div><dl class="docutils">
696
<dt>sess.query(Company).options(</dt>
697
<dd>eagerload_all(</dd>
701
<p>to load Company objects, their employees, and the
702
‘machines’ collection of employees who happen to be
703
Engineers. A “with_polymorphic” Query option should be
704
introduced soon as well which would allow per-Query
705
control of with_polymorphic() on relations.</p>
706
<a class="changeset-link reference internal" href="#change-9a3c3752fa2fda67a4fbb703fcd690ab">(link)</a><p></p>
709
<li><p id="change-0.4.5-6"><span class="target" id="change-8b57d2ed0d6bbe58c75f64223341c1c8"><strong>[orm] </strong></span>added two “experimental” features to Query,
710
“experimental” in that their specific name/behavior
711
is not carved in stone just yet: _values() and
712
_from_self(). We’d like feedback on these.<ul>
713
<li>_values(<a href="#id5"><span class="problematic" id="id6">*</span></a>columns) is given a list of column
714
expressions, and returns a new Query that only
715
returns those columns. When evaluated, the return
716
value is a list of tuples just like when using
717
add_column() or add_entity(), the only difference is
718
that “entity zero”, i.e. the mapped class, is not
719
included in the results. This means it finally makes
720
sense to use group_by() and having() on Query, which
721
have been sitting around uselessly until now.<p>A future change to this method may include that its
722
ability to join, filter and allow other options not
723
related to a “resultset” are removed, so the feedback
724
we’re looking for is how people want to use
725
_values()...i.e. at the very end, or do people prefer
726
to continue generating after it’s called.</p>
728
<li>_from_self() compiles the SELECT statement for the
729
Query (minus any eager loaders), and returns a new
730
Query that selects from that SELECT. So basically you
731
can query from a Query without needing to extract the
732
SELECT statement manually. This gives meaning to
733
operations like query[3:5]._from_self().filter(some
734
criterion). There’s not much controversial here
735
except that you can quickly create highly nested
736
queries that are less efficient, and we want feedback
737
on the naming choice.</li>
739
<a class="changeset-link reference internal" href="#change-8b57d2ed0d6bbe58c75f64223341c1c8">(link)</a><p></p>
742
<li><p id="change-0.4.5-7"><span class="target" id="change-092e151b59ef8f702823a709f4e6554f"><strong>[orm] </strong></span>query.order_by() and query.group_by() will accept
743
multiple arguments using <a href="#id7"><span class="problematic" id="id8">*</span></a>args (like select()
744
already does).<a class="changeset-link reference internal" href="#change-092e151b59ef8f702823a709f4e6554f">(link)</a><p></p>
747
<li><p id="change-0.4.5-8"><span class="target" id="change-86eb8853972534a7dafcbff8b9986332"><strong>[orm] </strong></span>Added some convenience descriptors to Query:
748
query.statement returns the full SELECT construct,
749
query.whereclause returns just the WHERE part of the
750
SELECT construct.<a class="changeset-link reference internal" href="#change-86eb8853972534a7dafcbff8b9986332">(link)</a><p></p>
753
<li><p id="change-0.4.5-9"><span class="target" id="change-aa4cb730a2e43a1ad4e1443ec05973fe"><strong>[orm] </strong></span>Fixed/covered case when using a False/0 value as a
754
polymorphic discriminator.<a class="changeset-link reference internal" href="#change-aa4cb730a2e43a1ad4e1443ec05973fe">(link)</a><p></p>
757
<li><p id="change-0.4.5-10"><span class="target" id="change-02cba4fb2cbfa1275190cc9ed35f1d16"><strong>[orm] </strong></span>Fixed bug which was preventing synonym() attributes from
758
being used with inheritance<a class="changeset-link reference internal" href="#change-02cba4fb2cbfa1275190cc9ed35f1d16">(link)</a><p></p>
761
<li><p id="change-0.4.5-11"><span class="target" id="change-c58703687f6e5690fb29d5c65bec8f2e"><strong>[orm] </strong></span>Fixed SQL function truncation of trailing underscores<a class="changeset-link reference internal" href="#change-c58703687f6e5690fb29d5c65bec8f2e">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/996">#996</a></p>
764
<li><p id="change-0.4.5-12"><span class="target" id="change-4d790ba27407b3f2c5e5442e941ee625"><strong>[orm] </strong></span>When attributes are expired on a pending instance, an
765
error will not be raised when the “refresh” action is
766
triggered and no result is found.<a class="changeset-link reference internal" href="#change-4d790ba27407b3f2c5e5442e941ee625">(link)</a><p></p>
769
<li><p id="change-0.4.5-13"><span class="target" id="change-ee82467594e923772bba0a03199886e6"><strong>[orm] </strong></span>Session.execute can now find binds from metadata<a class="changeset-link reference internal" href="#change-ee82467594e923772bba0a03199886e6">(link)</a><p></p>
772
<li><p id="change-0.4.5-14"><span class="target" id="change-79438d10e98c888cce0932f09a42a26f"><strong>[orm] </strong></span>Adjusted the definition of “self-referential” to be any
773
two mappers with a common parent (this affects whether or
774
not aliased=True is required when joining with Query).<a class="changeset-link reference internal" href="#change-79438d10e98c888cce0932f09a42a26f">(link)</a><p></p>
777
<li><p id="change-0.4.5-15"><span class="target" id="change-f896c87995fe90330fd02cbf21c852bf"><strong>[orm] </strong></span>Made some fixes to the “from_joinpoint” argument to
778
query.join() so that if the previous join was aliased and
779
this one isn’t, the join still happens successfully.<a class="changeset-link reference internal" href="#change-f896c87995fe90330fd02cbf21c852bf">(link)</a><p></p>
782
<li><p id="change-0.4.5-16"><span class="target" id="change-721ade134b0684d73d040e1d5c61feb9"><strong>[orm] </strong></span><dl class="docutils">
783
<dt>Assorted “cascade deletes” fixes:</dt>
784
<dd><ul class="first last">
785
<li>Fixed “cascade delete” operation of dynamic relations,
786
which had only been implemented for foreign-key
787
nulling behavior in 0.4.2 and not actual cascading
789
<li>Delete cascade without delete-orphan cascade on a
790
many-to-one will not delete orphans which were
791
disconnected from the parent before session.delete()
792
is called on the parent (one-to-many already had
794
<li>Delete cascade with delete-orphan will delete orphans
795
whether or not it remains attached to its also-deleted
797
<li>delete-orphan casacde is properly detected on relations
798
that are present on superclasses when using inheritance.</li>
802
<a class="changeset-link reference internal" href="#change-721ade134b0684d73d040e1d5c61feb9">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/895">#895</a></p>
805
<li><p id="change-0.4.5-17"><span class="target" id="change-510cb165c89c094b6cc2b5db3787b360"><strong>[orm] </strong></span>Fixed order_by calculation in Query to properly alias
806
mapper-config’ed order_by when using select_from()<a class="changeset-link reference internal" href="#change-510cb165c89c094b6cc2b5db3787b360">(link)</a><p></p>
809
<li><p id="change-0.4.5-18"><span class="target" id="change-94f2275e47afba73d8f37f7572917466"><strong>[orm] </strong></span>Refactored the diffing logic that kicks in when replacing
810
one collection with another into collections.bulk_replace,
811
useful to anyone building multi-level collections.<a class="changeset-link reference internal" href="#change-94f2275e47afba73d8f37f7572917466">(link)</a><p></p>
814
<li><p id="change-0.4.5-19"><span class="target" id="change-67d9d0b8806c805bf6baa1e8ed8dd735"><strong>[orm] </strong></span>Cascade traversal algorithm converted from recursive to
815
iterative to support deep object graphs.<a class="changeset-link reference internal" href="#change-67d9d0b8806c805bf6baa1e8ed8dd735">(link)</a><p></p>
820
<div class="section" id="change-0.4.5-orm-declarative">
821
<h3>orm declarative<a class="headerlink" href="#change-0.4.5-orm-declarative" title="Permalink to this headline">¶</a></h3>
823
<li><p id="change-0.4.5-20"><span class="target" id="change-f5fc92b64655f9897a0758861123e3dc"><strong>[orm] [extension] [declarative] </strong></span>The “synonym” function is now directly usable with
824
“declarative”. Pass in the decorated property using the
825
“descriptor” keyword argument, e.g.: somekey =
826
synonym(‘_somekey’, descriptor=property(g, s))<a class="changeset-link reference internal" href="#change-f5fc92b64655f9897a0758861123e3dc">(link)</a><p></p>
829
<li><p id="change-0.4.5-21"><span class="target" id="change-1c8b78acb5469017fa9165603b123205"><strong>[orm] [extension] [declarative] </strong></span>The “deferred” function is usable with “declarative”.
830
Simplest usage is to declare deferred and Column together,
831
e.g.: data = deferred(Column(Text))<a class="changeset-link reference internal" href="#change-1c8b78acb5469017fa9165603b123205">(link)</a><p></p>
834
<li><p id="change-0.4.5-22"><span class="target" id="change-92af8493880c77b027ad568e9fea4a4e"><strong>[orm] [extension] [declarative] </strong></span>Declarative also gained @synonym_for(...) and
835
@comparable_using(...), front-ends for synonym and
836
comparable_property.<a class="changeset-link reference internal" href="#change-92af8493880c77b027ad568e9fea4a4e">(link)</a><p></p>
839
<li><p id="change-0.4.5-23"><span class="target" id="change-2e0484c6c3c3b159d5dce42185fd83af"><strong>[orm] [extension] [declarative] </strong></span>Improvements to mapper compilation when using declarative;
840
already-compiled mappers will still trigger compiles of
841
other uncompiled mappers when used<a class="changeset-link reference internal" href="#change-2e0484c6c3c3b159d5dce42185fd83af">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/995">#995</a></p>
844
<li><p id="change-0.4.5-24"><span class="target" id="change-ab9ef5d41c92c8b3e3cf08569f4910fe"><strong>[orm] [extension] [declarative] </strong></span>Declarative will complete setup for Columns lacking names,
845
allows a more DRY syntax.<blockquote>
846
<div><dl class="docutils">
847
<dt>class Foo(Base):</dt>
848
<dd>__tablename__ = ‘foos’
849
id = Column(Integer, primary_key=True)</dd>
852
<a class="changeset-link reference internal" href="#change-ab9ef5d41c92c8b3e3cf08569f4910fe">(link)</a><p></p>
855
<li><p id="change-0.4.5-25"><span class="target" id="change-47dc505eeee78f8e4a2036cd9ec269e8"><strong>[orm] [extension] [declarative] </strong></span>inheritance in declarative can be disabled when sending
856
“inherits=None” to __mapper_args__.<a class="changeset-link reference internal" href="#change-47dc505eeee78f8e4a2036cd9ec269e8">(link)</a><p></p>
859
<li><p id="change-0.4.5-26"><span class="target" id="change-d23aa381b803d1871f4a8e5090558669"><strong>[orm] [extension] [declarative] </strong></span>declarative_base() takes optional kwarg “mapper”, which
860
is any callable/class/method that produces a mapper,
861
such as declarative_base(mapper=scopedsession.mapper).
862
This property can also be set on individual declarative
863
classes using the “__mapper_cls__” property.<a class="changeset-link reference internal" href="#change-d23aa381b803d1871f4a8e5090558669">(link)</a><p></p>
868
<div class="section" id="change-0.4.5-sql">
869
<h3>sql<a class="headerlink" href="#change-0.4.5-sql" title="Permalink to this headline">¶</a></h3>
871
<li><p id="change-0.4.5-27"><span class="target" id="change-86518949b9a04cceb5d9eef390e32768"><strong>[sql] </strong></span>schema-qualified tables now will place the schemaname
872
ahead of the tablename in all column expressions as well
873
as when generating column labels. This prevents cross-
874
schema name collisions in all cases<a class="changeset-link reference internal" href="#change-86518949b9a04cceb5d9eef390e32768">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/999">#999</a></p>
877
<li><p id="change-0.4.5-28"><span class="target" id="change-3bb024dda072d0b61145352051204bfc"><strong>[sql] </strong></span>can now allow selects which correlate all FROM clauses
878
and have no FROM themselves. These are typically
879
used in a scalar context, i.e. SELECT x, (SELECT x WHERE y)
880
FROM table. Requires explicit correlate() call.<a class="changeset-link reference internal" href="#change-3bb024dda072d0b61145352051204bfc">(link)</a><p></p>
883
<li><p id="change-0.4.5-29"><span class="target" id="change-b98de44bd2b73a6b57d74988b3c71e30"><strong>[sql] </strong></span>‘name’ is no longer a required constructor argument for
884
Column(). It (and .key) may now be deferred until the
885
column is added to a Table.<a class="changeset-link reference internal" href="#change-b98de44bd2b73a6b57d74988b3c71e30">(link)</a><p></p>
888
<li><p id="change-0.4.5-30"><span class="target" id="change-d248403840e6a2e0c66b497f9dfd1f44"><strong>[sql] </strong></span>like(), ilike(), contains(), startswith(), endswith() take
889
an optional keyword argument “escape=<somestring>”, which
890
is set as the escape character using the syntax “x LIKE y
891
ESCAPE ‘<somestring>’”.<a class="changeset-link reference internal" href="#change-d248403840e6a2e0c66b497f9dfd1f44">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/791">#791</a>, <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/993">#993</a></p>
894
<li><p id="change-0.4.5-31"><span class="target" id="change-7f02bb91d56e815b7b631be7c7323f79"><strong>[sql] </strong></span>random() is now a generic sql function and will compile to
895
the database’s random implementation, if any.<a class="changeset-link reference internal" href="#change-7f02bb91d56e815b7b631be7c7323f79">(link)</a><p></p>
898
<li><p id="change-0.4.5-32"><span class="target" id="change-a08969f0ce6ab98d21abf6e35cebaa1d"><strong>[sql] </strong></span>update().values() and insert().values() take keyword
899
arguments.<a class="changeset-link reference internal" href="#change-a08969f0ce6ab98d21abf6e35cebaa1d">(link)</a><p></p>
902
<li><p id="change-0.4.5-33"><span class="target" id="change-085c87879e1a4fb0d6206454a950a1ce"><strong>[sql] </strong></span>Fixed an issue in select() regarding its generation of
903
FROM clauses, in rare circumstances two clauses could be
904
produced when one was intended to cancel out the other.
905
Some ORM queries with lots of eager loads might have seen
906
this symptom.<a class="changeset-link reference internal" href="#change-085c87879e1a4fb0d6206454a950a1ce">(link)</a><p></p>
909
<li><p id="change-0.4.5-34"><span class="target" id="change-fb0089247521d91d7d7bb262cb411a64"><strong>[sql] </strong></span>The case() function now also takes a dictionary as its
910
whens parameter. It also interprets the “THEN”
911
expressions as values by default, meaning case([(x==y,
912
“foo”)]) will interpret “foo” as a bound value, not a SQL
913
expression. use text(expr) for literal SQL expressions in
914
this case. For the criterion itself, these may be literal
915
strings only if the “value” keyword is present, otherwise
916
SA will force explicit usage of either text() or
917
literal().<a class="changeset-link reference internal" href="#change-fb0089247521d91d7d7bb262cb411a64">(link)</a><p></p>
922
<div class="section" id="change-0.4.5-mysql">
923
<h3>mysql<a class="headerlink" href="#change-0.4.5-mysql" title="Permalink to this headline">¶</a></h3>
925
<li><p id="change-0.4.5-35"><span class="target" id="change-c22f3fdf2cdf167542da47643dfc68ab"><strong>[mysql] </strong></span>The connection.info keys the dialect uses to cache server
926
settings have changed and are now namespaced.<a class="changeset-link reference internal" href="#change-c22f3fdf2cdf167542da47643dfc68ab">(link)</a><p></p>
931
<div class="section" id="change-0.4.5-mssql">
932
<h3>mssql<a class="headerlink" href="#change-0.4.5-mssql" title="Permalink to this headline">¶</a></h3>
934
<li><p id="change-0.4.5-36"><span class="target" id="change-c08d60f2100e58e57023f2ea19c2c241"><strong>[mssql] </strong></span>Reflected tables will now automatically load other tables
935
which are referenced by Foreign keys in the auto-loaded
936
table,.<a class="changeset-link reference internal" href="#change-c08d60f2100e58e57023f2ea19c2c241">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/979">#979</a></p>
939
<li><p id="change-0.4.5-37"><span class="target" id="change-bd1313c4dc35f7c1f3a1380578f9c1e5"><strong>[mssql] </strong></span>Added executemany check to skip identity fetch,.<a class="changeset-link reference internal" href="#change-bd1313c4dc35f7c1f3a1380578f9c1e5">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/916">#916</a></p>
942
<li><p id="change-0.4.5-38"><span class="target" id="change-80eac4c5f370dd297d4e3cafbad27a96"><strong>[mssql] </strong></span>Added stubs for small date type.<a class="changeset-link reference internal" href="#change-80eac4c5f370dd297d4e3cafbad27a96">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/884">#884</a></p>
945
<li><p id="change-0.4.5-39"><span class="target" id="change-171f3ad2f4dba5fde36680baa1dc3875"><strong>[mssql] </strong></span>Added a new ‘driver’ keyword parameter for the pyodbc dialect.
946
Will substitute into the ODBC connection string if given,
947
defaults to ‘SQL Server’.<a class="changeset-link reference internal" href="#change-171f3ad2f4dba5fde36680baa1dc3875">(link)</a><p></p>
950
<li><p id="change-0.4.5-40"><span class="target" id="change-81777f583ac945b32caaf0ee3aee5e0f"><strong>[mssql] </strong></span>Added a new ‘max_identifier_length’ keyword parameter for
951
the pyodbc dialect.<a class="changeset-link reference internal" href="#change-81777f583ac945b32caaf0ee3aee5e0f">(link)</a><p></p>
954
<li><p id="change-0.4.5-41"><span class="target" id="change-4a7ee1c669796dd4516a38bfb42b52ff"><strong>[mssql] </strong></span>Improvements to pyodbc + Unix. If you couldn’t get that
955
combination to work before, please try again.<a class="changeset-link reference internal" href="#change-4a7ee1c669796dd4516a38bfb42b52ff">(link)</a><p></p>
960
<div class="section" id="change-0.4.5-oracle">
961
<h3>oracle<a class="headerlink" href="#change-0.4.5-oracle" title="Permalink to this headline">¶</a></h3>
963
<li><p id="change-0.4.5-42"><span class="target" id="change-34b821a274800e05021e8fb2396ee13c"><strong>[oracle] </strong></span>The “owner” keyword on Table is now deprecated, and is
964
exactly synonymous with the “schema” keyword. Tables can
965
now be reflected with alternate “owner” attributes,
966
explicitly stated on the Table object or not using
967
“schema”.<a class="changeset-link reference internal" href="#change-34b821a274800e05021e8fb2396ee13c">(link)</a><p></p>
970
<li><p id="change-0.4.5-43"><span class="target" id="change-fa31cab3a0232df3b107e07f3910f759"><strong>[oracle] </strong></span>All of the “magic” searching for synonyms, DBLINKs etc.
971
during table reflection are disabled by default unless you
972
specify “oracle_resolve_synonyms=True” on the Table
973
object. Resolving synonyms necessarily leads to some
974
messy guessing which we’d rather leave off by default.
975
When the flag is set, tables and related tables will be
976
resolved against synonyms in all cases, meaning if a
977
synonym exists for a particular table, reflection will use
978
it when reflecting related tables. This is stickier
979
behavior than before which is why it’s off by default.<a class="changeset-link reference internal" href="#change-fa31cab3a0232df3b107e07f3910f759">(link)</a><p></p>
982
<li><p id="change-0.4.5-44"><span class="target" id="change-34b821a274800e05021e8fb2396ee13c"><strong>[oracle] </strong></span>The “owner” keyword on Table is now deprecated, and is
983
exactly synonymous with the “schema” keyword. Tables can
984
now be reflected with alternate “owner” attributes,
985
explicitly stated on the Table object or not using
986
“schema”.<a class="changeset-link reference internal" href="#change-34b821a274800e05021e8fb2396ee13c">(link)</a><p></p>
989
<li><p id="change-0.4.5-45"><span class="target" id="change-fa31cab3a0232df3b107e07f3910f759"><strong>[oracle] </strong></span>All of the “magic” searching for synonyms, DBLINKs etc.
990
during table reflection are disabled by default unless you
991
specify “oracle_resolve_synonyms=True” on the Table
992
object. Resolving synonyms necessarily leads to some
993
messy guessing which we’d rather leave off by default.
994
When the flag is set, tables and related tables will be
995
resolved against synonyms in all cases, meaning if a
996
synonym exists for a particular table, reflection will use
997
it when reflecting related tables. This is stickier
998
behavior than before which is why it’s off by default.<a class="changeset-link reference internal" href="#change-fa31cab3a0232df3b107e07f3910f759">(link)</a><p></p>
1003
<div class="section" id="change-0.4.5-misc">
1004
<h3>misc<a class="headerlink" href="#change-0.4.5-misc" title="Permalink to this headline">¶</a></h3>
1006
<li><p id="change-0.4.5-46"><span class="target" id="change-b6f64ab87a83752e5c837be7a29259da"><strong>[postgres] </strong></span>Got PG server side cursors back into shape, added fixed
1007
unit tests as part of the default test suite. Added
1008
better uniqueness to the cursor ID<a class="changeset-link reference internal" href="#change-b6f64ab87a83752e5c837be7a29259da">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1001">#1001</a></p>
1014
<div class="section" id="change-0.4.4">
1015
<h2>0.4.4<a class="headerlink" href="#change-0.4.4" title="Permalink to this headline">¶</a></h2>
1016
Released: Wed Mar 12 2008<div class="section" id="change-0.4.4-orm">
1017
<h3>orm<a class="headerlink" href="#change-0.4.4-orm" title="Permalink to this headline">¶</a></h3>
1019
<li><p id="change-0.4.4-0"><span class="target" id="change-26d54c6302b65f9de74b3cf2e3a5d512"><strong>[orm] </strong></span>any(), has(), contains(), ~contains(), attribute level ==
1020
and != now work properly with self-referential relations -
1021
the clause inside the EXISTS is aliased on the “remote”
1022
side to distinguish it from the parent table. This
1023
applies to single table self-referential as well as
1024
inheritance-based self-referential.<a class="changeset-link reference internal" href="#change-26d54c6302b65f9de74b3cf2e3a5d512">(link)</a><p></p>
1027
<li><p id="change-0.4.4-1"><span class="target" id="change-57e9f7b0e107e07a75467467df6a2d2d"><strong>[orm] </strong></span>Repaired behavior of == and != operators at the relation()
1028
level when compared against NULL for one-to-one relations<a class="changeset-link reference internal" href="#change-57e9f7b0e107e07a75467467df6a2d2d">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/985">#985</a></p>
1031
<li><p id="change-0.4.4-2"><span class="target" id="change-6b0aad45ce1f29ad9158b8009df12108"><strong>[orm] </strong></span>Fixed bug whereby session.expire() attributes were not
1032
loading on an polymorphically-mapped instance mapped by a
1033
select_table mapper.<a class="changeset-link reference internal" href="#change-6b0aad45ce1f29ad9158b8009df12108">(link)</a><p></p>
1036
<li><p id="change-0.4.4-3"><span class="target" id="change-4a735ee740f2ee53043439ca2374e2bd"><strong>[orm] </strong></span>Added query.with_polymorphic() - specifies a list of
1037
classes which descend from the base class, which will be
1038
added to the FROM clause of the query. Allows subclasses
1039
to be used within filter() criterion as well as eagerly
1040
loads the attributes of those subclasses.<a class="changeset-link reference internal" href="#change-4a735ee740f2ee53043439ca2374e2bd">(link)</a><p></p>
1043
<li><p id="change-0.4.4-4"><span class="target" id="change-260b0a787300d2b7ce427e108dcbf68d"><strong>[orm] </strong></span>Your cries have been heard: removing a pending item from
1044
an attribute or collection with delete-orphan expunges the
1045
item from the session; no FlushError is raised. Note that
1046
if you session.save()’ed the pending item explicitly, the
1047
attribute/collection removal still knocks it out.<a class="changeset-link reference internal" href="#change-260b0a787300d2b7ce427e108dcbf68d">(link)</a><p></p>
1050
<li><p id="change-0.4.4-5"><span class="target" id="change-6af8ad8ff1bc8b70b4267a621b75aa56"><strong>[orm] </strong></span>session.refresh() and session.expire() raise an error when
1051
called on instances which are not persistent within the
1052
session<a class="changeset-link reference internal" href="#change-6af8ad8ff1bc8b70b4267a621b75aa56">(link)</a><p></p>
1055
<li><p id="change-0.4.4-6"><span class="target" id="change-39aac3cdd599e8bac76663700e034c9e"><strong>[orm] </strong></span>Fixed potential generative bug when the same Query was
1056
used to generate multiple Query objects using join().<a class="changeset-link reference internal" href="#change-39aac3cdd599e8bac76663700e034c9e">(link)</a><p></p>
1059
<li><p id="change-0.4.4-7"><span class="target" id="change-b9f84fa3c8eb53ab3417b2ff57afae13"><strong>[orm] </strong></span>Fixed bug which was introduced in 0.4.3, whereby loading
1060
an already-persistent instance mapped with joined table
1061
inheritance would trigger a useless “secondary” load from
1062
its joined table, when using the default “select”
1063
polymorphic_fetch. This was due to attributes being
1064
marked as expired during its first load and not getting
1065
unmarked from the previous “secondary” load. Attributes
1066
are now unexpired based on presence in __dict__ after any
1067
load or commit operation succeeds.<a class="changeset-link reference internal" href="#change-b9f84fa3c8eb53ab3417b2ff57afae13">(link)</a><p></p>
1070
<li><p id="change-0.4.4-8"><span class="target" id="change-5c46e27af0aab071053f1150c32ad167"><strong>[orm] </strong></span>Deprecated Query methods apply_sum(), apply_max(),
1071
apply_min(), apply_avg(). Better methodologies are
1072
coming....<a class="changeset-link reference internal" href="#change-5c46e27af0aab071053f1150c32ad167">(link)</a><p></p>
1075
<li><p id="change-0.4.4-9"><span class="target" id="change-1a2a5f137d66ae4e45a504a7fcb25a9b"><strong>[orm] </strong></span>relation() can accept a callable for its first argument,
1076
which returns the class to be related. This is in place
1077
to assist declarative packages to define relations without
1078
classes yet being in place.<a class="changeset-link reference internal" href="#change-1a2a5f137d66ae4e45a504a7fcb25a9b">(link)</a><p></p>
1081
<li><p id="change-0.4.4-10"><span class="target" id="change-a4ea39df253b6f91a5d8204bf227ada0"><strong>[orm] </strong></span>Added a new “higher level” operator called “of_type()”:
1082
used in join() as well as with any() and has(), qualifies
1083
the subclass which will be used in filter criterion, e.g.:<blockquote>
1084
<div><dl class="docutils">
1085
<dt>query.filter(Company.employees.of_type(Engineer).</dt>
1086
<dd>any(Engineer.name==’foo’))</dd>
1089
<dl class="docutils">
1090
<dt>query.join(Company.employees.of_type(Engineer)).</dt>
1091
<dd>filter(Engineer.name==’foo’)</dd>
1094
<a class="changeset-link reference internal" href="#change-a4ea39df253b6f91a5d8204bf227ada0">(link)</a><p></p>
1097
<li><p id="change-0.4.4-11"><span class="target" id="change-1272340a6e01cf700e61e3d2f39cdacf"><strong>[orm] </strong></span>Preventive code against a potential lost-reference bug in
1098
flush().<a class="changeset-link reference internal" href="#change-1272340a6e01cf700e61e3d2f39cdacf">(link)</a><p></p>
1101
<li><p id="change-0.4.4-12"><span class="target" id="change-664f4f2b4efd0e58806d46ba15d2618a"><strong>[orm] </strong></span>Expressions used in filter(), filter_by() and others, when
1102
they make usage of a clause generated from a relation
1103
using the identity of a child object (e.g.,
1104
filter(Parent.child==<somechild>)), evaluate the actual
1105
primary key value of <somechild> at execution time so that
1106
the autoflush step of the Query can complete, thereby
1107
populating the PK value of <somechild> in the case that
1108
<somechild> was pending.<a class="changeset-link reference internal" href="#change-664f4f2b4efd0e58806d46ba15d2618a">(link)</a><p></p>
1111
<li><p id="change-0.4.4-13"><span class="target" id="change-92a43783a44458853e3f87836801b5f0"><strong>[orm] </strong></span>setting the relation()-level order by to a column in the
1112
many-to-many “secondary” table will now work with eager
1113
loading, previously the “order by” wasn’t aliased against
1114
the secondary table’s alias.<a class="changeset-link reference internal" href="#change-92a43783a44458853e3f87836801b5f0">(link)</a><p></p>
1117
<li><p id="change-0.4.4-14"><span class="target" id="change-8c8e596e12f51cbaab0d60f9eb39e22a"><strong>[orm] </strong></span>Synonyms riding on top of existing descriptors are now
1118
full proxies to those descriptors.<a class="changeset-link reference internal" href="#change-8c8e596e12f51cbaab0d60f9eb39e22a">(link)</a><p></p>
1123
<div class="section" id="change-0.4.4-sql">
1124
<h3>sql<a class="headerlink" href="#change-0.4.4-sql" title="Permalink to this headline">¶</a></h3>
1126
<li><p id="change-0.4.4-15"><span class="target" id="change-361cea88f023decd2edcc9f4bcfb85d9"><strong>[sql] </strong></span>Can again create aliases of selects against textual FROM
1127
clauses.<a class="changeset-link reference internal" href="#change-361cea88f023decd2edcc9f4bcfb85d9">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/975">#975</a></p>
1130
<li><p id="change-0.4.4-16"><span class="target" id="change-f29b12fe4c2de26e389d59d438cf1ea8"><strong>[sql] </strong></span>The value of a bindparam() can be a callable, in which
1131
case it’s evaluated at statement execution time to get the
1132
value.<a class="changeset-link reference internal" href="#change-f29b12fe4c2de26e389d59d438cf1ea8">(link)</a><p></p>
1135
<li><p id="change-0.4.4-17"><span class="target" id="change-fa73dc1b6400960fc86f04e571789eac"><strong>[sql] </strong></span>Added exception wrapping/reconnect support to result set
1136
fetching. Reconnect works for those databases that raise
1137
a catchable data error during results (i.e. doesn’t work
1138
on MySQL)<a class="changeset-link reference internal" href="#change-fa73dc1b6400960fc86f04e571789eac">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/978">#978</a></p>
1141
<li><p id="change-0.4.4-18"><span class="target" id="change-82a8a6a9be6beb556e3c11919db1d762"><strong>[sql] </strong></span>Implemented two-phase API for “threadlocal” engine, via
1142
engine.begin_twophase(), engine.prepare()<a class="changeset-link reference internal" href="#change-82a8a6a9be6beb556e3c11919db1d762">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/936">#936</a></p>
1145
<li><p id="change-0.4.4-19"><span class="target" id="change-3ca250e58167aa467bdd74e86f81f8e2"><strong>[sql] </strong></span>Fixed bug which was preventing UNIONS from being
1146
cloneable.<a class="changeset-link reference internal" href="#change-3ca250e58167aa467bdd74e86f81f8e2">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/986">#986</a></p>
1149
<li><p id="change-0.4.4-20"><span class="target" id="change-cace8907ce2c688f149a3b7193cb6f03"><strong>[sql] </strong></span>Added “bind” keyword argument to insert(), update(),
1150
delete() and DDL(). The .bind property is now assignable
1151
on those statements as well as on select().<a class="changeset-link reference internal" href="#change-cace8907ce2c688f149a3b7193cb6f03">(link)</a><p></p>
1154
<li><p id="change-0.4.4-21"><span class="target" id="change-0e487d0efd2d32fd049531b232a703ea"><strong>[sql] </strong></span>Insert statements can now be compiled with extra “prefix”
1155
words between INSERT and INTO, for vendor extensions like
1156
MySQL’s INSERT IGNORE INTO table.<a class="changeset-link reference internal" href="#change-0e487d0efd2d32fd049531b232a703ea">(link)</a><p></p>
1161
<div class="section" id="change-0.4.4-misc">
1162
<h3>misc<a class="headerlink" href="#change-0.4.4-misc" title="Permalink to this headline">¶</a></h3>
1164
<li><p id="change-0.4.4-22"><span class="target" id="change-e896f826ca21ffa3a8aee4ce1aa75540"><strong>[dialects] </strong></span>Invalid SQLite connection URLs now raise an error.<a class="changeset-link reference internal" href="#change-e896f826ca21ffa3a8aee4ce1aa75540">(link)</a><p></p>
1167
<li><p id="change-0.4.4-23"><span class="target" id="change-1f49158d705ba22bde8f415aae01e7df"><strong>[dialects] </strong></span>postgres TIMESTAMP renders correctly<a class="changeset-link reference internal" href="#change-1f49158d705ba22bde8f415aae01e7df">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/981">#981</a></p>
1170
<li><p id="change-0.4.4-24"><span class="target" id="change-26c194222a2217765863b953678f61d7"><strong>[dialects] </strong></span>postgres PGArray is a “mutable” type by default; when used
1171
with the ORM, mutable-style equality/ copy-on-write
1172
techniques are used to test for changes.<a class="changeset-link reference internal" href="#change-26c194222a2217765863b953678f61d7">(link)</a><p></p>
1175
<li><p id="change-0.4.4-25"><span class="target" id="change-11410361d1e94b674b2dd45f62aa879c"><strong>[extensions] </strong></span>a new super-small “declarative” extension has been added,
1176
which allows Table and mapper() configuration to take
1177
place inline underneath a class declaration. This
1178
extension differs from ActiveMapper and Elixir in that it
1179
does not redefine any SQLAlchemy semantics at all; literal
1180
Column, Table and relation() constructs are used to define
1181
the class behavior and table definition.<a class="changeset-link reference internal" href="#change-11410361d1e94b674b2dd45f62aa879c">(link)</a><p></p>
1187
<div class="section" id="change-0.4.3">
1188
<h2>0.4.3<a class="headerlink" href="#change-0.4.3" title="Permalink to this headline">¶</a></h2>
1189
Released: Thu Feb 14 2008<div class="section" id="change-0.4.3-general">
1190
<h3>general<a class="headerlink" href="#change-0.4.3-general" title="Permalink to this headline">¶</a></h3>
1192
<li><p id="change-0.4.3-0"><span class="target" id="change-6edf54fb64a6efb12a4b41bf8fca7e85"><strong>[general] </strong></span>Fixed a variety of hidden and some not-so-hidden
1193
compatibility issues for Python 2.3, thanks to new support
1194
for running the full test suite on 2.3.<a class="changeset-link reference internal" href="#change-6edf54fb64a6efb12a4b41bf8fca7e85">(link)</a><p></p>
1197
<li><p id="change-0.4.3-1"><span class="target" id="change-8292102deab2ae8658025f199f4dba39"><strong>[general] </strong></span>Warnings are now issued as type exceptions.SAWarning.<a class="changeset-link reference internal" href="#change-8292102deab2ae8658025f199f4dba39">(link)</a><p></p>
1202
<div class="section" id="change-0.4.3-orm">
1203
<h3>orm<a class="headerlink" href="#change-0.4.3-orm" title="Permalink to this headline">¶</a></h3>
1205
<li><p id="change-0.4.3-2"><span class="target" id="change-ed63aadc46e831e27192365c26bcbd40"><strong>[orm] </strong></span>Every Session.begin() must now be accompanied by a
1206
corresponding commit() or rollback() unless the session is
1207
closed with Session.close(). This also includes the begin()
1208
which is implicit to a session created with
1209
transactional=True. The biggest change introduced here is
1210
that when a Session created with transactional=True raises
1211
an exception during flush(), you must call
1212
Session.rollback() or Session.close() in order for that
1213
Session to continue after an exception.<a class="changeset-link reference internal" href="#change-ed63aadc46e831e27192365c26bcbd40">(link)</a><p></p>
1216
<li><p id="change-0.4.3-3"><span class="target" id="change-4066869a71ee4e92e757eed30c24fcd6"><strong>[orm] </strong></span>Fixed merge() collection-doubling bug when merging transient
1217
entities with backref’ed collections.<a class="changeset-link reference internal" href="#change-4066869a71ee4e92e757eed30c24fcd6">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/961">#961</a></p>
1220
<li><p id="change-0.4.3-4"><span class="target" id="change-f30c07f4ca0f0cba96e2f3cb6182473e"><strong>[orm] </strong></span>merge(dont_load=True) does not accept transient entities,
1221
this is in continuation with the fact that
1222
merge(dont_load=True) does not accept any “dirty” objects
1223
either.<a class="changeset-link reference internal" href="#change-f30c07f4ca0f0cba96e2f3cb6182473e">(link)</a><p></p>
1226
<li><p id="change-0.4.3-5"><span class="target" id="change-12a5e6022a8effac005d99575c5c415b"><strong>[orm] </strong></span>Added standalone “query” class attribute generated by a
1227
scoped_session. This provides MyClass.query without using
1228
Session.mapper. Use via:<blockquote>
1229
<div>MyClass.query = Session.query_property()</div></blockquote>
1230
<a class="changeset-link reference internal" href="#change-12a5e6022a8effac005d99575c5c415b">(link)</a><p></p>
1233
<li><p id="change-0.4.3-6"><span class="target" id="change-73db7d20e8dbfeedb6ba0b6cc4788aea"><strong>[orm] </strong></span>The proper error message is raised when trying to access
1234
expired instance attributes with no session present<a class="changeset-link reference internal" href="#change-73db7d20e8dbfeedb6ba0b6cc4788aea">(link)</a><p></p>
1237
<li><p id="change-0.4.3-7"><span class="target" id="change-549192f88e74438d43000f482dc4a551"><strong>[orm] </strong></span>dynamic_loader() / lazy=”dynamic” now accepts and uses
1238
the order_by parameter in the same way in which it works
1239
with relation().<a class="changeset-link reference internal" href="#change-549192f88e74438d43000f482dc4a551">(link)</a><p></p>
1242
<li><p id="change-0.4.3-8"><span class="target" id="change-ff6e9ef1dbfd714585ff152dd416a7d6"><strong>[orm] </strong></span>Added expire_all() method to Session. Calls expire() for
1243
all persistent instances. This is handy in conjunction
1244
with...<a class="changeset-link reference internal" href="#change-ff6e9ef1dbfd714585ff152dd416a7d6">(link)</a><p></p>
1247
<li><p id="change-0.4.3-9"><span class="target" id="change-42759467a8bd5b23f099a069100e4e3a"><strong>[orm] </strong></span>Instances which have been partially or fully expired will
1248
have their expired attributes populated during a regular
1249
Query operation which affects those objects, preventing a
1250
needless second SQL statement for each instance.<a class="changeset-link reference internal" href="#change-42759467a8bd5b23f099a069100e4e3a">(link)</a><p></p>
1253
<li><p id="change-0.4.3-10"><span class="target" id="change-b8b6e98149bfd5318ccf249d510a02ee"><strong>[orm] </strong></span>Dynamic relations, when referenced, create a strong
1254
reference to the parent object so that the query still has a
1255
parent to call against even if the parent is only created
1256
(and otherwise dereferenced) within the scope of a single
1257
expression.<a class="changeset-link reference internal" href="#change-b8b6e98149bfd5318ccf249d510a02ee">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/938">#938</a></p>
1260
<li><p id="change-0.4.3-11"><span class="target" id="change-45880f45e498cf7f425d5f004b1ec762"><strong>[orm] </strong></span>Added a mapper() flag “eager_defaults”. When set to True,
1261
defaults that are generated during an INSERT or UPDATE
1262
operation are post-fetched immediately, instead of being
1263
deferred until later. This mimics the old 0.3 behavior.<a class="changeset-link reference internal" href="#change-45880f45e498cf7f425d5f004b1ec762">(link)</a><p></p>
1266
<li><p id="change-0.4.3-12"><span class="target" id="change-3891a133d4bd12b14d6068cb8f605156"><strong>[orm] </strong></span>query.join() can now accept class-mapped attributes as
1267
arguments. These can be used in place or in any combination
1268
with strings. In particular this allows construction of
1269
joins to subclasses on a polymorphic relation, i.e.:<blockquote>
1270
<div>query(Company).join([‘employees’, Engineer.name])</div></blockquote>
1271
<a class="changeset-link reference internal" href="#change-3891a133d4bd12b14d6068cb8f605156">(link)</a><p></p>
1274
<li><p id="change-0.4.3-13"><span class="target" id="change-42b75449eedabd47e5cb497bfbb59051"><strong>[orm] [people.join(engineer))] [(‘employees’] [Engineer.name] </strong></span>query.join() can also accept tuples of attribute name/some
1275
selectable as arguments. This allows construction of joins
1276
<em>from</em> subclasses of a polymorphic relation, i.e.:<blockquote>
1277
<div>query(Company).join(<p>)</p>
1279
<a class="changeset-link reference internal" href="#change-42b75449eedabd47e5cb497bfbb59051">(link)</a><p></p>
1282
<li><p id="change-0.4.3-14"><span class="target" id="change-899c6f1ca175ba0b8f026dc0aa41d68b"><strong>[orm] </strong></span>General improvements to the behavior of join() in
1283
conjunction with polymorphic mappers, i.e. joining from/to
1284
polymorphic mappers and properly applying aliases.<a class="changeset-link reference internal" href="#change-899c6f1ca175ba0b8f026dc0aa41d68b">(link)</a><p></p>
1287
<li><p id="change-0.4.3-15"><span class="target" id="change-4701dbe6a7375d90fa6b81601106e759"><strong>[orm] </strong></span>Fixed/improved behavior when a mapper determines the natural
1288
“primary key” of a mapped join, it will more effectively
1289
reduce columns which are equivalent via foreign key
1290
relation. This affects how many arguments need to be sent
1291
to query.get(), among other things.<a class="changeset-link reference internal" href="#change-4701dbe6a7375d90fa6b81601106e759">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/933">#933</a></p>
1294
<li><p id="change-0.4.3-16"><span class="target" id="change-d7ca86341f6b875bc802fc522eda643c"><strong>[orm] </strong></span>The lazy loader can now handle a join condition where the
1295
“bound” column (i.e. the one that gets the parent id sent as
1296
a bind parameter) appears more than once in the join
1297
condition. Specifically this allows the common task of a
1298
relation() which contains a parent-correlated subquery, such
1299
as “select only the most recent child item”.<a class="changeset-link reference internal" href="#change-d7ca86341f6b875bc802fc522eda643c">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/946">#946</a></p>
1302
<li><p id="change-0.4.3-17"><span class="target" id="change-7ebcbb5cac084dd34f876f1e979346d5"><strong>[orm] </strong></span>Fixed bug in polymorphic inheritance where an incorrect
1303
exception is raised when base polymorphic_on column does not
1304
correspond to any columns within the local selectable of an
1305
inheriting mapper more than one level deep<a class="changeset-link reference internal" href="#change-7ebcbb5cac084dd34f876f1e979346d5">(link)</a><p></p>
1308
<li><p id="change-0.4.3-18"><span class="target" id="change-52902ccac0e5570582c25b376fecb10b"><strong>[orm] </strong></span>Fixed bug in polymorphic inheritance which made it difficult
1309
to set a working “order_by” on a polymorphic mapper.<a class="changeset-link reference internal" href="#change-52902ccac0e5570582c25b376fecb10b">(link)</a><p></p>
1312
<li><p id="change-0.4.3-19"><span class="target" id="change-2202798af2faf2de027d6e9cb53425b2"><strong>[orm] </strong></span>Fixed a rather expensive call in Query that was slowing down
1313
polymorphic queries.<a class="changeset-link reference internal" href="#change-2202798af2faf2de027d6e9cb53425b2">(link)</a><p></p>
1316
<li><p id="change-0.4.3-20"><span class="target" id="change-1174dcf99d9e604b10ae1b362749fc8d"><strong>[orm] </strong></span>“Passive defaults” and other “inline” defaults can now be
1317
loaded during a flush() call if needed; in particular, this
1318
allows constructing relations() where a foreign key column
1319
references a server-side-generated, non-primary-key
1320
column.<a class="changeset-link reference internal" href="#change-1174dcf99d9e604b10ae1b362749fc8d">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/954">#954</a></p>
1323
<li><p id="change-0.4.3-21"><span class="target" id="change-33a848efb3c77483bf094e0593a0f304"><strong>[orm] </strong></span><dl class="docutils">
1324
<dt>Additional Session transaction fixes/changes:</dt>
1325
<dd><ul class="first last">
1326
<li>Fixed bug with session transaction management: parent
1327
transactions weren’t started on the connection when
1328
adding a connection to a nested transaction.</li>
1329
<li>session.transaction now always refers to the innermost
1330
active transaction, even when commit/rollback are called
1331
directly on the session transaction object.</li>
1332
<li>Two-phase transactions can now be prepared.</li>
1333
<li>When preparing a two-phase transaction fails on one
1334
connection, all the connections are rolled back.</li>
1335
<li>session.close() didn’t close all transactions when
1336
nested transactions were used.</li>
1337
<li>rollback() previously erroneously set the current
1338
transaction directly to the parent of the transaction
1339
that could be rolled back to. Now it rolls back the next
1340
transaction up that can handle it, but sets the current
1341
transaction to it’s parent and inactivates the
1342
transactions in between. Inactive transactions can only
1343
be rolled back or closed, any other call results in an
1345
<li>autoflush for commit() wasn’t flushing for simple
1346
subtransactions.</li>
1347
<li>unitofwork flush didn’t close the failed transaction
1348
when the session was not in a transaction and commiting
1349
the transaction failed.</li>
1353
<a class="changeset-link reference internal" href="#change-33a848efb3c77483bf094e0593a0f304">(link)</a><p></p>
1356
<li><p id="change-0.4.3-22"><span class="target" id="change-156ce1b0bbba6a383724228e99b59141"><strong>[orm] </strong></span>Miscellaneous tickets:<a class="changeset-link reference internal" href="#change-156ce1b0bbba6a383724228e99b59141">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/964">#964</a>, <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/940">#940</a></p>
1361
<div class="section" id="change-0.4.3-sql">
1362
<h3>sql<a class="headerlink" href="#change-0.4.3-sql" title="Permalink to this headline">¶</a></h3>
1364
<li><p id="change-0.4.3-23"><span class="target" id="change-6dc387bc33169ccc70dccd8218f63eb6"><strong>[sql] </strong></span>Added “schema.DDL”, an executable free-form DDL statement.
1365
DDLs can be executed in isolation or attached to Table or
1366
MetaData instances and executed automatically when those
1367
objects are created and/or dropped.<a class="changeset-link reference internal" href="#change-6dc387bc33169ccc70dccd8218f63eb6">(link)</a><p></p>
1370
<li><p id="change-0.4.3-24"><span class="target" id="change-7a15201e78fb2f315a974ea2f2fdf57e"><strong>[sql] </strong></span>Table columns and constraints can be overridden on a an
1371
existing table (such as a table that was already reflected)
1372
using the ‘useexisting=True’ flag, which now takes into
1373
account the arguments passed along with it.<a class="changeset-link reference internal" href="#change-7a15201e78fb2f315a974ea2f2fdf57e">(link)</a><p></p>
1376
<li><p id="change-0.4.3-25"><span class="target" id="change-9901077c4d7b859ebcf02d4e4c960588"><strong>[sql] </strong></span>Added a callable-based DDL events interface, adds hooks
1377
before and after Tables and MetaData create and drop.<a class="changeset-link reference internal" href="#change-9901077c4d7b859ebcf02d4e4c960588">(link)</a><p></p>
1380
<li><p id="change-0.4.3-26"><span class="target" id="change-55f9b7d9b3f544d05ee33d474e48e718"><strong>[sql] </strong></span>Added generative where(<criterion>) method to delete() and
1381
update() constructs which return a new object with criterion
1382
joined to existing criterion via AND, just like
1383
select().where().<a class="changeset-link reference internal" href="#change-55f9b7d9b3f544d05ee33d474e48e718">(link)</a><p></p>
1386
<li><p id="change-0.4.3-27"><span class="target" id="change-cda5a8913a71356022156500329b8ea2"><strong>[sql] </strong></span>Added “ilike()” operator to column operations. Compiles to
1387
ILIKE on postgres, lower(x) LIKE lower(y) on all
1388
others.<a class="changeset-link reference internal" href="#change-cda5a8913a71356022156500329b8ea2">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/727">#727</a></p>
1391
<li><p id="change-0.4.3-28"><span class="target" id="change-f9d50ae6c3ab814c61e765a4597db4a7"><strong>[sql] </strong></span>Added “now()” as a generic function; on SQLite, Oracle
1392
and MSSQL compiles as “CURRENT_TIMESTAMP”; “now()” on
1393
all others.<a class="changeset-link reference internal" href="#change-f9d50ae6c3ab814c61e765a4597db4a7">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/943">#943</a></p>
1396
<li><p id="change-0.4.3-29"><span class="target" id="change-dc43f597e2f6c04ee681a57b1cdcab9f"><strong>[sql] </strong></span>The startswith(), endswith(), and contains() operators now
1397
concatenate the wildcard operator with the given operand in
1398
SQL, i.e. “’%’ || <bindparam>” in all cases, accept
1399
text(‘something’) operands properly<a class="changeset-link reference internal" href="#change-dc43f597e2f6c04ee681a57b1cdcab9f">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/962">#962</a></p>
1402
<li><p id="change-0.4.3-30"><span class="target" id="change-6e11a1c8b10e4f234d4523225bd257ef"><strong>[sql] </strong></span>cast() accepts text(‘something’) and other non-literal
1403
operands properly<a class="changeset-link reference internal" href="#change-6e11a1c8b10e4f234d4523225bd257ef">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/962">#962</a></p>
1406
<li><p id="change-0.4.3-31"><span class="target" id="change-058b2c299ce6bcfa574f984a4c4a6e71"><strong>[sql] </strong></span>fixed bug in result proxy where anonymously generated
1407
column labels would not be accessible using their straight
1408
string name<a class="changeset-link reference internal" href="#change-058b2c299ce6bcfa574f984a4c4a6e71">(link)</a><p></p>
1411
<li><p id="change-0.4.3-32"><span class="target" id="change-3115dcb8cdb282b57a31d91ec76e5e43"><strong>[sql] </strong></span>Deferrable constraints can now be defined.<a class="changeset-link reference internal" href="#change-3115dcb8cdb282b57a31d91ec76e5e43">(link)</a><p></p>
1414
<li><p id="change-0.4.3-33"><span class="target" id="change-0fdb4ae6ed3cdbc2764f585352789ad5"><strong>[sql] </strong></span>Added “autocommit=True” keyword argument to select() and
1415
text(), as well as generative autocommit() method on
1416
select(); for statements which modify the database through
1417
some user-defined means other than the usual INSERT/UPDATE/
1418
DELETE etc. This flag will enable “autocommit” behavior
1419
during execution if no transaction is in progress.<a class="changeset-link reference internal" href="#change-0fdb4ae6ed3cdbc2764f585352789ad5">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/915">#915</a></p>
1422
<li><p id="change-0.4.3-34"><span class="target" id="change-8ab38a99c33031ed1be3e3d2f2018ad6"><strong>[sql] </strong></span>The ‘.c.’ attribute on a selectable now gets an entry for
1423
every column expression in its columns clause. Previously,
1424
“unnamed” columns like functions and CASE statements weren’t
1425
getting put there. Now they will, using their full string
1426
representation if no ‘name’ is available.<a class="changeset-link reference internal" href="#change-8ab38a99c33031ed1be3e3d2f2018ad6">(link)</a><p></p>
1429
<li><p id="change-0.4.3-35"><span class="target" id="change-dee2d53230f0bb2006399dd3a1acc69b"><strong>[sql] </strong></span>a CompositeSelect, i.e. any union(), union_all(),
1430
intersect(), etc. now asserts that each selectable contains
1431
the same number of columns. This conforms to the
1432
corresponding SQL requirement.<a class="changeset-link reference internal" href="#change-dee2d53230f0bb2006399dd3a1acc69b">(link)</a><p></p>
1435
<li><p id="change-0.4.3-36"><span class="target" id="change-9aaabc97770589be11258354e4103c20"><strong>[sql] </strong></span>The anonymous ‘label’ generated for otherwise unlabeled
1436
functions and expressions now propagates outwards at compile
1437
time for expressions like select([select([func.foo()])]).<a class="changeset-link reference internal" href="#change-9aaabc97770589be11258354e4103c20">(link)</a><p></p>
1440
<li><p id="change-0.4.3-37"><span class="target" id="change-e38291a9bb6875caafe6ff4eb62837d6"><strong>[sql] </strong></span>Building on the above ideas, CompositeSelects now build up
1441
their ”.c.” collection based on the names present in the
1442
first selectable only; corresponding_column() now works
1443
fully for all embedded selectables.<a class="changeset-link reference internal" href="#change-e38291a9bb6875caafe6ff4eb62837d6">(link)</a><p></p>
1446
<li><p id="change-0.4.3-38"><span class="target" id="change-effacbc8cacf7eccb6b38ba3cbbae70c"><strong>[sql] </strong></span>Oracle and others properly encode SQL used for defaults like
1447
sequences, etc., even if no unicode idents are used since
1448
identifier preparer may return a cached unicode identifier.<a class="changeset-link reference internal" href="#change-effacbc8cacf7eccb6b38ba3cbbae70c">(link)</a><p></p>
1451
<li><p id="change-0.4.3-39"><span class="target" id="change-1d04331648e18d01c0c95d1e615df08e"><strong>[sql] </strong></span>Column and clause comparisons to datetime objects on the
1452
left hand side of the expression now work (d < table.c.col).
1453
(datetimes on the RHS have always worked, the LHS exception
1454
is a quirk of the datetime implementation.)<a class="changeset-link reference internal" href="#change-1d04331648e18d01c0c95d1e615df08e">(link)</a><p></p>
1459
<div class="section" id="change-0.4.3-misc">
1460
<h3>misc<a class="headerlink" href="#change-0.4.3-misc" title="Permalink to this headline">¶</a></h3>
1462
<li><p id="change-0.4.3-40"><span class="target" id="change-f63c306a189efd4f901b963ab28adb1f"><strong>[dialects] </strong></span>Better support for schemas in SQLite (linked in by ATTACH
1463
DATABASE ... AS name). In some cases in the past, schema
1464
names were ommitted from generated SQL for SQLite. This is
1465
no longer the case.<a class="changeset-link reference internal" href="#change-f63c306a189efd4f901b963ab28adb1f">(link)</a><p></p>
1468
<li><p id="change-0.4.3-41"><span class="target" id="change-9dee0f004a0cf1c0917dc6380650d13a"><strong>[dialects] </strong></span>table_names on SQLite now picks up temporary tables as well.<a class="changeset-link reference internal" href="#change-9dee0f004a0cf1c0917dc6380650d13a">(link)</a><p></p>
1471
<li><p id="change-0.4.3-42"><span class="target" id="change-60a5b994550ff76a748f3c1c1876328e"><strong>[dialects] </strong></span>Auto-detect an unspecified MySQL ANSI_QUOTES mode during
1472
reflection operations, support for changing the mode
1473
midstream. Manual mode setting is still required if no
1474
reflection is used.<a class="changeset-link reference internal" href="#change-60a5b994550ff76a748f3c1c1876328e">(link)</a><p></p>
1477
<li><p id="change-0.4.3-43"><span class="target" id="change-d2deeecdb1769a651e3418d54d79a6f7"><strong>[dialects] </strong></span>Fixed reflection of TIME columns on SQLite.<a class="changeset-link reference internal" href="#change-d2deeecdb1769a651e3418d54d79a6f7">(link)</a><p></p>
1480
<li><p id="change-0.4.3-44"><span class="target" id="change-df90bbae9a24a548712386fea17c51d7"><strong>[dialects] </strong></span>Finally added PGMacAddr type to postgres<a class="changeset-link reference internal" href="#change-df90bbae9a24a548712386fea17c51d7">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/580">#580</a></p>
1483
<li><p id="change-0.4.3-45"><span class="target" id="change-aa4961efc15ee34be7bcbce396b294c8"><strong>[dialects] </strong></span>Reflect the sequence associated to a PK field (typically
1484
with a BEFORE INSERT trigger) under Firebird<a class="changeset-link reference internal" href="#change-aa4961efc15ee34be7bcbce396b294c8">(link)</a><p></p>
1487
<li><p id="change-0.4.3-46"><span class="target" id="change-b06276ebd78dee4b8b236cfc9f6ea19e"><strong>[dialects] </strong></span>Oracle assembles the correct columns in the result set
1488
column mapping when generating a LIMIT/OFFSET subquery,
1489
allows columns to map properly to result sets even if
1490
long-name truncation kicks in<a class="changeset-link reference internal" href="#change-b06276ebd78dee4b8b236cfc9f6ea19e">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/941">#941</a></p>
1493
<li><p id="change-0.4.3-47"><span class="target" id="change-34c2a03d48cdd10e0016278bc5941d22"><strong>[dialects] </strong></span>MSSQL now includes EXEC in the _is_select regexp, which
1494
should allow row-returning stored procedures to be used.<a class="changeset-link reference internal" href="#change-34c2a03d48cdd10e0016278bc5941d22">(link)</a><p></p>
1497
<li><p id="change-0.4.3-48"><span class="target" id="change-1fc2c8bc3c3438aaf84a962c2176c65b"><strong>[dialects] </strong></span>MSSQL now includes an experimental implementation of
1498
LIMIT/OFFSET using the ANSI SQL row_number() function, so it
1499
requires MSSQL-2005 or higher. To enable the feature, add
1500
“has_window_funcs” to the keyword arguments for connect, or
1501
add ”?has_window_funcs=1” to your dburi query arguments.<a class="changeset-link reference internal" href="#change-1fc2c8bc3c3438aaf84a962c2176c65b">(link)</a><p></p>
1504
<li><p id="change-0.4.3-49"><span class="target" id="change-937a4731635f0eb9fc1445d0e3061924"><strong>[ext] </strong></span>Changed ext.activemapper to use a non-transactional session
1505
for the objectstore.<a class="changeset-link reference internal" href="#change-937a4731635f0eb9fc1445d0e3061924">(link)</a><p></p>
1508
<li><p id="change-0.4.3-50"><span class="target" id="change-9adb592707c367ff5863e266ed996077"><strong>[ext] </strong></span>Fixed output order of “[‘a’] + obj.proxied” binary operation
1509
on association-proxied lists.<a class="changeset-link reference internal" href="#change-9adb592707c367ff5863e266ed996077">(link)</a><p></p>
1515
<div class="section" id="change-0.4.2p3">
1516
<h2>0.4.2p3<a class="headerlink" href="#change-0.4.2p3" title="Permalink to this headline">¶</a></h2>
1517
Released: Wed Jan 09 2008<div class="section" id="change-0.4.2p3-general">
1518
<h3>general<a class="headerlink" href="#change-0.4.2p3-general" title="Permalink to this headline">¶</a></h3>
1520
<li><p id="change-0.4.2p3-0"><span class="target" id="change-65d413b7ad515c5729bde99fb2e96731"><strong>[general] </strong></span>sub version numbering scheme changed to suite
1521
setuptools version number rules; easy_install -u
1522
should now get this version over 0.4.2.<a class="changeset-link reference internal" href="#change-65d413b7ad515c5729bde99fb2e96731">(link)</a><p></p>
1527
<div class="section" id="change-0.4.2p3-orm">
1528
<h3>orm<a class="headerlink" href="#change-0.4.2p3-orm" title="Permalink to this headline">¶</a></h3>
1530
<li><p id="change-0.4.2p3-1"><span class="target" id="change-da292c6c47e2281b50fe3872d622ec66"><strong>[orm] </strong></span>fixed bug with session.dirty when using “mutable
1531
scalars” (such as PickleTypes)<a class="changeset-link reference internal" href="#change-da292c6c47e2281b50fe3872d622ec66">(link)</a><p></p>
1534
<li><p id="change-0.4.2p3-2"><span class="target" id="change-e84ebdc378fd322dd6276c9b7906ed92"><strong>[orm] </strong></span>added a more descriptive error message when flushing
1535
on a relation() that has non-locally-mapped columns
1536
in its primary or secondary join condition<a class="changeset-link reference internal" href="#change-e84ebdc378fd322dd6276c9b7906ed92">(link)</a><p></p>
1539
<li><p id="change-0.4.2p3-3"><span class="target" id="change-d24181f3ffcf556b44aa903e5a74b37e"><strong>[orm] </strong></span>suppressing <em>all</em> errors in
1540
InstanceState.__cleanup() now.<a class="changeset-link reference internal" href="#change-d24181f3ffcf556b44aa903e5a74b37e">(link)</a><p></p>
1543
<li><p id="change-0.4.2p3-4"><span class="target" id="change-d2a931ab43317f5fcf9c6bdb7f4f4a39"><strong>[orm] </strong></span>fixed an attribute history bug whereby assigning a
1544
new collection to a collection-based attribute which
1545
already had pending changes would generate incorrect
1546
history<a class="changeset-link reference internal" href="#change-d2a931ab43317f5fcf9c6bdb7f4f4a39">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/922">#922</a></p>
1549
<li><p id="change-0.4.2p3-5"><span class="target" id="change-d81770ec7c97121d21e6eb326d9bb5da"><strong>[orm] </strong></span>fixed delete-orphan cascade bug whereby setting the
1550
same object twice to a scalar attribute could log it
1551
as an orphan<a class="changeset-link reference internal" href="#change-d81770ec7c97121d21e6eb326d9bb5da">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/925">#925</a></p>
1554
<li><p id="change-0.4.2p3-6"><span class="target" id="change-13a128b105a34070dcf5a5147913fa10"><strong>[orm] </strong></span>Fixed cascades on a += assignment to a list-based
1555
relation.<a class="changeset-link reference internal" href="#change-13a128b105a34070dcf5a5147913fa10">(link)</a><p></p>
1558
<li><p id="change-0.4.2p3-7"><span class="target" id="change-331b7392042497e067064bc0ea7a7a43"><strong>[orm] </strong></span>synonyms can now be created against props that don’t
1559
exist yet, which are later added via add_property().
1560
This commonly includes backrefs. (i.e. you can make
1561
synonyms for backrefs without worrying about the
1562
order of operations)<a class="changeset-link reference internal" href="#change-331b7392042497e067064bc0ea7a7a43">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/919">#919</a></p>
1565
<li><p id="change-0.4.2p3-8"><span class="target" id="change-72cde5697e7ad6e3b60d641e29048733"><strong>[orm] </strong></span>fixed bug which could occur with polymorphic “union”
1566
mapper which falls back to “deferred” loading of
1567
inheriting tables<a class="changeset-link reference internal" href="#change-72cde5697e7ad6e3b60d641e29048733">(link)</a><p></p>
1570
<li><p id="change-0.4.2p3-9"><span class="target" id="change-fed49544228d810c496b9938b4c43c75"><strong>[orm] </strong></span>the “columns” collection on a mapper/mapped class
1571
(i.e. ‘c’) is against the mapped table, not the
1572
select_table in the case of polymorphic “union”
1573
loading (this shouldn’t be noticeable).<a class="changeset-link reference internal" href="#change-fed49544228d810c496b9938b4c43c75">(link)</a><p></p>
1576
<li><p id="change-0.4.2p3-10"><span class="target" id="change-3ca851d8498ea2458bba602dee5ad8dd"><strong>[orm] </strong></span>fixed fairly critical bug whereby the same instance could be listed
1577
more than once in the unitofwork.new collection; most typically
1578
reproduced when using a combination of inheriting mappers and
1579
ScopedSession.mapper, as the multiple __init__ calls per instance
1580
could save() the object with distinct _state objects<a class="changeset-link reference internal" href="#change-3ca851d8498ea2458bba602dee5ad8dd">(link)</a><p></p>
1583
<li><p id="change-0.4.2p3-11"><span class="target" id="change-b0ea0f39c7d503288cdab2a995ef5b83"><strong>[orm] </strong></span>added very rudimentary yielding iterator behavior to Query. Call
1584
query.yield_per(<number of rows>) and evaluate the Query in an
1585
iterative context; every collection of N rows will be packaged up
1586
and yielded. Use this method with extreme caution since it does
1587
not attempt to reconcile eagerly loaded collections across
1588
result batch boundaries, nor will it behave nicely if the same
1589
instance occurs in more than one batch. This means that an eagerly
1590
loaded collection will get cleared out if it’s referenced in more than
1591
one batch, and in all cases attributes will be overwritten on instances
1592
that occur in more than one batch.<a class="changeset-link reference internal" href="#change-b0ea0f39c7d503288cdab2a995ef5b83">(link)</a><p></p>
1595
<li><p id="change-0.4.2p3-12"><span class="target" id="change-779e1c774fac07bedf9baab019348183"><strong>[orm] </strong></span>Fixed in-place set mutation operators for set collections and association
1596
proxied sets.<a class="changeset-link reference internal" href="#change-779e1c774fac07bedf9baab019348183">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/920">#920</a></p>
1601
<div class="section" id="change-0.4.2p3-sql">
1602
<h3>sql<a class="headerlink" href="#change-0.4.2p3-sql" title="Permalink to this headline">¶</a></h3>
1604
<li><p id="change-0.4.2p3-13"><span class="target" id="change-6a9e11d8c0bcdb3037efda66da46f2b0"><strong>[sql] </strong></span>Text type is properly exported now and does not
1605
raise a warning on DDL create; String types with no
1606
length only raise warnings during CREATE TABLE<a class="changeset-link reference internal" href="#change-6a9e11d8c0bcdb3037efda66da46f2b0">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/912">#912</a></p>
1609
<li><p id="change-0.4.2p3-14"><span class="target" id="change-52447b5d997e550edaff1460987456ea"><strong>[sql] </strong></span>new UnicodeText type is added, to specify an
1610
encoded, unlengthed Text type<a class="changeset-link reference internal" href="#change-52447b5d997e550edaff1460987456ea">(link)</a><p></p>
1613
<li><p id="change-0.4.2p3-15"><span class="target" id="change-c6e6be84c763b537b8b61ef8374ed8fe"><strong>[sql] </strong></span>fixed bug in union() so that select() statements
1614
which don’t derive from FromClause objects can be
1615
unioned<a class="changeset-link reference internal" href="#change-c6e6be84c763b537b8b61ef8374ed8fe">(link)</a><p></p>
1618
<li><p id="change-0.4.2p3-16"><span class="target" id="change-b4c8efafaa4b6fccec8239e9c9d14b0f"><strong>[sql] </strong></span>changed name of TEXT to Text since its a “generic”
1619
type; TEXT name is deprecated until 0.5. The
1620
“upgrading” behavior of String to Text when no
1621
length is present is also deprecated until 0.5; will
1622
issue a warning when used for CREATE TABLE
1623
statements (String with no length for SQL expression
1624
purposes is still fine)<a class="changeset-link reference internal" href="#change-b4c8efafaa4b6fccec8239e9c9d14b0f">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/912">#912</a></p>
1627
<li><p id="change-0.4.2p3-17"><span class="target" id="change-11b279a02c641038e4cf01bcf7a3de4c"><strong>[sql] </strong></span>generative select.order_by(None) / group_by(None)
1628
was not managing to reset order by/group by
1629
criterion, fixed<a class="changeset-link reference internal" href="#change-11b279a02c641038e4cf01bcf7a3de4c">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/924">#924</a></p>
1634
<div class="section" id="change-0.4.2p3-misc">
1635
<h3>misc<a class="headerlink" href="#change-0.4.2p3-misc" title="Permalink to this headline">¶</a></h3>
1637
<li><p id="change-0.4.2p3-18"><span class="target" id="change-266d2296f2e6b99bc2514a5fd438deae"><strong>[dialects] </strong></span>Fixed reflection of mysql empty string column
1638
defaults.<a class="changeset-link reference internal" href="#change-266d2296f2e6b99bc2514a5fd438deae">(link)</a><p></p>
1641
<li><p id="change-0.4.2p3-19"><span class="target" id="change-2b9880fefdc9457fbd869f68062a0344"><strong>[ext] </strong></span>‘+’, ‘*’, ‘+=’ and ‘<a href="#id9"><span class="problematic" id="id10">*</span></a>=’ support for association
1642
proxied lists.<a class="changeset-link reference internal" href="#change-2b9880fefdc9457fbd869f68062a0344">(link)</a><p></p>
1645
<li><p id="change-0.4.2p3-20"><span class="target" id="change-88e678f937cdc36ead073631a00ca08b"><strong>[dialects] </strong></span>mssql - narrowed down the test for “date”/”datetime”
1646
in MSDate/ MSDateTime subclasses so that incoming
1647
“datetime” objects don’t get mis-interpreted as
1648
“date” objects and vice versa.<a class="changeset-link reference internal" href="#change-88e678f937cdc36ead073631a00ca08b">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/923">#923</a></p>
1651
<li><p id="change-0.4.2p3-21"><span class="target" id="change-3ed94dc039b8b2b50313d99519db04d5"><strong>[dialects] </strong></span>Fixed the missing call to subtype result processor for the PGArray
1652
type.<a class="changeset-link reference internal" href="#change-3ed94dc039b8b2b50313d99519db04d5">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/913">#913</a></p>
1658
<div class="section" id="change-0.4.2">
1659
<h2>0.4.2<a class="headerlink" href="#change-0.4.2" title="Permalink to this headline">¶</a></h2>
1660
Released: Wed Jan 02 2008<div class="section" id="change-0.4.2-orm">
1661
<h3>orm<a class="headerlink" href="#change-0.4.2-orm" title="Permalink to this headline">¶</a></h3>
1663
<li><p id="change-0.4.2-0"><span class="target" id="change-63f5538d57cbeccd4405271fb765620d"><strong>[orm] </strong></span>a major behavioral change to collection-based backrefs: they no
1664
longer trigger lazy loads ! “reverse” adds and removes
1665
are queued up and are merged with the collection when it is
1666
actually read from and loaded; but do not trigger a load beforehand.
1667
For users who have noticed this behavior, this should be much more
1668
convenient than using dynamic relations in some cases; for those who
1669
have not, you might notice your apps using a lot fewer queries than
1670
before in some situations.<a class="changeset-link reference internal" href="#change-63f5538d57cbeccd4405271fb765620d">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/871">#871</a></p>
1673
<li><p id="change-0.4.2-1"><span class="target" id="change-217b4c5e361c5fb21dea6f5061d41edc"><strong>[orm] </strong></span>mutable primary key support is added. primary key columns can be
1674
changed freely, and the identity of the instance will change upon
1675
flush. In addition, update cascades of foreign key referents (primary
1676
key or not) along relations are supported, either in tandem with the
1677
database’s ON UPDATE CASCADE (required for DB’s like Postgres) or
1678
issued directly by the ORM in the form of UPDATE statements, by setting
1679
the flag “passive_cascades=False”.<a class="changeset-link reference internal" href="#change-217b4c5e361c5fb21dea6f5061d41edc">(link)</a><p></p>
1682
<li><p id="change-0.4.2-2"><span class="target" id="change-e8ea4a2d69bd572ec6dfb581a1a81bc8"><strong>[orm] </strong></span>inheriting mappers now inherit the MapperExtensions of their parent
1683
mapper directly, so that all methods for a particular MapperExtension
1684
are called for subclasses as well. As always, any MapperExtension
1685
can return either EXT_CONTINUE to continue extension processing
1686
or EXT_STOP to stop processing. The order of mapper resolution is:
1687
<extensions declared on the classes mapper> <extensions declared on the
1688
classes’ parent mapper> <globally declared extensions>.<p>Note that if you instantiate the same extension class separately
1689
and then apply it individually for two mappers in the same inheritance
1690
chain, the extension will be applied twice to the inheriting class,
1691
and each method will be called twice.</p>
1692
<p>To apply a mapper extension explicitly to each inheriting class but
1693
have each method called only once per operation, use the same
1694
instance of the extension for both mappers.</p>
1695
<a class="changeset-link reference internal" href="#change-e8ea4a2d69bd572ec6dfb581a1a81bc8">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/490">#490</a></p>
1698
<li><p id="change-0.4.2-3"><span class="target" id="change-32b5c8ae4f1ba4eae88b6d041b12a29d"><strong>[orm] </strong></span>MapperExtension.before_update() and after_update() are now called
1699
symmetrically; previously, an instance that had no modified column
1700
attributes (but had a relation() modification) could be called with
1701
before_update() but not after_update()<a class="changeset-link reference internal" href="#change-32b5c8ae4f1ba4eae88b6d041b12a29d">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/907">#907</a></p>
1704
<li><p id="change-0.4.2-4"><span class="target" id="change-27b98340e4e7bca99aa258a02c0b8f4c"><strong>[orm] </strong></span>columns which are missing from a Query’s select statement
1705
now get automatically deferred during load.<a class="changeset-link reference internal" href="#change-27b98340e4e7bca99aa258a02c0b8f4c">(link)</a><p></p>
1708
<li><p id="change-0.4.2-5"><span class="target" id="change-63184f50e7524cf31995dceb7eba804c"><strong>[orm] </strong></span>mapped classes which extend “object” and do not provide an
1709
__init__() method will now raise TypeError if non-empty <a href="#id13"><span class="problematic" id="id14">*</span></a>args
1710
or <a href="#id15"><span class="problematic" id="id16">**</span></a>kwargs are present at instance construction time (and are
1711
not consumed by any extensions such as the scoped_session mapper),
1712
consistent with the behavior of normal Python classes<a class="changeset-link reference internal" href="#change-63184f50e7524cf31995dceb7eba804c">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/908">#908</a></p>
1715
<li><p id="change-0.4.2-6"><span class="target" id="change-e0d48778c2223c5f35f8ee0a6f6241f4"><strong>[orm] </strong></span>fixed Query bug when filter_by() compares a relation against None<a class="changeset-link reference internal" href="#change-e0d48778c2223c5f35f8ee0a6f6241f4">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/899">#899</a></p>
1718
<li><p id="change-0.4.2-7"><span class="target" id="change-4790b003fa9887f231b4dab765719240"><strong>[orm] </strong></span>improved support for pickling of mapped entities. Per-instance
1719
lazy/deferred/expired callables are now serializable so that
1720
they serialize and deserialize with _state.<a class="changeset-link reference internal" href="#change-4790b003fa9887f231b4dab765719240">(link)</a><p></p>
1723
<li><p id="change-0.4.2-8"><span class="target" id="change-9d03199c53171e51a07d7087bbc50381"><strong>[orm] </strong></span>new synonym() behavior: an attribute will be placed on the mapped
1724
class, if one does not exist already, in all cases. if a property
1725
already exists on the class, the synonym will decorate the property
1726
with the appropriate comparison operators so that it can be used in
1727
column expressions just like any other mapped attribute (i.e. usable in
1728
filter(), etc.) the “proxy=True” flag is deprecated and no longer means
1729
anything. Additionally, the flag “map_column=True” will automatically
1730
generate a ColumnProperty corresponding to the name of the synonym,
1731
i.e.: ‘somename’:synonym(‘_somename’, map_column=True) will map the
1732
column named ‘somename’ to the attribute ‘_somename’. See the example
1733
in the mapper docs.<a class="changeset-link reference internal" href="#change-9d03199c53171e51a07d7087bbc50381">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/801">#801</a></p>
1736
<li><p id="change-0.4.2-9"><span class="target" id="change-784457e85ca18f636410e38e12185882"><strong>[orm] </strong></span>Query.select_from() now replaces all existing FROM criterion with
1737
the given argument; the previous behavior of constructing a list
1738
of FROM clauses was generally not useful as is required
1739
filter() calls to create join criterion, and new tables introduced
1740
within filter() already add themselves to the FROM clause. The
1741
new behavior allows not just joins from the main table, but select
1742
statements as well. Filter criterion, order bys, eager load
1743
clauses will be “aliased” against the given statement.<a class="changeset-link reference internal" href="#change-784457e85ca18f636410e38e12185882">(link)</a><p></p>
1746
<li><p id="change-0.4.2-10"><span class="target" id="change-3a785137de08700b2cd2a32fba4f0a05"><strong>[orm] </strong></span>this month’s refactoring of attribute instrumentation changes
1747
the “copy-on-load” behavior we’ve had since midway through 0.3
1748
with “copy-on-modify” in most cases. This takes a sizable chunk
1749
of latency out of load operations and overall does less work
1750
as only attributes which are actually modified get their
1751
“committed state” copied. Only “mutable scalar” attributes
1752
(i.e. a pickled object or other mutable item), the reason for
1753
the copy-on-load change in the first place, retain the old
1754
behavior.<a class="changeset-link reference internal" href="#change-3a785137de08700b2cd2a32fba4f0a05">(link)</a><p></p>
1757
<li><p id="change-0.4.2-11"><span class="target" id="change-b5fb4c5dc6e51819e3330abdfa847cd0"><strong>[orm] [attrname] </strong></span>a slight behavioral change to attributes is, del’ing an attribute
1758
does <em>not</em> cause the lazyloader of that attribute to fire off again;
1759
the “del” makes the effective value of the attribute “None”. To
1760
re-trigger the “loader” for an attribute, use
1761
session.expire(instance,).<a class="changeset-link reference internal" href="#change-b5fb4c5dc6e51819e3330abdfa847cd0">(link)</a><p></p>
1764
<li><p id="change-0.4.2-12"><span class="target" id="change-2a465341874590d5feb725a00240b735"><strong>[orm] </strong></span>query.filter(SomeClass.somechild == None), when comparing
1765
a many-to-one property to None, properly generates “id IS NULL”
1766
including that the NULL is on the right side.<a class="changeset-link reference internal" href="#change-2a465341874590d5feb725a00240b735">(link)</a><p></p>
1769
<li><p id="change-0.4.2-13"><span class="target" id="change-3e8fd64d48f2bbde6c0011dd994f32cb"><strong>[orm] </strong></span>query.order_by() takes into account aliased joins, i.e.
1770
query.join(‘orders’, aliased=True).order_by(Order.id)<a class="changeset-link reference internal" href="#change-3e8fd64d48f2bbde6c0011dd994f32cb">(link)</a><p></p>
1773
<li><p id="change-0.4.2-14"><span class="target" id="change-e0a2026f22b806fae3b51161f90eb4aa"><strong>[orm] </strong></span>eagerload(), lazyload(), eagerload_all() take an optional
1774
second class-or-mapper argument, which will select the mapper
1775
to apply the option towards. This can select among other
1776
mappers which were added using add_entity().<a class="changeset-link reference internal" href="#change-e0a2026f22b806fae3b51161f90eb4aa">(link)</a><p></p>
1779
<li><p id="change-0.4.2-15"><span class="target" id="change-330cf46efeb1b16709defe4dc85891b0"><strong>[orm] </strong></span>eagerloading will work with mappers added via add_entity().<a class="changeset-link reference internal" href="#change-330cf46efeb1b16709defe4dc85891b0">(link)</a><p></p>
1782
<li><p id="change-0.4.2-16"><span class="target" id="change-3e54b894ee7ef3856d24b7831a0b878e"><strong>[orm] </strong></span>added “cascade delete” behavior to “dynamic” relations just like
1783
that of regular relations. if passive_deletes flag (also just added)
1784
is not set, a delete of the parent item will trigger a full load of
1785
the child items so that they can be deleted or updated accordingly.<a class="changeset-link reference internal" href="#change-3e54b894ee7ef3856d24b7831a0b878e">(link)</a><p></p>
1788
<li><p id="change-0.4.2-17"><span class="target" id="change-c1b93949b70a2298405d46cc8d9e165c"><strong>[orm] </strong></span>also with dynamic, implemented correct count() behavior as well
1789
as other helper methods.<a class="changeset-link reference internal" href="#change-c1b93949b70a2298405d46cc8d9e165c">(link)</a><p></p>
1792
<li><p id="change-0.4.2-18"><span class="target" id="change-6d7297ea5825ce8f0a6afbfd061aeb45"><strong>[orm] </strong></span>fix to cascades on polymorphic relations, such that cascades
1793
from an object to a polymorphic collection continue cascading
1794
along the set of attributes specific to each element in the collection.<a class="changeset-link reference internal" href="#change-6d7297ea5825ce8f0a6afbfd061aeb45">(link)</a><p></p>
1797
<li><p id="change-0.4.2-19"><span class="target" id="change-a8ef939d2a84ff9c730c84834a7362d0"><strong>[orm] </strong></span>query.get() and query.load() do not take existing filter or other
1798
criterion into account; these methods <em>always</em> look up the given id
1799
in the database or return the current instance from the identity map,
1800
disregarding any existing filter, join, group_by or other criterion
1801
which has been configured.<a class="changeset-link reference internal" href="#change-a8ef939d2a84ff9c730c84834a7362d0">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/893">#893</a></p>
1804
<li><p id="change-0.4.2-20"><span class="target" id="change-6bde88eab909a760935eadb9a4ede0f1"><strong>[orm] </strong></span>added support for version_id_col in conjunction with inheriting mappers.
1805
version_id_col is typically set on the base mapper in an inheritance
1806
relationship where it takes effect for all inheriting mappers.<a class="changeset-link reference internal" href="#change-6bde88eab909a760935eadb9a4ede0f1">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/883">#883</a></p>
1809
<li><p id="change-0.4.2-21"><span class="target" id="change-eafb815c0a21fff7306edd70ede3f73f"><strong>[orm] </strong></span>relaxed rules on column_property() expressions having labels; any
1810
ColumnElement is accepted now, as the compiler auto-labels non-labeled
1811
ColumnElements now. a selectable, like a select() statement, still
1812
requires conversion to ColumnElement via as_scalar() or label().<a class="changeset-link reference internal" href="#change-eafb815c0a21fff7306edd70ede3f73f">(link)</a><p></p>
1815
<li><p id="change-0.4.2-22"><span class="target" id="change-0d02bce2307e213d0540d00aa850c909"><strong>[orm] </strong></span>fixed backref bug where you could not del instance.attr if attr
1816
was None<a class="changeset-link reference internal" href="#change-0d02bce2307e213d0540d00aa850c909">(link)</a><p></p>
1819
<li><p id="change-0.4.2-23"><span class="target" id="change-8a557aa11c6f764820c17470e54658ce"><strong>[orm] </strong></span>several ORM attributes have been removed or made private:
1820
mapper.get_attr_by_column(), mapper.set_attr_by_column(),
1821
mapper.pks_by_table, mapper.cascade_callable(),
1822
MapperProperty.cascade_callable(), mapper.canload(),
1823
mapper.save_obj(), mapper.delete_obj(), mapper._mapper_registry,
1824
attributes.AttributeManager<a class="changeset-link reference internal" href="#change-8a557aa11c6f764820c17470e54658ce">(link)</a><p></p>
1827
<li><p id="change-0.4.2-24"><span class="target" id="change-92cef2776421e3d2d6177bee48214fac"><strong>[orm] </strong></span>Assigning an incompatible collection type to a relation attribute now
1828
raises TypeError instead of sqlalchemy’s ArgumentError.<a class="changeset-link reference internal" href="#change-92cef2776421e3d2d6177bee48214fac">(link)</a><p></p>
1831
<li><p id="change-0.4.2-25"><span class="target" id="change-df17f2469a0bb5f1a22d42fc865f73a4"><strong>[orm] </strong></span>Bulk assignment of a MappedCollection now raises an error if a key in the
1832
incoming dictionary does not match the key that the collection’s keyfunc
1833
would use for that value.<a class="changeset-link reference internal" href="#change-df17f2469a0bb5f1a22d42fc865f73a4">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/886">#886</a></p>
1836
<li><p id="change-0.4.2-26"><span class="target" id="change-228dca0bafaa198350cfc39cb6561e8c"><strong>[orm] [newval2] [newval1] </strong></span>Custom collections can now specify a @converter method to translate
1837
objects used in “bulk” assignment into a stream of values, as in:<div class="highlight-python"><pre>obj.col =
1839
obj.dictcol = {'foo': newval1, 'bar': newval2}</pre>
1841
<p>The MappedCollection uses this hook to ensure that incoming key/value
1842
pairs are sane from the collection’s perspective.</p>
1843
<a class="changeset-link reference internal" href="#change-228dca0bafaa198350cfc39cb6561e8c">(link)</a><p></p>
1846
<li><p id="change-0.4.2-27"><span class="target" id="change-abc2dcd6fd504baa411c4ede8eda7189"><strong>[orm] </strong></span>fixed endless loop issue when using lazy=”dynamic” on both
1847
sides of a bi-directional relationship<a class="changeset-link reference internal" href="#change-abc2dcd6fd504baa411c4ede8eda7189">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/872">#872</a></p>
1850
<li><p id="change-0.4.2-28"><span class="target" id="change-5d359376de51a0ecf63071076057725e"><strong>[orm] </strong></span>more fixes to the LIMIT/OFFSET aliasing applied with Query + eagerloads,
1851
in this case when mapped against a select statement<a class="changeset-link reference internal" href="#change-5d359376de51a0ecf63071076057725e">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/904">#904</a></p>
1854
<li><p id="change-0.4.2-29"><span class="target" id="change-6705a0a328a243a3c879e94a69346ca4"><strong>[orm] </strong></span>fix to self-referential eager loading such that if the same mapped
1855
instance appears in two or more distinct sets of columns in the same
1856
result set, its eagerly loaded collection will be populated regardless
1857
of whether or not all of the rows contain a set of “eager” columns for
1858
that collection. this would also show up as a KeyError when fetching
1859
results with join_depth turned on.<a class="changeset-link reference internal" href="#change-6705a0a328a243a3c879e94a69346ca4">(link)</a><p></p>
1862
<li><p id="change-0.4.2-30"><span class="target" id="change-8ce8cb627bff40401582485251bd4caf"><strong>[orm] </strong></span>fixed bug where Query would not apply a subquery to the SQL when LIMIT
1863
was used in conjunction with an inheriting mapper where the eager
1864
loader was only in the parent mapper.<a class="changeset-link reference internal" href="#change-8ce8cb627bff40401582485251bd4caf">(link)</a><p></p>
1867
<li><p id="change-0.4.2-31"><span class="target" id="change-a583ca54c9f72d5e381ee158389cc17b"><strong>[orm] </strong></span>clarified the error message which occurs when you try to update()
1868
an instance with the same identity key as an instance already present
1869
in the session.<a class="changeset-link reference internal" href="#change-a583ca54c9f72d5e381ee158389cc17b">(link)</a><p></p>
1872
<li><p id="change-0.4.2-32"><span class="target" id="change-765a4998bb1fb50421b5910813efbcc2"><strong>[orm] </strong></span>some clarifications and fixes to merge(instance, dont_load=True).
1873
fixed bug where lazy loaders were getting disabled on returned instances.
1874
Also, we currently do not support merging an instance which has uncommitted
1875
changes on it, in the case that dont_load=True is used....this will
1876
now raise an error. This is due to complexities in merging the
1877
“committed state” of the given instance to correctly correspond to the
1878
newly copied instance, as well as other modified state.
1879
Since the use case for dont_load=True is caching, the given instances
1880
shouldn’t have any uncommitted changes on them anyway.
1881
We also copy the instances over without using any events now, so that
1882
the ‘dirty’ list on the new session remains unaffected.<a class="changeset-link reference internal" href="#change-765a4998bb1fb50421b5910813efbcc2">(link)</a><p></p>
1885
<li><p id="change-0.4.2-33"><span class="target" id="change-ea7de496771c635bee87d7670889f0ee"><strong>[orm] </strong></span>fixed bug which could arise when using session.begin_nested() in conjunction
1886
with more than one level deep of enclosing session.begin() statements<a class="changeset-link reference internal" href="#change-ea7de496771c635bee87d7670889f0ee">(link)</a><p></p>
1889
<li><p id="change-0.4.2-34"><span class="target" id="change-688cfda7b6b1b358dcef128e1f80b4bb"><strong>[orm] </strong></span>fixed session.refresh() with instance that has custom entity_name<a class="changeset-link reference internal" href="#change-688cfda7b6b1b358dcef128e1f80b4bb">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/914">#914</a></p>
1894
<div class="section" id="change-0.4.2-sql">
1895
<h3>sql<a class="headerlink" href="#change-0.4.2-sql" title="Permalink to this headline">¶</a></h3>
1897
<li><p id="change-0.4.2-35"><span class="target" id="change-f840d15646468f91261fb9f4f827c464"><strong>[sql] </strong></span>generic functions ! we introduce a database of known SQL functions, such
1898
as current_timestamp, coalesce, and create explicit function objects
1899
representing them. These objects have constrained argument lists, are
1900
type aware, and can compile in a dialect-specific fashion. So saying
1901
func.char_length(“foo”, “bar”) raises an error (too many args),
1902
func.coalesce(datetime.date(2007, 10, 5), datetime.date(2005, 10, 15))
1903
knows that its return type is a Date. We only have a few functions
1904
represented so far but will continue to add to the system<a class="changeset-link reference internal" href="#change-f840d15646468f91261fb9f4f827c464">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/615">#615</a></p>
1907
<li><p id="change-0.4.2-36"><span class="target" id="change-50091a15ff9c9366b36b0868152e0df2"><strong>[sql] </strong></span>auto-reconnect support improved; a Connection can now automatically
1908
reconnect after its underlying connection is invalidated, without
1909
needing to connect() again from the engine. This allows an ORM session
1910
bound to a single Connection to not need a reconnect.
1911
Open transactions on the Connection must be rolled back after an invalidation
1912
of the underlying connection else an error is raised. Also fixed
1913
bug where disconnect detect was not being called for cursor(), rollback(),
1914
or commit().<a class="changeset-link reference internal" href="#change-50091a15ff9c9366b36b0868152e0df2">(link)</a><p></p>
1917
<li><p id="change-0.4.2-37"><span class="target" id="change-1ffbc5d8441dc26e5cb653d24d639fe8"><strong>[sql] </strong></span>added new flag to String and create_engine(),
1918
assert_unicode=(True|False|’warn’<a href="#id11"><span class="problematic" id="id12">|</span></a>None). Defaults to <cite>False</cite> or <cite>None</cite> on
1919
create_engine() and String, <cite>‘warn’</cite> on the Unicode type. When <cite>True</cite>,
1920
results in all unicode conversion operations raising an exception when a
1921
non-unicode bytestring is passed as a bind parameter. ‘warn’ results
1922
in a warning. It is strongly advised that all unicode-aware applications
1923
make proper use of Python unicode objects (i.e. u’hello’ and not ‘hello’)
1924
so that data round trips accurately.<a class="changeset-link reference internal" href="#change-1ffbc5d8441dc26e5cb653d24d639fe8">(link)</a><p></p>
1927
<li><p id="change-0.4.2-38"><span class="target" id="change-1943253ba506b5613bb311d47f20a9de"><strong>[sql] </strong></span>generation of “unique” bind parameters has been simplified to use the same
1928
“unique identifier” mechanisms as everything else. This doesn’t affect
1929
user code, except any code that might have been hardcoded against the generated
1930
names. Generated bind params now have the form “<paramname>_<num>”,
1931
whereas before only the second bind of the same name would have this form.<a class="changeset-link reference internal" href="#change-1943253ba506b5613bb311d47f20a9de">(link)</a><p></p>
1934
<li><p id="change-0.4.2-39"><span class="target" id="change-8295165b5c3dd3ddc3c1d71843d664ad"><strong>[sql] </strong></span>select().as_scalar() will raise an exception if the select does not have
1935
exactly one expression in its columns clause.<a class="changeset-link reference internal" href="#change-8295165b5c3dd3ddc3c1d71843d664ad">(link)</a><p></p>
1938
<li><p id="change-0.4.2-40"><span class="target" id="change-6e780ec732e6e0f32ed07d926adb7257"><strong>[sql] </strong></span>bindparam() objects themselves can be used as keys for execute(), i.e.
1939
statement.execute({bind1:’foo’, bind2:’bar’})<a class="changeset-link reference internal" href="#change-6e780ec732e6e0f32ed07d926adb7257">(link)</a><p></p>
1942
<li><p id="change-0.4.2-41"><span class="target" id="change-96927335ae179f9639f2658179eca869"><strong>[sql] </strong></span>added new methods to TypeDecorator, process_bind_param() and
1943
process_result_value(), which automatically take advantage of the processing
1944
of the underlying type. Ideal for using with Unicode or Pickletype.
1945
TypeDecorator should now be the primary way to augment the behavior of any
1946
existing type including other TypeDecorator subclasses such as PickleType.<a class="changeset-link reference internal" href="#change-96927335ae179f9639f2658179eca869">(link)</a><p></p>
1949
<li><p id="change-0.4.2-42"><span class="target" id="change-d16902bc09502cb5a78b696a5f86caf1"><strong>[sql] </strong></span>selectables (and others) will issue a warning when two columns in
1950
their exported columns collection conflict based on name.<a class="changeset-link reference internal" href="#change-d16902bc09502cb5a78b696a5f86caf1">(link)</a><p></p>
1953
<li><p id="change-0.4.2-43"><span class="target" id="change-a7fd85cad8879a7cb7a882408ae2fc00"><strong>[sql] </strong></span>tables with schemas can still be used in sqlite, firebird,
1954
schema name just gets dropped<a class="changeset-link reference internal" href="#change-a7fd85cad8879a7cb7a882408ae2fc00">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/890">#890</a></p>
1957
<li><p id="change-0.4.2-44"><span class="target" id="change-2925ff88bfebf6c66313f6cf18859909"><strong>[sql] </strong></span>changed the various “literal” generation functions to use an anonymous
1958
bind parameter. not much changes here except their labels now look
1959
like ”:param_1”, ”:param_2” instead of ”:literal”<a class="changeset-link reference internal" href="#change-2925ff88bfebf6c66313f6cf18859909">(link)</a><p></p>
1962
<li><p id="change-0.4.2-45"><span class="target" id="change-2ab31cbdc0db31fb85313f8aa8fd9480"><strong>[sql] </strong></span>column labels in the form “tablename.columname”, i.e. with a dot, are now
1963
supported.<a class="changeset-link reference internal" href="#change-2ab31cbdc0db31fb85313f8aa8fd9480">(link)</a><p></p>
1966
<li><p id="change-0.4.2-46"><span class="target" id="change-8fa1b1ab3760497c5d0dedf5bc7e031e"><strong>[sql] </strong></span>from_obj keyword argument to select() can be a scalar or a list.<a class="changeset-link reference internal" href="#change-8fa1b1ab3760497c5d0dedf5bc7e031e">(link)</a><p></p>
1971
<div class="section" id="change-0.4.2-firebird">
1972
<h3>firebird<a class="headerlink" href="#change-0.4.2-firebird" title="Permalink to this headline">¶</a></h3>
1974
<li><p id="change-0.4.2-47"><span class="target" id="change-296229733dda9c08bbcde17a5331e5fc"><strong>[firebird] [backend] </strong></span>does properly reflect domains (partially fixing) and
1975
PassiveDefaults<a class="changeset-link reference internal" href="#change-296229733dda9c08bbcde17a5331e5fc">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/410">#410</a></p>
1978
<li><p id="change-0.4.2-48"><span class="target" id="change-5c5bf54d072226185c9bcd8b439d9bed"><strong>[firebird] [3562] [backend] </strong></span>reverted to use default poolclass (was set to SingletonThreadPool in
1979
0.4.0 for test purposes)<a class="changeset-link reference internal" href="#change-5c5bf54d072226185c9bcd8b439d9bed">(link)</a><p></p>
1982
<li><p id="change-0.4.2-49"><span class="target" id="change-c4e420a3bd5661f308a26a6dbe3bc067"><strong>[firebird] [backend] </strong></span>map func.length() to ‘char_length’ (easily overridable with the UDF
1983
‘strlen’ on old versions of Firebird)<a class="changeset-link reference internal" href="#change-c4e420a3bd5661f308a26a6dbe3bc067">(link)</a><p></p>
1988
<div class="section" id="change-0.4.2-misc">
1989
<h3>misc<a class="headerlink" href="#change-0.4.2-misc" title="Permalink to this headline">¶</a></h3>
1991
<li><p id="change-0.4.2-50"><span class="target" id="change-2c81613f5859b7c1f3ceca0a78b13cfd"><strong>[dialects] </strong></span>sqlite SLDate type will not erroneously render “microseconds” portion
1992
of a datetime or time object.<a class="changeset-link reference internal" href="#change-2c81613f5859b7c1f3ceca0a78b13cfd">(link)</a><p></p>
1995
<li><p id="change-0.4.2-51"><span class="target" id="change-8ca793172781cfe8727359f0bb56604c"><strong>[dialects] </strong></span><dl class="docutils">
1997
<dd><ul class="first last">
1998
<li>added disconnect detection support for Oracle</li>
1999
<li>some cleanup to binary/raw types so that cx_oracle.LOB is detected
2000
on an ad-hoc basis</li>
2004
<a class="changeset-link reference internal" href="#change-8ca793172781cfe8727359f0bb56604c">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/902">#902</a></p>
2007
<li><p id="change-0.4.2-52"><span class="target" id="change-e26463d0e09920a810721d5acec0fc1f"><strong>[dialects] </strong></span><dl class="docutils">
2009
<dd><ul class="first last">
2010
<li>PyODBC no longer has a global “set nocount on”.</li>
2011
<li>Fix non-identity integer PKs on autload</li>
2012
<li>Better support for convert_unicode</li>
2013
<li>Less strict date conversion for pyodbc/adodbapi</li>
2014
<li>Schema-qualified tables / autoload</li>
2018
<a class="changeset-link reference internal" href="#change-e26463d0e09920a810721d5acec0fc1f">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/824">#824</a>, <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/839">#839</a>, <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/842">#842</a>, <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/901">#901</a></p>
2024
<div class="section" id="change-0.4.1">
2025
<h2>0.4.1<a class="headerlink" href="#change-0.4.1" title="Permalink to this headline">¶</a></h2>
2026
Released: Sun Nov 18 2007<div class="section" id="change-0.4.1-orm">
2027
<h3>orm<a class="headerlink" href="#change-0.4.1-orm" title="Permalink to this headline">¶</a></h3>
2029
<li><p id="change-0.4.1-0"><span class="target" id="change-0b89c1898d4084608e81d2938ee20609"><strong>[orm] </strong></span>eager loading with LIMIT/OFFSET applied no longer adds the primary
2030
table joined to a limited subquery of itself; the eager loads now
2031
join directly to the subquery which also provides the primary table’s
2032
columns to the result set. This eliminates a JOIN from all eager loads
2033
with LIMIT/OFFSET.<a class="changeset-link reference internal" href="#change-0b89c1898d4084608e81d2938ee20609">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/843">#843</a></p>
2036
<li><p id="change-0.4.1-1"><span class="target" id="change-594a0081d5108bf4ee29921c0a5a842e"><strong>[orm] </strong></span>session.refresh() and session.expire() now support an additional argument
2037
“attribute_names”, a list of individual attribute keynames to be refreshed
2038
or expired, allowing partial reloads of attributes on an already-loaded
2039
instance.<a class="changeset-link reference internal" href="#change-594a0081d5108bf4ee29921c0a5a842e">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/802">#802</a></p>
2042
<li><p id="change-0.4.1-2"><span class="target" id="change-b28a496490baf96e53a35fd41141c45c"><strong>[orm] </strong></span>added op() operator to instrumented attributes; i.e.
2043
User.name.op(‘ilike’)(‘%somename%’)<a class="changeset-link reference internal" href="#change-b28a496490baf96e53a35fd41141c45c">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/767">#767</a></p>
2046
<li><p id="change-0.4.1-3"><span class="target" id="change-eb31b9d3e5311a271dc3c49b5404c206"><strong>[orm] </strong></span>Mapped classes may now define __eq__, __hash__, and __nonzero__ methods
2047
with arbitrary semantics. The orm now handles all mapped instances on
2048
an identity-only basis. (e.g. ‘is’ vs ‘==’)<a class="changeset-link reference internal" href="#change-eb31b9d3e5311a271dc3c49b5404c206">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/676">#676</a></p>
2051
<li><p id="change-0.4.1-4"><span class="target" id="change-3f023f26f562df58ce90608560fd6504"><strong>[orm] </strong></span>the “properties” accessor on Mapper is removed; it now throws an informative
2052
exception explaining the usage of mapper.get_property() and
2053
mapper.iterate_properties<a class="changeset-link reference internal" href="#change-3f023f26f562df58ce90608560fd6504">(link)</a><p></p>
2056
<li><p id="change-0.4.1-5"><span class="target" id="change-2fc98bef8342a30df5eaf8d717ab428d"><strong>[orm] </strong></span>added having() method to Query, applies HAVING to the generated statement
2057
in the same way as filter() appends to the WHERE clause.<a class="changeset-link reference internal" href="#change-2fc98bef8342a30df5eaf8d717ab428d">(link)</a><p></p>
2060
<li><p id="change-0.4.1-6"><span class="target" id="change-1ca51b23a65e7b311c38e71e4f06f672"><strong>[orm] </strong></span>The behavior of query.options() is now fully based on paths, i.e. an
2061
option such as eagerload_all(‘x.y.z.y.x’) will apply eagerloading to
2062
only those paths, i.e. and not ‘x.y.x’; eagerload(‘children.children’)
2063
applies only to exactly two-levels deep, etc.<a class="changeset-link reference internal" href="#change-1ca51b23a65e7b311c38e71e4f06f672">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/777">#777</a></p>
2066
<li><p id="change-0.4.1-7"><span class="target" id="change-25697ecfe693193b2646032ae6cbe5e3"><strong>[orm] </strong></span>PickleType will compare using <cite>==</cite> when set up with mutable=False,
2067
and not the <cite>is</cite> operator. To use <cite>is</cite> or any other comparator, send
2068
in a custom comparison function using PickleType(comparator=my_custom_comparator).<a class="changeset-link reference internal" href="#change-25697ecfe693193b2646032ae6cbe5e3">(link)</a><p></p>
2071
<li><p id="change-0.4.1-8"><span class="target" id="change-6541ab9074117cd48928f7885253addf"><strong>[orm] </strong></span>query doesn’t throw an error if you use distinct() and an order_by()
2072
containing UnaryExpressions (or other) together<a class="changeset-link reference internal" href="#change-6541ab9074117cd48928f7885253addf">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/848">#848</a></p>
2075
<li><p id="change-0.4.1-9"><span class="target" id="change-4f9647deaa363941af6a3cc05cd1f193"><strong>[orm] </strong></span>order_by() expressions from joined tables are properly added to columns
2076
clause when using distinct()<a class="changeset-link reference internal" href="#change-4f9647deaa363941af6a3cc05cd1f193">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/786">#786</a></p>
2079
<li><p id="change-0.4.1-10"><span class="target" id="change-24e4c45db8fecf131cab8c0a13b7dbed"><strong>[orm] </strong></span>fixed error where Query.add_column() would not accept a class-bound
2080
attribute as an argument; Query also raises an error if an invalid
2081
argument was sent to add_column() (at instances() time)<a class="changeset-link reference internal" href="#change-24e4c45db8fecf131cab8c0a13b7dbed">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/858">#858</a></p>
2084
<li><p id="change-0.4.1-11"><span class="target" id="change-8a9ee44baa74c1b5e3bd072e563eb7c4"><strong>[orm] </strong></span>added a little more checking for garbage-collection dereferences in
2085
InstanceState.__cleanup() to reduce “gc ignored” errors on app
2086
shutdown<a class="changeset-link reference internal" href="#change-8a9ee44baa74c1b5e3bd072e563eb7c4">(link)</a><p></p>
2089
<li><p id="change-0.4.1-12"><span class="target" id="change-a42838089d8927d06dc3e4f5fb731b84"><strong>[orm] </strong></span>The session API has been solidified:<a class="changeset-link reference internal" href="#change-a42838089d8927d06dc3e4f5fb731b84">(link)</a><p></p>
2092
<li><p id="change-0.4.1-13"><span class="target" id="change-5e08c60d85b9c39cc11a409fafc3424f"><strong>[orm] </strong></span>It’s an error to session.save() an object which is already
2093
persistent<a class="changeset-link reference internal" href="#change-5e08c60d85b9c39cc11a409fafc3424f">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/840">#840</a></p>
2096
<li><p id="change-0.4.1-14"><span class="target" id="change-4869e0999f48ab540716a33356319094"><strong>[orm] </strong></span>It’s an error to session.delete() an object which is <em>not</em>
2097
persistent.<a class="changeset-link reference internal" href="#change-4869e0999f48ab540716a33356319094">(link)</a><p></p>
2100
<li><p id="change-0.4.1-15"><span class="target" id="change-e629f6ef18ff5d02c5e58f3269d83bb7"><strong>[orm] </strong></span>session.update() and session.delete() raise an error when updating
2101
or deleting an instance that is already in the session with a
2102
different identity.<a class="changeset-link reference internal" href="#change-e629f6ef18ff5d02c5e58f3269d83bb7">(link)</a><p></p>
2105
<li><p id="change-0.4.1-16"><span class="target" id="change-01dbce273a2adf5114b01dc0b145907c"><strong>[orm] </strong></span>The session checks more carefully when determining “object X already
2106
in another session”; e.g. if you pickle a series of objects and
2107
unpickle (i.e. as in a Pylons HTTP session or similar), they can go
2108
into a new session without any conflict<a class="changeset-link reference internal" href="#change-01dbce273a2adf5114b01dc0b145907c">(link)</a><p></p>
2111
<li><p id="change-0.4.1-17"><span class="target" id="change-70e068257ffe2a9509dde98014d7fc8f"><strong>[orm] </strong></span>merge() includes a keyword argument “dont_load=True”. setting this
2112
flag will cause the merge operation to not load any data from the
2113
database in response to incoming detached objects, and will accept
2114
the incoming detached object as though it were already present in
2115
that session. Use this to merge detached objects from external
2116
caching systems into the session.<a class="changeset-link reference internal" href="#change-70e068257ffe2a9509dde98014d7fc8f">(link)</a><p></p>
2119
<li><p id="change-0.4.1-18"><span class="target" id="change-6ef45e3576f11236b5bc83eb98617664"><strong>[orm] </strong></span>Deferred column attributes no longer trigger a load operation when the
2120
attribute is assigned to. In those cases, the newly assigned value
2121
will be present in the flushes’ UPDATE statement unconditionally.<a class="changeset-link reference internal" href="#change-6ef45e3576f11236b5bc83eb98617664">(link)</a><p></p>
2124
<li><p id="change-0.4.1-19"><span class="target" id="change-91e4cc2655c18b9537f4d744bfdd2708"><strong>[orm] </strong></span>Fixed a truncation error when re-assigning a subset of a collection
2125
(obj.relation = obj.relation[1:])<a class="changeset-link reference internal" href="#change-91e4cc2655c18b9537f4d744bfdd2708">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/834">#834</a></p>
2128
<li><p id="change-0.4.1-20"><span class="target" id="change-41c6f4041a8bb7bdfbc47fec3d053013"><strong>[orm] </strong></span>De-cruftified backref configuration code, backrefs which step on
2129
existing properties now raise an error<a class="changeset-link reference internal" href="#change-41c6f4041a8bb7bdfbc47fec3d053013">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/832">#832</a></p>
2132
<li><p id="change-0.4.1-21"><span class="target" id="change-759a3aea37ad25edb343df437295e6e6"><strong>[orm] </strong></span>Improved behavior of add_property() etc., fixed involving
2133
synonym/deferred.<a class="changeset-link reference internal" href="#change-759a3aea37ad25edb343df437295e6e6">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/831">#831</a></p>
2136
<li><p id="change-0.4.1-22"><span class="target" id="change-5d9a9be98d135fcb8ef55e33ae16b4e9"><strong>[orm] </strong></span>Fixed clear_mappers() behavior to better clean up after itself.<a class="changeset-link reference internal" href="#change-5d9a9be98d135fcb8ef55e33ae16b4e9">(link)</a><p></p>
2139
<li><p id="change-0.4.1-23"><span class="target" id="change-c43e29a204caeb3c86ea12bedc74a885"><strong>[orm] </strong></span>Fix to “row switch” behavior, i.e. when an INSERT/DELETE is combined
2140
into a single UPDATE; many-to-many relations on the parent object
2141
update properly.<a class="changeset-link reference internal" href="#change-c43e29a204caeb3c86ea12bedc74a885">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/841">#841</a></p>
2144
<li><p id="change-0.4.1-24"><span class="target" id="change-ccf7e204c172dae174612768df596949"><strong>[orm] </strong></span>Fixed __hash__ for association proxy- these collections are unhashable,
2145
just like their mutable Python counterparts.<a class="changeset-link reference internal" href="#change-ccf7e204c172dae174612768df596949">(link)</a><p></p>
2148
<li><p id="change-0.4.1-25"><span class="target" id="change-2754c6abcf835f7d57e9369b9cfdcd6a"><strong>[orm] </strong></span>Added proxying of save_or_update, __contains__ and __iter__ methods for
2149
scoped sessions.<a class="changeset-link reference internal" href="#change-2754c6abcf835f7d57e9369b9cfdcd6a">(link)</a><p></p>
2152
<li><p id="change-0.4.1-26"><span class="target" id="change-94bbc737fc90680c013c33b8fd5c6177"><strong>[orm] </strong></span>fixed very hard-to-reproduce issue where by the FROM clause of Query
2153
could get polluted by certain generative calls<a class="changeset-link reference internal" href="#change-94bbc737fc90680c013c33b8fd5c6177">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/852">#852</a></p>
2158
<div class="section" id="change-0.4.1-sql">
2159
<h3>sql<a class="headerlink" href="#change-0.4.1-sql" title="Permalink to this headline">¶</a></h3>
2161
<li><p id="change-0.4.1-27"><span class="target" id="change-c4010d5d99cc7a8ff9d77a8cf6a8aef4"><strong>[sql] </strong></span>the “shortname” keyword parameter on bindparam() has been
2162
deprecated.<a class="changeset-link reference internal" href="#change-c4010d5d99cc7a8ff9d77a8cf6a8aef4">(link)</a><p></p>
2165
<li><p id="change-0.4.1-28"><span class="target" id="change-cc475e4294cf5bc311cbfa7da8a7cc8f"><strong>[sql] </strong></span>Added contains operator (generates a “LIKE %<other>%” clause).<a class="changeset-link reference internal" href="#change-cc475e4294cf5bc311cbfa7da8a7cc8f">(link)</a><p></p>
2168
<li><p id="change-0.4.1-29"><span class="target" id="change-4d5450de721c9aeffc95905577b27182"><strong>[sql] </strong></span>anonymous column expressions are automatically labeled.
2169
e.g. select([x* 5]) produces “SELECT x * 5 AS anon_1”.
2170
This allows the labelname to be present in the cursor.description
2171
which can then be appropriately matched to result-column processing
2172
rules. (we can’t reliably use positional tracking for result-column
2173
matches since text() expressions may represent multiple columns).<a class="changeset-link reference internal" href="#change-4d5450de721c9aeffc95905577b27182">(link)</a><p></p>
2176
<li><p id="change-0.4.1-30"><span class="target" id="change-5378ee3b3457f069b4aece9be3205155"><strong>[sql] </strong></span>operator overloading is now controlled by TypeEngine objects - the
2177
one built-in operator overload so far is String types overloading
2178
‘+’ to be the string concatenation operator.
2179
User-defined types can also define their own operator overloading
2180
by overriding the adapt_operator(self, op) method.<a class="changeset-link reference internal" href="#change-5378ee3b3457f069b4aece9be3205155">(link)</a><p></p>
2183
<li><p id="change-0.4.1-31"><span class="target" id="change-84a5f6328d01750340ded0b38bddf0b1"><strong>[sql] </strong></span>untyped bind parameters on the right side of a binary expression
2184
will be assigned the type of the left side of the operation, to better
2185
enable the appropriate bind parameter processing to take effect<a class="changeset-link reference internal" href="#change-84a5f6328d01750340ded0b38bddf0b1">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/819">#819</a></p>
2188
<li><p id="change-0.4.1-32"><span class="target" id="change-1c04ab02a23376e994e8ae24241f0a56"><strong>[sql] </strong></span>Removed regular expression step from most statement compilations.
2189
Also fixes<a class="changeset-link reference internal" href="#change-1c04ab02a23376e994e8ae24241f0a56">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/833">#833</a></p>
2192
<li><p id="change-0.4.1-33"><span class="target" id="change-843aea1d01efb76d3683d2d7c05850a3"><strong>[sql] </strong></span>Fixed empty (zero column) sqlite inserts, allowing inserts on
2193
autoincrementing single column tables.<a class="changeset-link reference internal" href="#change-843aea1d01efb76d3683d2d7c05850a3">(link)</a><p></p>
2196
<li><p id="change-0.4.1-34"><span class="target" id="change-b7662d8394714cbb6d9daa235d86c4b6"><strong>[sql] </strong></span>Fixed expression translation of text() clauses; this repairs various
2197
ORM scenarios where literal text is used for SQL expressions<a class="changeset-link reference internal" href="#change-b7662d8394714cbb6d9daa235d86c4b6">(link)</a><p></p>
2200
<li><p id="change-0.4.1-35"><span class="target" id="change-36a4d5696bd619c85b8b8b650728d842"><strong>[sql] </strong></span>Removed ClauseParameters object; compiled.params returns a regular
2201
dictionary now, as well as result.last_inserted_params() /
2202
last_updated_params().<a class="changeset-link reference internal" href="#change-36a4d5696bd619c85b8b8b650728d842">(link)</a><p></p>
2205
<li><p id="change-0.4.1-36"><span class="target" id="change-246ac6dc033a79f2373e3fc6a80fdfe8"><strong>[sql] </strong></span>Fixed INSERT statements w.r.t. primary key columns that have
2206
SQL-expression based default generators on them; SQL expression
2207
executes inline as normal but will not trigger a “postfetch” condition
2208
for the column, for those DB’s who provide it via cursor.lastrowid<a class="changeset-link reference internal" href="#change-246ac6dc033a79f2373e3fc6a80fdfe8">(link)</a><p></p>
2211
<li><p id="change-0.4.1-37"><span class="target" id="change-4313d5275f28eb3f99349b58aad9a963"><strong>[sql] </strong></span>func. objects can be pickled/unpickled<a class="changeset-link reference internal" href="#change-4313d5275f28eb3f99349b58aad9a963">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/844">#844</a></p>
2214
<li><p id="change-0.4.1-38"><span class="target" id="change-530c7500b6d6596c5e44ff1bcc3bce10"><strong>[sql] </strong></span>rewrote and simplified the system used to “target” columns across
2215
selectable expressions. On the SQL side this is represented by the
2216
“corresponding_column()” method. This method is used heavily by the ORM
2217
to “adapt” elements of an expression to similar, aliased expressions,
2218
as well as to target result set columns originally bound to a
2219
table or selectable to an aliased, “corresponding” expression. The new
2220
rewrite features completely consistent and accurate behavior.<a class="changeset-link reference internal" href="#change-530c7500b6d6596c5e44ff1bcc3bce10">(link)</a><p></p>
2223
<li><p id="change-0.4.1-39"><span class="target" id="change-9ce2e2e3ce7ee6bc38d6391ca49d1bc1"><strong>[sql] </strong></span>Added a field (“info”) for storing arbitrary data on schema items<a class="changeset-link reference internal" href="#change-9ce2e2e3ce7ee6bc38d6391ca49d1bc1">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/573">#573</a></p>
2226
<li><p id="change-0.4.1-40"><span class="target" id="change-e82d8124e2cacd51fd60363bf86daeee"><strong>[sql] </strong></span>The “properties” collection on Connections has been renamed “info” to
2227
match schema’s writable collections. Access is still available via
2228
the “properties” name until 0.5.<a class="changeset-link reference internal" href="#change-e82d8124e2cacd51fd60363bf86daeee">(link)</a><p></p>
2231
<li><p id="change-0.4.1-41"><span class="target" id="change-6e152ccd5b3f9e3f7ee75b1efb1f7acd"><strong>[sql] </strong></span>fixed the close() method on Transaction when using strategy=’threadlocal’<a class="changeset-link reference internal" href="#change-6e152ccd5b3f9e3f7ee75b1efb1f7acd">(link)</a><p></p>
2234
<li><p id="change-0.4.1-42"><span class="target" id="change-74a921aec37d54b685b3772d6afe21c8"><strong>[sql] </strong></span>fix to compiled bind parameters to not mistakenly populate None<a class="changeset-link reference internal" href="#change-74a921aec37d54b685b3772d6afe21c8">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/853">#853</a></p>
2237
<li><p id="change-0.4.1-43"><span class="target" id="change-d7e28424562953a96441f068c4371b86"><strong>[sql] </strong></span><Engine|Connection>._execute_clauseelement becomes a public method
2238
Connectable.execute_clauseelement<a class="changeset-link reference internal" href="#change-d7e28424562953a96441f068c4371b86">(link)</a><p></p>
2243
<div class="section" id="change-0.4.1-misc">
2244
<h3>misc<a class="headerlink" href="#change-0.4.1-misc" title="Permalink to this headline">¶</a></h3>
2246
<li><p id="change-0.4.1-44"><span class="target" id="change-87d6ffbdea8e609cece2a7580f1cbfd8"><strong>[dialects] </strong></span>Added experimental support for MaxDB (versions >= 7.6.03.007 only).<a class="changeset-link reference internal" href="#change-87d6ffbdea8e609cece2a7580f1cbfd8">(link)</a><p></p>
2249
<li><p id="change-0.4.1-45"><span class="target" id="change-914074ff8e5eed82fab96d0b8a6b71cc"><strong>[dialects] </strong></span>oracle will now reflect “DATE” as an OracleDateTime column, not
2250
OracleDate<a class="changeset-link reference internal" href="#change-914074ff8e5eed82fab96d0b8a6b71cc">(link)</a><p></p>
2253
<li><p id="change-0.4.1-46"><span class="target" id="change-ea8c17afee12829dee303f9a3b5e9e93"><strong>[dialects] </strong></span>added awareness of schema name in oracle table_names() function,
2254
fixes metadata.reflect(schema=’someschema’)<a class="changeset-link reference internal" href="#change-ea8c17afee12829dee303f9a3b5e9e93">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/847">#847</a></p>
2257
<li><p id="change-0.4.1-47"><span class="target" id="change-bd6478eaa69e057034c6c987444e39a2"><strong>[dialects] </strong></span>MSSQL anonymous labels for selection of functions made deterministic<a class="changeset-link reference internal" href="#change-bd6478eaa69e057034c6c987444e39a2">(link)</a><p></p>
2260
<li><p id="change-0.4.1-48"><span class="target" id="change-538b138b4fd33c8a8761b3953aa54d96"><strong>[dialects] </strong></span>sqlite will reflect “DECIMAL” as a numeric column.<a class="changeset-link reference internal" href="#change-538b138b4fd33c8a8761b3953aa54d96">(link)</a><p></p>
2263
<li><p id="change-0.4.1-49"><span class="target" id="change-1b89ee1a9467ff024e61a062369696f0"><strong>[dialects] </strong></span>Made access dao detection more reliable<a class="changeset-link reference internal" href="#change-1b89ee1a9467ff024e61a062369696f0">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/828">#828</a></p>
2266
<li><p id="change-0.4.1-50"><span class="target" id="change-b559a79228b5f4bf95f4c9c0621d82e4"><strong>[dialects] </strong></span>Renamed the Dialect attribute ‘preexecute_sequences’ to
2267
‘preexecute_pk_sequences’. An attribute porxy is in place for
2268
out-of-tree dialects using the old name.<a class="changeset-link reference internal" href="#change-b559a79228b5f4bf95f4c9c0621d82e4">(link)</a><p></p>
2271
<li><p id="change-0.4.1-51"><span class="target" id="change-cd70ea2a75cf0f0058a871da3c0a7381"><strong>[dialects] </strong></span>Added test coverage for unknown type reflection. Fixed sqlite/mysql
2272
handling of type reflection for unknown types.<a class="changeset-link reference internal" href="#change-cd70ea2a75cf0f0058a871da3c0a7381">(link)</a><p></p>
2275
<li><p id="change-0.4.1-52"><span class="target" id="change-e8a0ddea13b9ebc8886d4b136d2b1d68"><strong>[dialects] </strong></span>Added REAL for mysql dialect (for folks exploiting the
2276
REAL_AS_FLOAT sql mode).<a class="changeset-link reference internal" href="#change-e8a0ddea13b9ebc8886d4b136d2b1d68">(link)</a><p></p>
2279
<li><p id="change-0.4.1-53"><span class="target" id="change-0f02a6b3d522bc191f30d77738ee5134"><strong>[dialects] </strong></span>mysql Float, MSFloat and MSDouble constructed without arguments
2280
now produce no-argument DDL, e.g.’FLOAT’.<a class="changeset-link reference internal" href="#change-0f02a6b3d522bc191f30d77738ee5134">(link)</a><p></p>
2283
<li><p id="change-0.4.1-54"><span class="target" id="change-e83c6ba370ca3384eed62f241d8b80d9"><strong>[misc] </strong></span>Removed unused util.hash().<a class="changeset-link reference internal" href="#change-e83c6ba370ca3384eed62f241d8b80d9">(link)</a><p></p>
2289
<div class="section" id="change-0.4.0">
2290
<h2>0.4.0<a class="headerlink" href="#change-0.4.0" title="Permalink to this headline">¶</a></h2>
2291
Released: Wed Oct 17 2007<ul class="simple">
2292
<li><p id="change-0.4.0-0"><span class="target" id="change-b4fc8b2d58a4d717e756adb83fde5498"></span>(see 0.4.0beta1 for the start of major changes against 0.3,
2293
as well as <a class="reference external" href="http://www.sqlalchemy.org/trac/wiki/WhatsNewIn04">http://www.sqlalchemy.org/trac/wiki/WhatsNewIn04</a> )<a class="changeset-link reference internal" href="#change-b4fc8b2d58a4d717e756adb83fde5498">(link)</a><p></p>
2296
<li><p id="change-0.4.0-1"><span class="target" id="change-bcf3dff7b0aa6e5210dcc06d54677447"></span>Added initial Sybase support (mxODBC so far)<a class="changeset-link reference internal" href="#change-bcf3dff7b0aa6e5210dcc06d54677447">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/785">#785</a></p>
2299
<li><p id="change-0.4.0-2"><span class="target" id="change-25fce3a42aa163243a076187861b48a8"></span>Added partial index support for PostgreSQL. Use the postgres_where keyword
2300
on the Index.<a class="changeset-link reference internal" href="#change-25fce3a42aa163243a076187861b48a8">(link)</a><p></p>
2303
<li><p id="change-0.4.0-3"><span class="target" id="change-50353e4f1d87383f71322fa8c91dc8dc"></span>string-based query param parsing/config file parser understands
2304
wider range of string values for booleans<a class="changeset-link reference internal" href="#change-50353e4f1d87383f71322fa8c91dc8dc">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/817">#817</a></p>
2307
<li><p id="change-0.4.0-4"><span class="target" id="change-c14bc3996acddaff218f64dced993cbc"></span>backref remove object operation doesn’t fail if the other-side
2308
collection doesn’t contain the item, supports noload collections<a class="changeset-link reference internal" href="#change-c14bc3996acddaff218f64dced993cbc">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/813">#813</a></p>
2311
<li><p id="change-0.4.0-5"><span class="target" id="change-3fe165fcf8b210dd06e23fe29c90fdcf"></span>removed __len__ from “dynamic” collection as it would require issuing
2312
a SQL “count()” operation, thus forcing all list evaluations to issue
2313
redundant SQL<a class="changeset-link reference internal" href="#change-3fe165fcf8b210dd06e23fe29c90fdcf">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/818">#818</a></p>
2316
<li><p id="change-0.4.0-6"><span class="target" id="change-fed60a94c48be9f1d4fbf64b773478a9"></span>inline optimizations added to locate_dirty() which can greatly speed up
2317
repeated calls to flush(), as occurs with autoflush=True<a class="changeset-link reference internal" href="#change-fed60a94c48be9f1d4fbf64b773478a9">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/816">#816</a></p>
2320
<li><p id="change-0.4.0-7"><span class="target" id="change-6931e3874f7028b6166fbaee26c13735"></span>The IdentifierPreprarer’s _requires_quotes test is now regex based. Any
2321
out-of-tree dialects that provide custom sets of legal_characters or
2322
illegal_initial_characters will need to move to regexes or override
2323
_requires_quotes.<a class="changeset-link reference internal" href="#change-6931e3874f7028b6166fbaee26c13735">(link)</a><p></p>
2326
<li><p id="change-0.4.0-8"><span class="target" id="change-5a64dfccda02d75cc5a717a5d72f1d75"></span>Firebird has supports_sane_rowcount and supports_sane_multi_rowcount set
2327
to False due to ticket #370 (right way).<a class="changeset-link reference internal" href="#change-5a64dfccda02d75cc5a717a5d72f1d75">(link)</a><p></p>
2330
<li><p id="change-0.4.0-9"><span class="target" id="change-1bcf58972727282d29a05407f163e6d8"></span>Improvements and fixes on Firebird reflection:
2331
. FBDialect now mimics OracleDialect, regarding case-sensitivity of TABLE and<blockquote>
2332
<div>COLUMN names (see ‘case_sensitive remotion’ topic on this current file).</div></blockquote>
2333
<p>. FBDialect.table_names() doesn’t bring system tables (ticket:796).
2334
. FB now reflects Column’s nullable property correctly.</p>
2335
<a class="changeset-link reference internal" href="#change-1bcf58972727282d29a05407f163e6d8">(link)</a><p></p>
2338
<li><p id="change-0.4.0-10"><span class="target" id="change-7a9f394245eb8aa496bcd282b6cb9d91"></span>Fixed SQL compiler’s awareness of top-level column labels as used
2339
in result-set processing; nested selects which contain the same column
2340
names don’t affect the result or conflict with result-column metadata.<a class="changeset-link reference internal" href="#change-7a9f394245eb8aa496bcd282b6cb9d91">(link)</a><p></p>
2343
<li><p id="change-0.4.0-11"><span class="target" id="change-d558e9c84b1e5793e3c4a3c171f163af"></span>query.get() and related functions (like many-to-one lazyloading)
2344
use compile-time-aliased bind parameter names, to prevent
2345
name conflicts with bind parameters that already exist in the
2346
mapped selectable.<a class="changeset-link reference internal" href="#change-d558e9c84b1e5793e3c4a3c171f163af">(link)</a><p></p>
2349
<li><p id="change-0.4.0-12"><span class="target" id="change-05e3bf9bc8a5fbc5cb566b518f8c3d52"></span>Fixed three- and multi-level select and deferred inheritance loading
2350
(i.e. abc inheritance with no select_table).<a class="changeset-link reference internal" href="#change-05e3bf9bc8a5fbc5cb566b518f8c3d52">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/795">#795</a></p>
2353
<li><p id="change-0.4.0-13"><span class="target" id="change-5d0fab06b154a736d16cc1f5f05124d6"></span>Ident passed to id_chooser in shard.py always a list.<a class="changeset-link reference internal" href="#change-5d0fab06b154a736d16cc1f5f05124d6">(link)</a><p></p>
2356
<li><p id="change-0.4.0-14"><span class="target" id="change-900edd4aa3ce5b35e0379abe1f1aceec"></span>The no-arg ResultProxy._row_processor() is now the class attribute
2357
<cite>_process_row</cite>.<a class="changeset-link reference internal" href="#change-900edd4aa3ce5b35e0379abe1f1aceec">(link)</a><p></p>
2360
<li><p id="change-0.4.0-15"><span class="target" id="change-a888d5a2b3097f6a24d949a8c8094ba0"></span>Added support for returning values from inserts and updates for
2361
PostgreSQL 8.2+.<a class="changeset-link reference internal" href="#change-a888d5a2b3097f6a24d949a8c8094ba0">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/797">#797</a></p>
2364
<li><p id="change-0.4.0-16"><span class="target" id="change-737ba18b8c4d08ef01910aa20772d16a"></span>PG reflection, upon seeing the default schema name being used explicitly
2365
as the “schema” argument in a Table, will assume that this is the
2366
user’s desired convention, and will explicitly set the “schema” argument
2367
in foreign-key-related reflected tables, thus making them match only
2368
with Table constructors that also use the explicit “schema” argument
2369
(even though its the default schema).
2370
In other words, SA assumes the user is being consistent in this usage.<a class="changeset-link reference internal" href="#change-737ba18b8c4d08ef01910aa20772d16a">(link)</a><p></p>
2373
<li><p id="change-0.4.0-17"><span class="target" id="change-ebf15415b10e013bcf0d9a82f892a217"></span>fixed sqlite reflection of BOOL/BOOLEAN<a class="changeset-link reference internal" href="#change-ebf15415b10e013bcf0d9a82f892a217">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/808">#808</a></p>
2376
<li><p id="change-0.4.0-18"><span class="target" id="change-f1c6c0df2c06bf883b72c36b13e92e75"></span>Added support for UPDATE with LIMIT on mysql.<a class="changeset-link reference internal" href="#change-f1c6c0df2c06bf883b72c36b13e92e75">(link)</a><p></p>
2379
<li><p id="change-0.4.0-19"><span class="target" id="change-efe5107a0d07dac76612b27de5b70784"></span>null foreign key on a m2o doesn’t trigger a lazyload<a class="changeset-link reference internal" href="#change-efe5107a0d07dac76612b27de5b70784">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/803">#803</a></p>
2382
<li><p id="change-0.4.0-20"><span class="target" id="change-528c46ca19ca4d864d2acad507616b4c"></span>oracle does not implicitly convert to unicode for non-typed result
2383
sets (i.e. when no TypeEngine/String/Unicode type is even being used;
2384
previously it was detecting DBAPI types and converting regardless).
2385
should fix<a class="changeset-link reference internal" href="#change-528c46ca19ca4d864d2acad507616b4c">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/800">#800</a></p>
2388
<li><p id="change-0.4.0-21"><span class="target" id="change-77dbca629719cb4cb77e1ddf562e7d9a"></span>fix to anonymous label generation of long table/column names<a class="changeset-link reference internal" href="#change-77dbca629719cb4cb77e1ddf562e7d9a">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/806">#806</a></p>
2391
<li><p id="change-0.4.0-22"><span class="target" id="change-220b2721e3178a042f4628ddf67103d4"></span>Firebird dialect now uses SingletonThreadPool as poolclass.<a class="changeset-link reference internal" href="#change-220b2721e3178a042f4628ddf67103d4">(link)</a><p></p>
2394
<li><p id="change-0.4.0-23"><span class="target" id="change-a9a8ada8cf6f9e910f573eaa9489415b"></span>Firebird now uses dialect.preparer to format sequences names<a class="changeset-link reference internal" href="#change-a9a8ada8cf6f9e910f573eaa9489415b">(link)</a><p></p>
2397
<li><p id="change-0.4.0-24"><span class="target" id="change-3a7b59bf8fe3093a054925308b7f4799"></span>Fixed breakage with postgres and multiple two-phase transactions. Two-phase
2398
commits and rollbacks didn’t automatically end up with a new transaction
2399
as the usual dbapi commits/rollbacks do.<a class="changeset-link reference internal" href="#change-3a7b59bf8fe3093a054925308b7f4799">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/810">#810</a></p>
2402
<li><p id="change-0.4.0-25"><span class="target" id="change-dcfcc254bf2beebefed7c884d53fdbbc"></span>Added an option to the _ScopedExt mapper extension to not automatically
2403
save new objects to session on object initialization.<a class="changeset-link reference internal" href="#change-dcfcc254bf2beebefed7c884d53fdbbc">(link)</a><p></p>
2406
<li><p id="change-0.4.0-26"><span class="target" id="change-5c1e6eaf781c2a9ecb4b8d604b4c12d7"></span>fixed Oracle non-ansi join syntax<a class="changeset-link reference internal" href="#change-5c1e6eaf781c2a9ecb4b8d604b4c12d7">(link)</a><p></p>
2409
<li><p id="change-0.4.0-27"><span class="target" id="change-2d010cff627c0048b473b58acfd31fc3"></span>PickleType and Interval types (on db not supporting it natively) are now
2410
slightly faster.<a class="changeset-link reference internal" href="#change-2d010cff627c0048b473b58acfd31fc3">(link)</a><p></p>
2413
<li><p id="change-0.4.0-28"><span class="target" id="change-1aa7ff5a74776a60681a3dc879294a54"></span>Added Float and Time types to Firebird (FBFloat and FBTime). Fixed
2414
BLOB SUB_TYPE for TEXT and Binary types.<a class="changeset-link reference internal" href="#change-1aa7ff5a74776a60681a3dc879294a54">(link)</a><p></p>
2417
<li><p id="change-0.4.0-29"><span class="target" id="change-70b221b5159f758f606d12b23aaabc2d"></span>Changed the API for the <a href="#id23"><span class="problematic" id="id24">in_</span></a> operator. in_() now accepts a single argument
2418
that is a sequence of values or a selectable. The old API of passing in
2419
values as varargs still works but is deprecated.<a class="changeset-link reference internal" href="#change-70b221b5159f758f606d12b23aaabc2d">(link)</a><p></p>
2424
<div class="section" id="change-0.4.0beta6">
2425
<h2>0.4.0beta6<a class="headerlink" href="#change-0.4.0beta6" title="Permalink to this headline">¶</a></h2>
2426
Released: Thu Sep 27 2007<ul class="simple">
2427
<li><p id="change-0.4.0beta6-0"><span class="target" id="change-1df819a6cf9fd245a16b40d9c188c60f"></span>The Session identity map is now <em>weak referencing</em> by default, use
2428
weak_identity_map=False to use a regular dict. The weak dict we are using
2429
is customized to detect instances which are “dirty” and maintain a
2430
temporary strong reference to those instances until changes are flushed.<a class="changeset-link reference internal" href="#change-1df819a6cf9fd245a16b40d9c188c60f">(link)</a><p></p>
2433
<li><p id="change-0.4.0beta6-1"><span class="target" id="change-1d1c0f14569b491f750569e9ee7529b3"></span>Mapper compilation has been reorganized such that most compilation occurs
2434
upon mapper construction. This allows us to have fewer calls to
2435
mapper.compile() and also to allow class-based properties to force a
2436
compilation (i.e. User.addresses == 7 will compile all mappers; this is). The only caveat here is that an inheriting mapper now
2437
looks for its inherited mapper upon construction; so mappers within
2438
inheritance relationships need to be constructed in inheritance order
2439
(which should be the normal case anyway).<a class="changeset-link reference internal" href="#change-1d1c0f14569b491f750569e9ee7529b3">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/758">#758</a></p>
2442
<li><p id="change-0.4.0beta6-2"><span class="target" id="change-b7cf4f4d67686ec87fdba236e7d68f25"></span>added “FETCH” to the keywords detected by Postgres to indicate a
2443
result-row holding statement (i.e. in addition to “SELECT”).<a class="changeset-link reference internal" href="#change-b7cf4f4d67686ec87fdba236e7d68f25">(link)</a><p></p>
2446
<li><p id="change-0.4.0beta6-3"><span class="target" id="change-9547226b45b928b5e944366ec8a0ab93"></span>Added full list of SQLite reserved keywords so that they get escaped
2447
properly.<a class="changeset-link reference internal" href="#change-9547226b45b928b5e944366ec8a0ab93">(link)</a><p></p>
2450
<li><p id="change-0.4.0beta6-4"><span class="target" id="change-f4cba78c179582e4bb530a36c5e55152"></span>Tightened up the relationship between the Query’s generation of “eager
2451
load” aliases, and Query.instances() which actually grabs the eagerly
2452
loaded rows. If the aliases were not specifically generated for that
2453
statement by EagerLoader, the EagerLoader will not take effect when the
2454
rows are fetched. This prevents columns from being grabbed accidentally
2455
as being part of an eager load when they were not meant for such, which
2456
can happen with textual SQL as well as some inheritance situations. It’s
2457
particularly important since the “anonymous aliasing” of columns uses
2458
simple integer counts now to generate labels.<a class="changeset-link reference internal" href="#change-f4cba78c179582e4bb530a36c5e55152">(link)</a><p></p>
2461
<li><p id="change-0.4.0beta6-5"><span class="target" id="change-066c676b077070c937c1d23f53d45e3a"></span>Removed “parameters” argument from clauseelement.compile(), replaced with
2462
“column_keys”. The parameters sent to execute() only interact with the
2463
insert/update statement compilation process in terms of the column names
2464
present but not the values for those columns. Produces more consistent
2465
execute/executemany behavior, simplifies things a bit internally.<a class="changeset-link reference internal" href="#change-066c676b077070c937c1d23f53d45e3a">(link)</a><p></p>
2468
<li><p id="change-0.4.0beta6-6"><span class="target" id="change-a57972bf47c37142d2f8450ba8343433"></span>Added ‘comparator’ keyword argument to PickleType. By default, “mutable”
2469
PickleType does a “deep compare” of objects using their dumps()
2470
representation. But this doesn’t work for dictionaries. Pickled objects
2471
which provide an adequate __eq__() implementation can be set up with
2472
“PickleType(comparator=operator.eq)”<a class="changeset-link reference internal" href="#change-a57972bf47c37142d2f8450ba8343433">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/560">#560</a></p>
2475
<li><p id="change-0.4.0beta6-7"><span class="target" id="change-86b7e1bcfc257a95dd46f409ad3ed7d4"></span>Added session.is_modified(obj) method; performs the same “history”
2476
comparison operation as occurs within a flush operation; setting
2477
include_collections=False gives the same result as is used when the flush
2478
determines whether or not to issue an UPDATE for the instance’s row.<a class="changeset-link reference internal" href="#change-86b7e1bcfc257a95dd46f409ad3ed7d4">(link)</a><p></p>
2481
<li><p id="change-0.4.0beta6-8"><span class="target" id="change-3353f6e734c51856789b2c7c67e6ba70"></span>Added “schema” argument to Sequence; use this with Postgres /Oracle when
2482
the sequence is located in an alternate schema. Implements part of, should fix.<a class="changeset-link reference internal" href="#change-3353f6e734c51856789b2c7c67e6ba70">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/584">#584</a>, <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/761">#761</a></p>
2485
<li><p id="change-0.4.0beta6-9"><span class="target" id="change-1b5a20829be72cd57e395d53c965f562"></span>Fixed reflection of the empty string for mysql enums.<a class="changeset-link reference internal" href="#change-1b5a20829be72cd57e395d53c965f562">(link)</a><p></p>
2488
<li><p id="change-0.4.0beta6-10"><span class="target" id="change-d3dde7998c563eec40c710cbada1d8af"></span>Changed MySQL dialect to use the older LIMIT <offset>, <limit> syntax
2489
instead of LIMIT <l> OFFSET <o> for folks using 3.23.<a class="changeset-link reference internal" href="#change-d3dde7998c563eec40c710cbada1d8af">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/794">#794</a></p>
2492
<li><p id="change-0.4.0beta6-11"><span class="target" id="change-9d4fe872e8b59bfeefb5183ab7684f9a"></span>Added ‘passive_deletes=”all”’ flag to relation(), disables all nulling-out
2493
of foreign key attributes during a flush where the parent object is
2494
deleted.<a class="changeset-link reference internal" href="#change-9d4fe872e8b59bfeefb5183ab7684f9a">(link)</a><p></p>
2497
<li><p id="change-0.4.0beta6-12"><span class="target" id="change-563c3cbf44802188d12788163d985e16"></span>Column defaults and onupdates, executing inline, will add parenthesis for
2498
subqueries and other parenthesis-requiring expressions<a class="changeset-link reference internal" href="#change-563c3cbf44802188d12788163d985e16">(link)</a><p></p>
2501
<li><p id="change-0.4.0beta6-13"><span class="target" id="change-12d3f310eb9663bf0ecfedbe0a47fbad"></span>The behavior of String/Unicode types regarding that they auto-convert to
2502
TEXT/CLOB when no length is present now occurs <em>only</em> for an exact type of
2503
String or Unicode with no arguments. If you use VARCHAR or NCHAR
2504
(subclasses of String/Unicode) with no length, they will be interpreted by
2505
the dialect as VARCHAR/NCHAR; no “magic” conversion happens there. This
2506
is less surprising behavior and in particular this helps Oracle keep
2507
string-based bind parameters as VARCHARs and not CLOBs.<a class="changeset-link reference internal" href="#change-12d3f310eb9663bf0ecfedbe0a47fbad">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/793">#793</a></p>
2510
<li><p id="change-0.4.0beta6-14"><span class="target" id="change-f455b93bc401877daa0ba14fb70ec408"></span>Fixes to ShardedSession to work with deferred columns.<a class="changeset-link reference internal" href="#change-f455b93bc401877daa0ba14fb70ec408">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/771">#771</a></p>
2513
<li><p id="change-0.4.0beta6-15"><span class="target" id="change-955f25fb13ad169f392d6f1a17e804ac"></span>User-defined shard_chooser() function must accept “clause=None” argument;
2514
this is the ClauseElement passed to session.execute(statement) and can be
2515
used to determine correct shard id (since execute() doesn’t take an
2516
instance.)<a class="changeset-link reference internal" href="#change-955f25fb13ad169f392d6f1a17e804ac">(link)</a><p></p>
2519
<li><p id="change-0.4.0beta6-16"><span class="target" id="change-e2bee4b5e6c30d433fb8a7e4ae81663a"></span>Adjusted operator precedence of NOT to match ‘==’ and others, so that
2520
~(x <operator> y) produces NOT (x <op> y), which is better compatible
2521
with older MySQL versions.. This doesn’t apply to “~(x==y)”
2522
as it does in 0.3 since ~(x==y) compiles to “x != y”, but still applies
2523
to operators like BETWEEN.<a class="changeset-link reference internal" href="#change-e2bee4b5e6c30d433fb8a7e4ae81663a">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/764">#764</a></p>
2526
<li><p id="change-0.4.0beta6-17"><span class="target" id="change-72a7f7aec701fc5fbf615366585da0c8"></span>Other tickets:,,.<a class="changeset-link reference internal" href="#change-72a7f7aec701fc5fbf615366585da0c8">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/757">#757</a>, <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/768">#768</a>, <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/779">#779</a>, <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/728">#728</a></p>
2531
<div class="section" id="change-0.4.0beta5">
2532
<h2>0.4.0beta5<a class="headerlink" href="#change-0.4.0beta5" title="Permalink to this headline">¶</a></h2>
2533
no release date<ul class="simple">
2534
<li><p id="change-0.4.0beta5-0"><span class="target" id="change-8d770fefd20726d046539230358cf916"></span>Connection pool fixes; the better performance of beta4 remains but fixes
2535
“connection overflow” and other bugs which were present (like).<a class="changeset-link reference internal" href="#change-8d770fefd20726d046539230358cf916">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/754">#754</a></p>
2538
<li><p id="change-0.4.0beta5-1"><span class="target" id="change-e4680818ac93f4cde5adbfd53ec55dce"></span>Fixed bugs in determining proper sync clauses from custom inherit
2539
conditions.<a class="changeset-link reference internal" href="#change-e4680818ac93f4cde5adbfd53ec55dce">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/769">#769</a></p>
2542
<li><p id="change-0.4.0beta5-2"><span class="target" id="change-2c611a783379e4c4bbf0acadbc498ce5"></span>Extended ‘engine_from_config’ coercion for QueuePool size / overflow.<a class="changeset-link reference internal" href="#change-2c611a783379e4c4bbf0acadbc498ce5">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/763">#763</a></p>
2545
<li><p id="change-0.4.0beta5-3"><span class="target" id="change-a02fe61d853e712245ea2fa9e3cf8182"></span>mysql views can be reflected again.<a class="changeset-link reference internal" href="#change-a02fe61d853e712245ea2fa9e3cf8182">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/748">#748</a></p>
2548
<li><p id="change-0.4.0beta5-4"><span class="target" id="change-43e8bb9fe2e39b744b2a496fb3f5ac6f"></span>AssociationProxy can now take custom getters and setters.<a class="changeset-link reference internal" href="#change-43e8bb9fe2e39b744b2a496fb3f5ac6f">(link)</a><p></p>
2551
<li><p id="change-0.4.0beta5-5"><span class="target" id="change-80a35e2d5a32af8ce1f16c72e2776cc9"></span>Fixed malfunctioning BETWEEN in orm queries.<a class="changeset-link reference internal" href="#change-80a35e2d5a32af8ce1f16c72e2776cc9">(link)</a><p></p>
2554
<li><p id="change-0.4.0beta5-6"><span class="target" id="change-99c2f326bb6523f16579523728bf307c"></span>Fixed OrderedProperties pickling<a class="changeset-link reference internal" href="#change-99c2f326bb6523f16579523728bf307c">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/762">#762</a></p>
2557
<li><p id="change-0.4.0beta5-7"><span class="target" id="change-3a2a0bf70aa28afcbafdd2992791f31d"></span>SQL-expression defaults and sequences now execute “inline” for all
2558
non-primary key columns during an INSERT or UPDATE, and for all columns
2559
during an executemany()-style call. inline=True flag on any insert/update
2560
statement also forces the same behavior with a single execute().
2561
result.postfetch_cols() is a collection of columns for which the previous
2562
single insert or update statement contained a SQL-side default expression.<a class="changeset-link reference internal" href="#change-3a2a0bf70aa28afcbafdd2992791f31d">(link)</a><p></p>
2565
<li><p id="change-0.4.0beta5-8"><span class="target" id="change-ffca3b05b1018517a278afe82229a29c"></span>Fixed PG executemany() behavior.<a class="changeset-link reference internal" href="#change-ffca3b05b1018517a278afe82229a29c">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/759">#759</a></p>
2568
<li><p id="change-0.4.0beta5-9"><span class="target" id="change-3a401edfbc7ebb4442cd5e73acb6d51e"></span>postgres reflects tables with autoincrement=False for primary key columns
2569
which have no defaults.<a class="changeset-link reference internal" href="#change-3a401edfbc7ebb4442cd5e73acb6d51e">(link)</a><p></p>
2572
<li><p id="change-0.4.0beta5-10"><span class="target" id="change-ba060cbd953a2ef43be8d18f2fd83983"></span>postgres no longer wraps executemany() with individual execute() calls,
2573
instead favoring performance. “rowcount”/”concurrency” checks with
2574
deleted items (which use executemany) are disabled with PG since psycopg2
2575
does not report proper rowcount for executemany().<a class="changeset-link reference internal" href="#change-ba060cbd953a2ef43be8d18f2fd83983">(link)</a><p></p>
2578
<li><p id="change-0.4.0beta5-11"><span class="target" id="change-45d7d861a3365452e7c1d9a6ec39b83c"><strong>[tickets] [fixed] </strong></span><a class="changeset-link reference internal" href="#change-45d7d861a3365452e7c1d9a6ec39b83c">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/742">#742</a></p>
2581
<li><p id="change-0.4.0beta5-12"><span class="target" id="change-45d7d861a3365452e7c1d9a6ec39b83c"><strong>[tickets] [fixed] </strong></span><a class="changeset-link reference internal" href="#change-45d7d861a3365452e7c1d9a6ec39b83c">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/748">#748</a></p>
2584
<li><p id="change-0.4.0beta5-13"><span class="target" id="change-45d7d861a3365452e7c1d9a6ec39b83c"><strong>[tickets] [fixed] </strong></span><a class="changeset-link reference internal" href="#change-45d7d861a3365452e7c1d9a6ec39b83c">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/760">#760</a></p>
2587
<li><p id="change-0.4.0beta5-14"><span class="target" id="change-45d7d861a3365452e7c1d9a6ec39b83c"><strong>[tickets] [fixed] </strong></span><a class="changeset-link reference internal" href="#change-45d7d861a3365452e7c1d9a6ec39b83c">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/762">#762</a></p>
2590
<li><p id="change-0.4.0beta5-15"><span class="target" id="change-45d7d861a3365452e7c1d9a6ec39b83c"><strong>[tickets] [fixed] </strong></span><a class="changeset-link reference internal" href="#change-45d7d861a3365452e7c1d9a6ec39b83c">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/763">#763</a></p>
2595
<div class="section" id="change-0.4.0beta4">
2596
<h2>0.4.0beta4<a class="headerlink" href="#change-0.4.0beta4" title="Permalink to this headline">¶</a></h2>
2597
Released: Wed Aug 22 2007<ul class="simple">
2598
<li><p id="change-0.4.0beta4-0"><span class="target" id="change-16ce819dd53e355c3664e0a6a73d080f"></span>Tidied up what ends up in your namespace when you ‘from sqlalchemy import <a href="#id17"><span class="problematic" id="id18">*</span></a>‘:<a class="changeset-link reference internal" href="#change-16ce819dd53e355c3664e0a6a73d080f">(link)</a><p></p>
2601
<li><p id="change-0.4.0beta4-1"><span class="target" id="change-6890b669137922b1f67f9c81c9e393cd"></span>‘table’ and ‘column’ are no longer imported. They remain available by
2602
direct reference (as in ‘sql.table’ and ‘sql.column’) or a glob import
2603
from the sql package. It was too easy to accidentally use a
2604
sql.expressions.table instead of schema.Table when just starting out
2605
with SQLAlchemy, likewise column.<a class="changeset-link reference internal" href="#change-6890b669137922b1f67f9c81c9e393cd">(link)</a><p></p>
2608
<li><p id="change-0.4.0beta4-2"><span class="target" id="change-2663410f9071b570a253c86fb4d09031"></span>Internal-ish classes like ClauseElement, FromClause, NullTypeEngine,
2609
etc., are also no longer imported into your namespace<a class="changeset-link reference internal" href="#change-2663410f9071b570a253c86fb4d09031">(link)</a><p></p>
2612
<li><p id="change-0.4.0beta4-3"><span class="target" id="change-dca15652477c49266ba58637beea290e"></span>The ‘Smallinteger’ compatiblity name (small i!) is no longer imported,
2613
but remains in schema.py for now. SmallInteger (big I!) is still
2614
imported.<a class="changeset-link reference internal" href="#change-dca15652477c49266ba58637beea290e">(link)</a><p></p>
2617
<li><p id="change-0.4.0beta4-4"><span class="target" id="change-8b98efdb7b0519850778b7118b3c2e6d"></span>The connection pool uses a “threadlocal” strategy internally to return
2618
the same connection already bound to a thread, for “contextual” connections;
2619
these are the connections used when you do a “connectionless” execution
2620
like insert().execute(). This is like a “partial” version of the
2621
“threadlocal” engine strategy but without the thread-local transaction part
2622
of it. We’re hoping it reduces connection pool overhead as well as
2623
database usage. However, if it proves to impact stability in a negative way,
2624
we’ll roll it right back.<a class="changeset-link reference internal" href="#change-8b98efdb7b0519850778b7118b3c2e6d">(link)</a><p></p>
2627
<li><p id="change-0.4.0beta4-5"><span class="target" id="change-acf296f37f99428d8f44ec69e3890aa0"></span>Fix to bind param processing such that “False” values (like blank strings)
2628
still get processed/encoded.<a class="changeset-link reference internal" href="#change-acf296f37f99428d8f44ec69e3890aa0">(link)</a><p></p>
2631
<li><p id="change-0.4.0beta4-6"><span class="target" id="change-401edf6c4209442b8a393d710989444a"></span>Fix to select() “generative” behavior, such that calling column(),
2632
select_from(), correlate(), and with_prefix() does not modify the
2633
original select object<a class="changeset-link reference internal" href="#change-401edf6c4209442b8a393d710989444a">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/752">#752</a></p>
2636
<li><p id="change-0.4.0beta4-7"><span class="target" id="change-954a4eace190252f4ee50417a801d00c"></span>Added a “legacy” adapter to types, such that user-defined TypeEngine
2637
and TypeDecorator classes which define convert_bind_param() and/or
2638
convert_result_value() will continue to function. Also supports
2639
calling the super() version of those methods.<a class="changeset-link reference internal" href="#change-954a4eace190252f4ee50417a801d00c">(link)</a><p></p>
2642
<li><p id="change-0.4.0beta4-8"><span class="target" id="change-044df9e23478cf328cff40782234c4f6"></span>Added session.prune(), trims away instances cached in a session that
2643
are no longer referenced elsewhere. (A utility for strong-ref
2644
identity maps).<a class="changeset-link reference internal" href="#change-044df9e23478cf328cff40782234c4f6">(link)</a><p></p>
2647
<li><p id="change-0.4.0beta4-9"><span class="target" id="change-8d0b91ca4fcfc0ad6d3b9cd553567fba"></span>Added close() method to Transaction. Closes out a transaction using
2648
rollback if it’s the outermost transaction, otherwise just ends
2649
without affecting the outer transaction.<a class="changeset-link reference internal" href="#change-8d0b91ca4fcfc0ad6d3b9cd553567fba">(link)</a><p></p>
2652
<li><p id="change-0.4.0beta4-10"><span class="target" id="change-dfe299aa8afc78c5d63d67f689f3815a"></span>Transactional and non-transactional Session integrates better with
2653
bound connection; a close() will ensure that connection
2654
transactional state is the same as that which existed on it before
2655
being bound to the Session.<a class="changeset-link reference internal" href="#change-dfe299aa8afc78c5d63d67f689f3815a">(link)</a><p></p>
2658
<li><p id="change-0.4.0beta4-11"><span class="target" id="change-dc59c0230dc589d9da18567e46119d37"></span>Modified SQL operator functions to be module-level operators,
2659
allowing SQL expressions to be pickleable.<a class="changeset-link reference internal" href="#change-dc59c0230dc589d9da18567e46119d37">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/735">#735</a></p>
2662
<li><p id="change-0.4.0beta4-12"><span class="target" id="change-91eb02a84f178101962db7b783aa809a"></span>Small adjustment to mapper class.__init__ to allow for Py2.6
2663
object.__init__() behavior.<a class="changeset-link reference internal" href="#change-91eb02a84f178101962db7b783aa809a">(link)</a><p></p>
2666
<li><p id="change-0.4.0beta4-13"><span class="target" id="change-ff553271888137520292109b17a04720"></span>Fixed ‘prefix’ argument for select()<a class="changeset-link reference internal" href="#change-ff553271888137520292109b17a04720">(link)</a><p></p>
2669
<li><p id="change-0.4.0beta4-14"><span class="target" id="change-e4222fd4e054c51dc51cbb0643020566"></span>Connection.begin() no longer accepts nested=True, this logic is now
2670
all in begin_nested().<a class="changeset-link reference internal" href="#change-e4222fd4e054c51dc51cbb0643020566">(link)</a><p></p>
2673
<li><p id="change-0.4.0beta4-15"><span class="target" id="change-678e4addb4b749e32601ce1f3fa4f806"></span>Fixes to new “dynamic” relation loader involving cascades<a class="changeset-link reference internal" href="#change-678e4addb4b749e32601ce1f3fa4f806">(link)</a><p></p>
2676
<li><p id="change-0.4.0beta4-16"><span class="target" id="change-4af6f88998dc3d47b1e2144c8709f9cc"><strong>[tickets] [fixed] </strong></span><a class="changeset-link reference internal" href="#change-4af6f88998dc3d47b1e2144c8709f9cc">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/735">#735</a></p>
2679
<li><p id="change-0.4.0beta4-17"><span class="target" id="change-4af6f88998dc3d47b1e2144c8709f9cc"><strong>[tickets] [fixed] </strong></span><a class="changeset-link reference internal" href="#change-4af6f88998dc3d47b1e2144c8709f9cc">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/752">#752</a></p>
2684
<div class="section" id="change-0.4.0beta3">
2685
<h2>0.4.0beta3<a class="headerlink" href="#change-0.4.0beta3" title="Permalink to this headline">¶</a></h2>
2686
Released: Thu Aug 16 2007<ul class="simple">
2687
<li><p id="change-0.4.0beta3-0"><span class="target" id="change-f5cf19f3f7be3f62710b12ab0c1a7f21"></span>SQL types optimization:<a class="changeset-link reference internal" href="#change-f5cf19f3f7be3f62710b12ab0c1a7f21">(link)</a><p></p>
2690
<li><p id="change-0.4.0beta3-1"><span class="target" id="change-75d0b6d4c9572877034c53d512674299"></span>New performance tests show a combined mass-insert/mass-select test as
2691
having 68% fewer function calls than the same test run against 0.3.<a class="changeset-link reference internal" href="#change-75d0b6d4c9572877034c53d512674299">(link)</a><p></p>
2694
<li><p id="change-0.4.0beta3-2"><span class="target" id="change-b75224a719e77f997a148bc85a071410"></span>General performance improvement of result set iteration is around 10-20%.<a class="changeset-link reference internal" href="#change-b75224a719e77f997a148bc85a071410">(link)</a><p></p>
2697
<li><p id="change-0.4.0beta3-3"><span class="target" id="change-ef940138c452b9816295b5d82d66f548"></span>In types.AbstractType, convert_bind_param() and convert_result_value()
2698
have migrated to callable-returning bind_processor() and
2699
result_processor() methods. If no callable is returned, no pre/post
2700
processing function is called.<a class="changeset-link reference internal" href="#change-ef940138c452b9816295b5d82d66f548">(link)</a><p></p>
2703
<li><p id="change-0.4.0beta3-4"><span class="target" id="change-c35fd87db1a5b5f45a1bf543d34cd61b"></span>Hooks added throughout base/sql/defaults to optimize the calling of bind
2704
aram/result processors so that method call overhead is minimized.<a class="changeset-link reference internal" href="#change-c35fd87db1a5b5f45a1bf543d34cd61b">(link)</a><p></p>
2707
<li><p id="change-0.4.0beta3-5"><span class="target" id="change-c8f92244fa634dc13e7327afd269b6b4"></span>Support added for executemany() scenarios such that unneeded “last row id”
2708
logic doesn’t kick in, parameters aren’t excessively traversed.<a class="changeset-link reference internal" href="#change-c8f92244fa634dc13e7327afd269b6b4">(link)</a><p></p>
2711
<li><p id="change-0.4.0beta3-6"><span class="target" id="change-17bd7748986ad2bd56cfce9a8078756b"></span>Added ‘inherit_foreign_keys’ arg to mapper().<a class="changeset-link reference internal" href="#change-17bd7748986ad2bd56cfce9a8078756b">(link)</a><p></p>
2714
<li><p id="change-0.4.0beta3-7"><span class="target" id="change-dba458ce8601c7fccb26c149512fbe0d"></span>Added support for string date passthrough in sqlite.<a class="changeset-link reference internal" href="#change-dba458ce8601c7fccb26c149512fbe0d">(link)</a><p></p>
2717
<li><p id="change-0.4.0beta3-8"><span class="target" id="change-54e4755a0af97b6ee1bd86616e80216d"><strong>[tickets] [fixed] </strong></span><a class="changeset-link reference internal" href="#change-54e4755a0af97b6ee1bd86616e80216d">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/738">#738</a></p>
2720
<li><p id="change-0.4.0beta3-9"><span class="target" id="change-54e4755a0af97b6ee1bd86616e80216d"><strong>[tickets] [fixed] </strong></span><a class="changeset-link reference internal" href="#change-54e4755a0af97b6ee1bd86616e80216d">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/739">#739</a></p>
2723
<li><p id="change-0.4.0beta3-10"><span class="target" id="change-54e4755a0af97b6ee1bd86616e80216d"><strong>[tickets] [fixed] </strong></span><a class="changeset-link reference internal" href="#change-54e4755a0af97b6ee1bd86616e80216d">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/743">#743</a></p>
2726
<li><p id="change-0.4.0beta3-11"><span class="target" id="change-54e4755a0af97b6ee1bd86616e80216d"><strong>[tickets] [fixed] </strong></span><a class="changeset-link reference internal" href="#change-54e4755a0af97b6ee1bd86616e80216d">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/744">#744</a></p>
2731
<div class="section" id="change-0.4.0beta2">
2732
<h2>0.4.0beta2<a class="headerlink" href="#change-0.4.0beta2" title="Permalink to this headline">¶</a></h2>
2733
Released: Tue Aug 14 2007<div class="section" id="change-0.4.0beta2-oracle">
2734
<h3>oracle<a class="headerlink" href="#change-0.4.0beta2-oracle" title="Permalink to this headline">¶</a></h3>
2736
<li><p id="change-0.4.0beta2-0"><span class="target" id="change-27a03f85e379bb466ed82ab2bae62c14"><strong>[oracle] [improvements.] </strong></span>Auto-commit after LOAD DATA INFILE for mysql.<a class="changeset-link reference internal" href="#change-27a03f85e379bb466ed82ab2bae62c14">(link)</a><p></p>
2739
<li><p id="change-0.4.0beta2-1"><span class="target" id="change-2bfda89d7a3397e856da817c3ebe21ef"><strong>[oracle] [improvements.] </strong></span>A rudimental SessionExtension class has been added, allowing user-defined
2740
functionality to take place at flush(), commit(), and rollback() boundaries.<a class="changeset-link reference internal" href="#change-2bfda89d7a3397e856da817c3ebe21ef">(link)</a><p></p>
2743
<li><p id="change-0.4.0beta2-2"><span class="target" id="change-eead32c9c30ad838d3dd8335b30c3cc5"><strong>[oracle] [improvements.] </strong></span>Added engine_from_config() function for helping to create_engine() from an
2744
.ini style config.<a class="changeset-link reference internal" href="#change-eead32c9c30ad838d3dd8335b30c3cc5">(link)</a><p></p>
2747
<li><p id="change-0.4.0beta2-3"><span class="target" id="change-b0bb14e6d31421d0f6c217f9639275b0"><strong>[oracle] [improvements.] </strong></span>base_mapper() becomes a plain attribute.<a class="changeset-link reference internal" href="#change-b0bb14e6d31421d0f6c217f9639275b0">(link)</a><p></p>
2750
<li><p id="change-0.4.0beta2-4"><span class="target" id="change-15ded3b2513f94c39817cee6f52b785b"><strong>[oracle] [improvements.] </strong></span>session.execute() and scalar() can search for a Table with which to bind from
2751
using the given ClauseElement.<a class="changeset-link reference internal" href="#change-15ded3b2513f94c39817cee6f52b785b">(link)</a><p></p>
2754
<li><p id="change-0.4.0beta2-5"><span class="target" id="change-25c6fb3d43b7dc1f4e87ea3b94d97e32"><strong>[oracle] [improvements.] </strong></span>Session automatically extrapolates tables from mappers with binds, also uses
2755
base_mapper so that inheritance hierarchies bind automatically.<a class="changeset-link reference internal" href="#change-25c6fb3d43b7dc1f4e87ea3b94d97e32">(link)</a><p></p>
2758
<li><p id="change-0.4.0beta2-6"><span class="target" id="change-c8b69249d8076c0cd3f9d71973a0c16f"><strong>[oracle] [improvements.] </strong></span>Moved ClauseVisitor traversal back to inlined non-recursive.<a class="changeset-link reference internal" href="#change-c8b69249d8076c0cd3f9d71973a0c16f">(link)</a><p></p>
2763
<div class="section" id="change-0.4.0beta2-misc">
2764
<h3>misc<a class="headerlink" href="#change-0.4.0beta2-misc" title="Permalink to this headline">¶</a></h3>
2766
<li><p id="change-0.4.0beta2-7"><span class="target" id="change-7f72c630ecf1937ef9e22932a61de352"><strong>[tickets] [fixed] </strong></span><a class="changeset-link reference internal" href="#change-7f72c630ecf1937ef9e22932a61de352">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/730">#730</a></p>
2769
<li><p id="change-0.4.0beta2-8"><span class="target" id="change-7f72c630ecf1937ef9e22932a61de352"><strong>[tickets] [fixed] </strong></span><a class="changeset-link reference internal" href="#change-7f72c630ecf1937ef9e22932a61de352">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/732">#732</a></p>
2772
<li><p id="change-0.4.0beta2-9"><span class="target" id="change-7f72c630ecf1937ef9e22932a61de352"><strong>[tickets] [fixed] </strong></span><a class="changeset-link reference internal" href="#change-7f72c630ecf1937ef9e22932a61de352">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/733">#733</a></p>
2775
<li><p id="change-0.4.0beta2-10"><span class="target" id="change-7f72c630ecf1937ef9e22932a61de352"><strong>[tickets] [fixed] </strong></span><a class="changeset-link reference internal" href="#change-7f72c630ecf1937ef9e22932a61de352">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/734">#734</a></p>
2781
<div class="section" id="change-0.4.0beta1">
2782
<h2>0.4.0beta1<a class="headerlink" href="#change-0.4.0beta1" title="Permalink to this headline">¶</a></h2>
2783
Released: Sun Aug 12 2007<div class="section" id="change-0.4.0beta1-orm">
2784
<h3>orm<a class="headerlink" href="#change-0.4.0beta1-orm" title="Permalink to this headline">¶</a></h3>
2786
<li><p id="change-0.4.0beta1-0"><span class="target" id="change-73240e5294e8bb13d8b6f22802a98b27"><strong>[orm] </strong></span>Speed! Along with recent speedups to ResultProxy, total number of function
2787
calls significantly reduced for large loads.<a class="changeset-link reference internal" href="#change-73240e5294e8bb13d8b6f22802a98b27">(link)</a><p></p>
2790
<li><p id="change-0.4.0beta1-1"><span class="target" id="change-d6d237dcaf791d97938c5d2cb8ebcff0"><strong>[orm] </strong></span>test/perf/masseagerload.py reports 0.4 as having the fewest number of
2791
function calls across all SA versions (0.1, 0.2, and 0.3).<a class="changeset-link reference internal" href="#change-d6d237dcaf791d97938c5d2cb8ebcff0">(link)</a><p></p>
2794
<li><p id="change-0.4.0beta1-2"><span class="target" id="change-4a456a11201666fadfcbbfcb69bd3d5e"><strong>[orm] </strong></span>New collection_class api and implementation. Collections are
2795
now instrumented via decorations rather than proxying. You can now have
2796
collections that manage their own membership, and your class instance will
2797
be directly exposed on the relation property. The changes are transparent
2798
for most users.<a class="changeset-link reference internal" href="#change-4a456a11201666fadfcbbfcb69bd3d5e">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/213">#213</a></p>
2801
<li><p id="change-0.4.0beta1-3"><span class="target" id="change-ac7854a38e375ff1341e8a1b2a022235"><strong>[orm] </strong></span>InstrumentedList (as it was) is removed, and relation properties no
2802
longer have ‘clear()’, ‘.data’, or any other added methods beyond those
2803
provided by the collection type. You are free, of course, to add them to
2804
a custom class.<a class="changeset-link reference internal" href="#change-ac7854a38e375ff1341e8a1b2a022235">(link)</a><p></p>
2807
<li><p id="change-0.4.0beta1-4"><span class="target" id="change-bbebf85d0077a44cbe2ac84913a07d0b"><strong>[orm] </strong></span>__setitem__-like assignments now fire remove events for the existing
2808
value, if any.<a class="changeset-link reference internal" href="#change-bbebf85d0077a44cbe2ac84913a07d0b">(link)</a><p></p>
2811
<li><p id="change-0.4.0beta1-5"><span class="target" id="change-1a0c1db9fbcb17a7c2ba890ea4d9bdc1"><strong>[orm] </strong></span>dict-likes used as collection classes no longer need to change __iter__
2812
semantics- itervalues() is used by default instead. This is a backwards
2813
incompatible change.<a class="changeset-link reference internal" href="#change-1a0c1db9fbcb17a7c2ba890ea4d9bdc1">(link)</a><p></p>
2816
<li><p id="change-0.4.0beta1-6"><span class="target" id="change-12084d2d1417fb4bf746fd0665112f5f"><strong>[orm] </strong></span>Subclassing dict for a mapped collection is no longer needed in most
2817
cases. orm.collections provides canned implementations that key objects
2818
by a specified column or a custom function of your choice.<a class="changeset-link reference internal" href="#change-12084d2d1417fb4bf746fd0665112f5f">(link)</a><p></p>
2821
<li><p id="change-0.4.0beta1-7"><span class="target" id="change-4db3f11e48432727edaead94e272e84a"><strong>[orm] </strong></span>Collection assignment now requires a compatible type- assigning None to
2822
clear a collection or assigning a list to a dict collection will now
2823
raise an argument error.<a class="changeset-link reference internal" href="#change-4db3f11e48432727edaead94e272e84a">(link)</a><p></p>
2826
<li><p id="change-0.4.0beta1-8"><span class="target" id="change-4431e2ff75387079894f22115c2f811e"><strong>[orm] </strong></span>AttributeExtension moved to interfaces, and .delete is now .remove The
2827
event method signature has also been swapped around.<a class="changeset-link reference internal" href="#change-4431e2ff75387079894f22115c2f811e">(link)</a><p></p>
2830
<li><p id="change-0.4.0beta1-9"><span class="target" id="change-e23a2954c9bd9fb1bde4aeceefe5d541"><strong>[orm] </strong></span>Major overhaul for Query:<a class="changeset-link reference internal" href="#change-e23a2954c9bd9fb1bde4aeceefe5d541">(link)</a><p></p>
2833
<li><p id="change-0.4.0beta1-10"><span class="target" id="change-2503ad929a0fe516710bf9a1780fd348"><strong>[orm] </strong></span>All selectXXX methods are deprecated. Generative methods are now the
2834
standard way to do things, i.e. filter(), filter_by(), all(), one(),
2835
etc. Deprecated methods are docstring’ed with their new replacements.<a class="changeset-link reference internal" href="#change-2503ad929a0fe516710bf9a1780fd348">(link)</a><p></p>
2838
<li><p id="change-0.4.0beta1-11"><span class="target" id="change-1693eadbe7a1e73418dc29c3c9f5f383"><strong>[orm] </strong></span>Class-level properties are now usable as query elements... no more
2839
‘.c.’! “Class.c.propname” is now superceded by “Class.propname”. All
2840
clause operators are supported, as well as higher level operators such
2841
as Class.prop==<some instance> for scalar attributes,
2842
Class.prop.contains(<some instance>) and Class.prop.any(<some
2843
expression>) for collection-based attributes (all are also
2844
negatable). Table-based column expressions as well as columns mounted
2845
on mapped classes via ‘c’ are of course still fully available and can be
2846
freely mixed with the new attributes.<a class="changeset-link reference internal" href="#change-1693eadbe7a1e73418dc29c3c9f5f383">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/643">#643</a></p>
2849
<li><p id="change-0.4.0beta1-12"><span class="target" id="change-6a051d0e61d70a59ef63537773b2b738"><strong>[orm] </strong></span>Removed ancient query.select_by_attributename() capability.<a class="changeset-link reference internal" href="#change-6a051d0e61d70a59ef63537773b2b738">(link)</a><p></p>
2852
<li><p id="change-0.4.0beta1-13"><span class="target" id="change-f99a8e52f17864f9bdbcd276ea36c00e"><strong>[orm] </strong></span>The aliasing logic used by eager loading has been generalized, so that
2853
it also adds full automatic aliasing support to Query. It’s no longer
2854
necessary to create an explicit Alias to join to the same tables
2855
multiple times; <em>even for self-referential relationships</em>.<ul>
2856
<li>join() and outerjoin() take arguments “aliased=True”. Yhis causes
2857
their joins to be built on aliased tables; subsequent calls to
2858
filter() and filter_by() will translate all table expressions (yes,
2859
real expressions using the original mapped Table) to be that of the
2860
Alias for the duration of that join() (i.e. until reset_joinpoint() or
2861
another join() is called).</li>
2862
<li>join() and outerjoin() take arguments “id=<somestring>”. When used
2863
with “aliased=True”, the id can be referenced by add_entity(cls,
2864
id=<somestring>) so that you can select the joined instances even if
2865
they’re from an alias.</li>
2866
<li>join() and outerjoin() now work with self-referential relationships!
2867
Using “aliased=True”, you can join as many levels deep as desired,
2868
i.e. query.join([‘children’, ‘children’], aliased=True); filter
2869
criterion will be against the rightmost joined table</li>
2871
<a class="changeset-link reference internal" href="#change-f99a8e52f17864f9bdbcd276ea36c00e">(link)</a><p></p>
2874
<li><p id="change-0.4.0beta1-14"><span class="target" id="change-3f64e9fd6a4f77b6f36bda3cef6dc70c"><strong>[orm] </strong></span>Added query.populate_existing(), marks the query to reload all
2875
attributes and collections of all instances touched in the query,
2876
including eagerly-loaded entities.<a class="changeset-link reference internal" href="#change-3f64e9fd6a4f77b6f36bda3cef6dc70c">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/660">#660</a></p>
2879
<li><p id="change-0.4.0beta1-15"><span class="target" id="change-d588f4a694c199bddb5e48ec5c218e25"><strong>[orm] </strong></span>Added eagerload_all(), allows eagerload_all(‘x.y.z’) to specify eager
2880
loading of all properties in the given path.<a class="changeset-link reference internal" href="#change-d588f4a694c199bddb5e48ec5c218e25">(link)</a><p></p>
2883
<li><p id="change-0.4.0beta1-16"><span class="target" id="change-a392d359411abd1fdd70fd91eee275f6"><strong>[orm] </strong></span>Major overhaul for Session:<a class="changeset-link reference internal" href="#change-a392d359411abd1fdd70fd91eee275f6">(link)</a><p></p>
2886
<li><p id="change-0.4.0beta1-17"><span class="target" id="change-b3a93d1308868a3fe8596d48cba80f96"><strong>[orm] </strong></span>New function which “configures” a session called “sessionmaker()”. Send
2887
various keyword arguments to this function once, returns a new class
2888
which creates a Session against that stereotype.<a class="changeset-link reference internal" href="#change-b3a93d1308868a3fe8596d48cba80f96">(link)</a><p></p>
2891
<li><p id="change-0.4.0beta1-18"><span class="target" id="change-d081429019999b17e12865d77c0fe190"><strong>[orm] </strong></span>SessionTransaction removed from “public” API. You now can call begin()/
2892
commit()/rollback() on the Session itself.<a class="changeset-link reference internal" href="#change-d081429019999b17e12865d77c0fe190">(link)</a><p></p>
2895
<li><p id="change-0.4.0beta1-19"><span class="target" id="change-d803dd5eca36864f998d6bec158fd580"><strong>[orm] </strong></span>Session also supports SAVEPOINT transactions; call begin_nested().<a class="changeset-link reference internal" href="#change-d803dd5eca36864f998d6bec158fd580">(link)</a><p></p>
2898
<li><p id="change-0.4.0beta1-20"><span class="target" id="change-e2ebb386a75361f672fdc4c3c1aa6b9d"><strong>[orm] </strong></span>Session supports two-phase commit behavior when vertically or
2899
horizontally partitioning (i.e., using more than one engine). Use
2900
twophase=True.<a class="changeset-link reference internal" href="#change-e2ebb386a75361f672fdc4c3c1aa6b9d">(link)</a><p></p>
2903
<li><p id="change-0.4.0beta1-21"><span class="target" id="change-9a345bfb97770dff468324795e2f74b4"><strong>[orm] </strong></span>Session flag “transactional=True” produces a session which always places
2904
itself into a transaction when first used. Upon commit(), rollback() or
2905
close(), the transaction ends; but begins again on the next usage.<a class="changeset-link reference internal" href="#change-9a345bfb97770dff468324795e2f74b4">(link)</a><p></p>
2908
<li><p id="change-0.4.0beta1-22"><span class="target" id="change-80cbb51c05d836b884ed1dc60c229fcb"><strong>[orm] </strong></span>Session supports “autoflush=True”. This issues a flush() before each
2909
query. Use in conjunction with transactional, and you can just
2910
save()/update() and then query, the new objects will be there. Use
2911
commit() at the end (or flush() if non-transactional) to flush remaining
2912
changes.<a class="changeset-link reference internal" href="#change-80cbb51c05d836b884ed1dc60c229fcb">(link)</a><p></p>
2915
<li><p id="change-0.4.0beta1-23"><span class="target" id="change-7e824e1c9899b1998d251013e315f0d0"><strong>[orm] </strong></span>New scoped_session() function replaces SessionContext and assignmapper.
2916
Builds onto “sessionmaker()” concept to produce a class whos Session()
2917
construction returns the thread-local session. Or, call all Session
2918
methods as class methods, i.e. Session.save(foo); Session.commit().
2919
just like the old “objectstore” days.<a class="changeset-link reference internal" href="#change-7e824e1c9899b1998d251013e315f0d0">(link)</a><p></p>
2922
<li><p id="change-0.4.0beta1-24"><span class="target" id="change-750a1ea55476904ec3c0c11ffc957b4c"><strong>[orm] </strong></span>Added new “binds” argument to Session to support configuration of
2923
multiple binds with sessionmaker() function.<a class="changeset-link reference internal" href="#change-750a1ea55476904ec3c0c11ffc957b4c">(link)</a><p></p>
2926
<li><p id="change-0.4.0beta1-25"><span class="target" id="change-a7615aa7295fda4b76a5dc6b9ad79844"><strong>[orm] </strong></span>A rudimental SessionExtension class has been added, allowing
2927
user-defined functionality to take place at flush(), commit(), and
2928
rollback() boundaries.<a class="changeset-link reference internal" href="#change-a7615aa7295fda4b76a5dc6b9ad79844">(link)</a><p></p>
2931
<li><p id="change-0.4.0beta1-26"><span class="target" id="change-9bd37da16a971ed83453125c1b474094"><strong>[orm] </strong></span>Query-based relation()s available with dynamic_loader(). This is a
2932
<em>writable</em> collection (supporting append() and remove()) which is also a
2933
live Query object when accessed for reads. Ideal for dealing with very
2934
large collections where only partial loading is desired.<a class="changeset-link reference internal" href="#change-9bd37da16a971ed83453125c1b474094">(link)</a><p></p>
2937
<li><p id="change-0.4.0beta1-27"><span class="target" id="change-f765c92d74ee81bbf71b692a95131664"><strong>[orm] </strong></span>flush()-embedded inline INSERT/UPDATE expressions. Assign any SQL
2938
expression, like “sometable.c.column + 1”, to an instance’s attribute.
2939
Upon flush(), the mapper detects the expression and embeds it directly in
2940
the INSERT or UPDATE statement; the attribute gets deferred on the
2941
instance so it loads the new value the next time you access it.<a class="changeset-link reference internal" href="#change-f765c92d74ee81bbf71b692a95131664">(link)</a><p></p>
2944
<li><p id="change-0.4.0beta1-28"><span class="target" id="change-e9bf598b4653d8e6c0b87142da0e83bd"><strong>[orm] </strong></span>A rudimental sharding (horizontal scaling) system is introduced. This
2945
system uses a modified Session which can distribute read and write
2946
operations among multiple databases, based on user-defined functions
2947
defining the “sharding strategy”. Instances and their dependents can be
2948
distributed and queried among multiple databases based on attribute
2949
values, round-robin approaches or any other user-defined
2950
system.<a class="changeset-link reference internal" href="#change-e9bf598b4653d8e6c0b87142da0e83bd">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/618">#618</a></p>
2953
<li><p id="change-0.4.0beta1-29"><span class="target" id="change-a02e26a19bf5a4351869a565aed6dbd4"><strong>[orm] </strong></span>Eager loading has been enhanced to allow even more joins in more places.
2954
It now functions at any arbitrary depth along self-referential and
2955
cyclical structures. When loading cyclical structures, specify
2956
“join_depth” on relation() indicating how many times you’d like the table
2957
to join to itself; each level gets a distinct table alias. The alias
2958
names themselves are generated at compile time using a simple counting
2959
scheme now and are a lot easier on the eyes, as well as of course
2960
completely deterministic.<a class="changeset-link reference internal" href="#change-a02e26a19bf5a4351869a565aed6dbd4">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/659">#659</a></p>
2963
<li><p id="change-0.4.0beta1-30"><span class="target" id="change-3ee39648a350e0ce7f6e88a460ef4222"><strong>[orm] </strong></span>Added composite column properties. This allows you to create a type which
2964
is represented by more than one column, when using the ORM. Objects of
2965
the new type are fully functional in query expressions, comparisons,
2966
query.get() clauses, etc. and act as though they are regular single-column
2967
scalars... except they’re not! Use the function composite(cls, <a href="#id19"><span class="problematic" id="id20">*</span></a>columns)
2968
inside of the mapper’s “properties” dict, and instances of cls will be
2969
created/mapped to a single attribute, comprised of the values correponding
2970
to <a href="#id21"><span class="problematic" id="id22">*</span></a>columns.<a class="changeset-link reference internal" href="#change-3ee39648a350e0ce7f6e88a460ef4222">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/211">#211</a></p>
2973
<li><p id="change-0.4.0beta1-31"><span class="target" id="change-5e44b305ff3b453bab31a4f4dd315202"><strong>[orm] </strong></span>Improved support for custom column_property() attributes which feature
2974
correlated subqueries, works better with eager loading now.<a class="changeset-link reference internal" href="#change-5e44b305ff3b453bab31a4f4dd315202">(link)</a><p></p>
2977
<li><p id="change-0.4.0beta1-32"><span class="target" id="change-16479493bb7436bccac47ec4d52aa7ab"><strong>[orm] </strong></span>Primary key “collapse” behavior; the mapper will analyze all columns in
2978
its given selectable for primary key “equivalence”, that is, columns which
2979
are equivalent via foreign key relationship or via an explicit
2980
inherit_condition. primarily for joined-table inheritance scenarios where
2981
different named PK columns in inheriting tables should “collapse” into a
2982
single-valued (or fewer-valued) primary key. Fixes things like.<a class="changeset-link reference internal" href="#change-16479493bb7436bccac47ec4d52aa7ab">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/611">#611</a></p>
2985
<li><p id="change-0.4.0beta1-33"><span class="target" id="change-8b14a583258b389d8befb88ffab4616e"><strong>[orm] </strong></span>Joined-table inheritance will now generate the primary key columns of all
2986
inherited classes against the root table of the join only. This implies
2987
that each row in the root table is distinct to a single instance. If for
2988
some rare reason this is not desireable, explicit primary_key settings on
2989
individual mappers will override it.<a class="changeset-link reference internal" href="#change-8b14a583258b389d8befb88ffab4616e">(link)</a><p></p>
2992
<li><p id="change-0.4.0beta1-34"><span class="target" id="change-5ecb81bd3049827ea00f874dff8a47e2"><strong>[orm] </strong></span>When “polymorphic” flags are used with joined-table or single-table
2993
inheritance, all identity keys are generated against the root class of the
2994
inheritance hierarchy; this allows query.get() to work polymorphically
2995
using the same caching semantics as a non-polymorphic get. Note that this
2996
currently does not work with concrete inheritance.<a class="changeset-link reference internal" href="#change-5ecb81bd3049827ea00f874dff8a47e2">(link)</a><p></p>
2999
<li><p id="change-0.4.0beta1-35"><span class="target" id="change-b92f42ac37b868e4e25064ca4b5d334d"><strong>[orm] </strong></span>Secondary inheritance loading: polymorphic mappers can be constructed
3000
<em>without</em> a select_table argument. inheriting mappers whose tables were
3001
not represented in the initial load will issue a second SQL query
3002
immediately, once per instance (i.e. not very efficient for large lists),
3003
in order to load the remaining columns.<a class="changeset-link reference internal" href="#change-b92f42ac37b868e4e25064ca4b5d334d">(link)</a><p></p>
3006
<li><p id="change-0.4.0beta1-36"><span class="target" id="change-e17dea4885205655b3c0e9dc601c5577"><strong>[orm] </strong></span>Secondary inheritance loading can also move its second query into a
3007
column-level “deferred” load, via the “polymorphic_fetch” argument, which
3008
can be set to ‘select’ or ‘deferred’<a class="changeset-link reference internal" href="#change-e17dea4885205655b3c0e9dc601c5577">(link)</a><p></p>
3011
<li><p id="change-0.4.0beta1-37"><span class="target" id="change-ba1a26695302fe5a0797ba0c2382d86e"><strong>[orm] </strong></span>It’s now possible to map only a subset of available selectable columns
3012
onto mapper properties, using include_columns/exclude_columns..<a class="changeset-link reference internal" href="#change-ba1a26695302fe5a0797ba0c2382d86e">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/696">#696</a></p>
3015
<li><p id="change-0.4.0beta1-38"><span class="target" id="change-d0fafbe316e5579935f88cf76fc3be57"><strong>[orm] </strong></span>Added undefer_group() MapperOption, sets a set of “deferred” columns
3016
joined by a “group” to load as “undeferred”.<a class="changeset-link reference internal" href="#change-d0fafbe316e5579935f88cf76fc3be57">(link)</a><p></p>
3019
<li><p id="change-0.4.0beta1-39"><span class="target" id="change-c76aef44f5e7e8717c85b529552921fa"><strong>[orm] </strong></span>Rewrite of the “deterministic alias name” logic to be part of the SQL
3020
layer, produces much simpler alias and label names more in the style of
3021
Hibernate<a class="changeset-link reference internal" href="#change-c76aef44f5e7e8717c85b529552921fa">(link)</a><p></p>
3026
<div class="section" id="change-0.4.0beta1-sql">
3027
<h3>sql<a class="headerlink" href="#change-0.4.0beta1-sql" title="Permalink to this headline">¶</a></h3>
3029
<li><p id="change-0.4.0beta1-40"><span class="target" id="change-194d03e759795cb2ff68bbe9af23b306"><strong>[sql] </strong></span>Speed! Clause compilation as well as the mechanics of SQL constructs have
3030
been streamlined and simplified to a signficant degree, for a 20-30%
3031
improvement of the statement construction/compilation overhead of 0.3.<a class="changeset-link reference internal" href="#change-194d03e759795cb2ff68bbe9af23b306">(link)</a><p></p>
3034
<li><p id="change-0.4.0beta1-41"><span class="target" id="change-78c937a453ae2a2e9d60a9d7a1b498ac"><strong>[sql] </strong></span>All “type” keyword arguments, such as those to bindparam(), column(),
3035
Column(), and func.<something>(), renamed to “<a href="#id25"><span class="problematic" id="id26">type_</span></a>”. Those objects still
3036
name their “type” attribute as “type”.<a class="changeset-link reference internal" href="#change-78c937a453ae2a2e9d60a9d7a1b498ac">(link)</a><p></p>
3039
<li><p id="change-0.4.0beta1-42"><span class="target" id="change-52f227bbb5a90b801adc6ecfd0cc6e3a"><strong>[sql] </strong></span>case_sensitive=(True|False) setting removed from schema items, since
3040
checking this state added a lot of method call overhead and there was no
3041
decent reason to ever set it to False. Table and column names which are
3042
all lower case will be treated as case-insenstive (yes we adjust for
3043
Oracle’s UPPERCASE style too).<a class="changeset-link reference internal" href="#change-52f227bbb5a90b801adc6ecfd0cc6e3a">(link)</a><p></p>
3048
<div class="section" id="change-0.4.0beta1-mysql">
3049
<h3>mysql<a class="headerlink" href="#change-0.4.0beta1-mysql" title="Permalink to this headline">¶</a></h3>
3051
<li><p id="change-0.4.0beta1-43"><span class="target" id="change-c9ff316cda3e7c6e32e67deee9bdb175"><strong>[mysql] </strong></span>Table and column names loaded via reflection are now Unicode.<a class="changeset-link reference internal" href="#change-c9ff316cda3e7c6e32e67deee9bdb175">(link)</a><p></p>
3054
<li><p id="change-0.4.0beta1-44"><span class="target" id="change-4db25c57037e2e33e840cb086dca3781"><strong>[mysql] </strong></span>All standard column types are now supported, including SET.<a class="changeset-link reference internal" href="#change-4db25c57037e2e33e840cb086dca3781">(link)</a><p></p>
3057
<li><p id="change-0.4.0beta1-45"><span class="target" id="change-5117b0e81758578c4222aa8bbd429983"><strong>[mysql] </strong></span>Table reflection can now be performed in as little as one round-trip.<a class="changeset-link reference internal" href="#change-5117b0e81758578c4222aa8bbd429983">(link)</a><p></p>
3060
<li><p id="change-0.4.0beta1-46"><span class="target" id="change-a5b4e4cd9830ca04727e6cc01578d944"><strong>[mysql] </strong></span>ANSI and ANSI_QUOTES sql modes are now supported.<a class="changeset-link reference internal" href="#change-a5b4e4cd9830ca04727e6cc01578d944">(link)</a><p></p>
3063
<li><p id="change-0.4.0beta1-47"><span class="target" id="change-3b4260991961474e8042e1a66c9f73b0"><strong>[mysql] </strong></span>Indexes are now reflected.<a class="changeset-link reference internal" href="#change-3b4260991961474e8042e1a66c9f73b0">(link)</a><p></p>
3068
<div class="section" id="change-0.4.0beta1-oracle">
3069
<h3>oracle<a class="headerlink" href="#change-0.4.0beta1-oracle" title="Permalink to this headline">¶</a></h3>
3071
<li><p id="change-0.4.0beta1-48"><span class="target" id="change-cf0060d4bbf9e676c4a7c5beb5f02382"><strong>[oracle] </strong></span>Very rudimental support for OUT parameters added; use sql.outparam(name,
3072
type) to set up an OUT parameter, just like bindparam(); after execution,
3073
values are avaiable via result.out_parameters dictionary.<a class="changeset-link reference internal" href="#change-cf0060d4bbf9e676c4a7c5beb5f02382">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/507">#507</a></p>
3078
<div class="section" id="change-0.4.0beta1-misc">
3079
<h3>misc<a class="headerlink" href="#change-0.4.0beta1-misc" title="Permalink to this headline">¶</a></h3>
3081
<li><p id="change-0.4.0beta1-49"><span class="target" id="change-ef7a1ed2659338f4b08899b9caaab99b"><strong>[transactions] </strong></span>Added context manager (with statement) support for transactions.<a class="changeset-link reference internal" href="#change-ef7a1ed2659338f4b08899b9caaab99b">(link)</a><p></p>
3084
<li><p id="change-0.4.0beta1-50"><span class="target" id="change-c77644da7acda73068dc7396e5f398af"><strong>[transactions] </strong></span>Added support for two phase commit, works with mysql and postgres so far.<a class="changeset-link reference internal" href="#change-c77644da7acda73068dc7396e5f398af">(link)</a><p></p>
3087
<li><p id="change-0.4.0beta1-51"><span class="target" id="change-df709470ae31b3f45008bbaa141d6d2c"><strong>[transactions] </strong></span>Added a subtransaction implementation that uses savepoints.<a class="changeset-link reference internal" href="#change-df709470ae31b3f45008bbaa141d6d2c">(link)</a><p></p>
3090
<li><p id="change-0.4.0beta1-52"><span class="target" id="change-8ade1ccb1059d3677b8b76a06a346099"><strong>[transactions] </strong></span>Added support for savepoints.<a class="changeset-link reference internal" href="#change-8ade1ccb1059d3677b8b76a06a346099">(link)</a><p></p>
3093
<li><p id="change-0.4.0beta1-53"><span class="target" id="change-57d0fe83f069aa4fcd55bfbfe003c8f0"><strong>[metadata] </strong></span>Tables can be reflected from the database en-masse without declaring
3094
them in advance. MetaData(engine, reflect=True) will load all tables
3095
present in the database, or use metadata.reflect() for finer control.<a class="changeset-link reference internal" href="#change-57d0fe83f069aa4fcd55bfbfe003c8f0">(link)</a><p></p>
3098
<li><p id="change-0.4.0beta1-54"><span class="target" id="change-c614e9a639adda152c6ab95d984bf7d5"><strong>[metadata] </strong></span>DynamicMetaData has been renamed to ThreadLocalMetaData<a class="changeset-link reference internal" href="#change-c614e9a639adda152c6ab95d984bf7d5">(link)</a><p></p>
3101
<li><p id="change-0.4.0beta1-55"><span class="target" id="change-ec45f540628c12b33729f88a7567a8d3"><strong>[metadata] </strong></span>The ThreadLocalMetaData constructor now takes no arguments.<a class="changeset-link reference internal" href="#change-ec45f540628c12b33729f88a7567a8d3">(link)</a><p></p>
3104
<li><p id="change-0.4.0beta1-56"><span class="target" id="change-df3a2a76ccedf6eff1bec3c34ea2c717"><strong>[metadata] </strong></span>BoundMetaData has been removed- regular MetaData is equivalent<a class="changeset-link reference internal" href="#change-df3a2a76ccedf6eff1bec3c34ea2c717">(link)</a><p></p>
3107
<li><p id="change-0.4.0beta1-57"><span class="target" id="change-91306d19b451219b417b42a60215a684"><strong>[metadata] </strong></span>Numeric and Float types now have an “asdecimal” flag; defaults to True for
3108
Numeric, False for Float. When True, values are returned as
3109
decimal.Decimal objects; when False, values are returned as float(). The
3110
defaults of True/False are already the behavior for PG and MySQL’s DBAPI
3111
modules.<a class="changeset-link reference internal" href="#change-91306d19b451219b417b42a60215a684">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/646">#646</a></p>
3114
<li><p id="change-0.4.0beta1-58"><span class="target" id="change-08e4ad114c618cb250f9f7dfd398ee15"><strong>[metadata] </strong></span>New SQL operator implementation which removes all hardcoded operators from
3115
expression structures and moves them into compilation; allows greater
3116
flexibility of operator compilation; for example, “+” compiles to “||”
3117
when used in a string context, or “concat(a,b)” on MySQL; whereas in a
3118
numeric context it compiles to “+”. Fixes.<a class="changeset-link reference internal" href="#change-08e4ad114c618cb250f9f7dfd398ee15">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/475">#475</a></p>
3121
<li><p id="change-0.4.0beta1-59"><span class="target" id="change-b3b40957f331feb3c0753ba57969930d"><strong>[metadata] </strong></span>“Anonymous” alias and label names are now generated at SQL compilation
3122
time in a completely deterministic fashion... no more random hex IDs<a class="changeset-link reference internal" href="#change-b3b40957f331feb3c0753ba57969930d">(link)</a><p></p>
3125
<li><p id="change-0.4.0beta1-60"><span class="target" id="change-e48f6937efaa01d2cb93a212c539a175"><strong>[metadata] </strong></span>Significant architectural overhaul to SQL elements (ClauseElement). All
3126
elements share a common “mutability” framework which allows a consistent
3127
approach to in-place modifications of elements as well as generative
3128
behavior. Improves stability of the ORM which makes heavy usage of
3129
mutations to SQL expressions.<a class="changeset-link reference internal" href="#change-e48f6937efaa01d2cb93a212c539a175">(link)</a><p></p>
3132
<li><p id="change-0.4.0beta1-61"><span class="target" id="change-14a7a270d71f45154959854f228c79f8"><strong>[metadata] </strong></span>select() and union()’s now have “generative” behavior. Methods like
3133
order_by() and group_by() return a <em>new</em> instance - the original instance
3134
is left unchanged. Non-generative methods remain as well.<a class="changeset-link reference internal" href="#change-14a7a270d71f45154959854f228c79f8">(link)</a><p></p>
3137
<li><p id="change-0.4.0beta1-62"><span class="target" id="change-b2f095c257ecd4fc1b70ea9343fab060"><strong>[metadata] </strong></span>The internals of select/union vastly simplified- all decision making
3138
regarding “is subquery” and “correlation” pushed to SQL generation phase.
3139
select() elements are now <em>never</em> mutated by their enclosing containers or
3140
by any dialect’s compilation process<a class="changeset-link reference internal" href="#change-b2f095c257ecd4fc1b70ea9343fab060">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/569">#569</a>, <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/52">#52</a></p>
3143
<li><p id="change-0.4.0beta1-63"><span class="target" id="change-cd01f4b5a2b4d78a16a7b4d48f5c73f0"><strong>[metadata] </strong></span>select(scalar=True) argument is deprecated; use select(..).as_scalar().
3144
The resulting object obeys the full “column” interface and plays better
3145
within expressions.<a class="changeset-link reference internal" href="#change-cd01f4b5a2b4d78a16a7b4d48f5c73f0">(link)</a><p></p>
3148
<li><p id="change-0.4.0beta1-64"><span class="target" id="change-10b500c2c9cba9a5927217ff7420f2b0"><strong>[metadata] </strong></span>Added select().with_prefix(‘foo’) allowing any set of keywords to be
3149
placed before the columns clause of the SELECT<a class="changeset-link reference internal" href="#change-10b500c2c9cba9a5927217ff7420f2b0">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/504">#504</a></p>
3152
<li><p id="change-0.4.0beta1-65"><span class="target" id="change-df8444af8624fed7a285c5b7bf482a29"><strong>[metadata] </strong></span>Added array slice support to row[<index>]<a class="changeset-link reference internal" href="#change-df8444af8624fed7a285c5b7bf482a29">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/686">#686</a></p>
3155
<li><p id="change-0.4.0beta1-66"><span class="target" id="change-071fcdfe4ff56a5b234d1de2137bbf1d"><strong>[metadata] </strong></span>Result sets make a better attempt at matching the DBAPI types present in
3156
cursor.description to the TypeEngine objects defined by the dialect, which
3157
are then used for result-processing. Note this only takes effect for
3158
textual SQL; constructed SQL statements always have an explicit type map.<a class="changeset-link reference internal" href="#change-071fcdfe4ff56a5b234d1de2137bbf1d">(link)</a><p></p>
3161
<li><p id="change-0.4.0beta1-67"><span class="target" id="change-5df181a5d5e28fb2cade70322001e596"><strong>[metadata] </strong></span>Result sets from CRUD operations close their underlying cursor immediately
3162
and will also autoclose the connection if defined for the operation; this
3163
allows more efficient usage of connections for successive CRUD operations
3164
with less chance of “dangling connections”.<a class="changeset-link reference internal" href="#change-5df181a5d5e28fb2cade70322001e596">(link)</a><p></p>
3167
<li><p id="change-0.4.0beta1-68"><span class="target" id="change-89948a9f39a2ae2cba3dc69fc35f2d88"><strong>[metadata] </strong></span>Column defaults and onupdate Python functions (i.e. passed to
3168
ColumnDefault) may take zero or one arguments; the one argument is the
3169
ExecutionContext, from which you can call “context.parameters[someparam]”
3170
to access the other bind parameter values affixed to the statement. The connection used for the execution is available as well
3171
so that you can pre-execute statements.<a class="changeset-link reference internal" href="#change-89948a9f39a2ae2cba3dc69fc35f2d88">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/559">#559</a></p>
3174
<li><p id="change-0.4.0beta1-69"><span class="target" id="change-3424c25ad26ee106ba392edc6c3a817c"><strong>[metadata] </strong></span>Added “explcit” create/drop/execute support for sequences (i.e. you can
3175
pass a “connectable” to each of those methods on Sequence).<a class="changeset-link reference internal" href="#change-3424c25ad26ee106ba392edc6c3a817c">(link)</a><p></p>
3178
<li><p id="change-0.4.0beta1-70"><span class="target" id="change-7bb1f65298c3ca1debf3d2f941ac1247"><strong>[metadata] </strong></span>Better quoting of identifiers when manipulating schemas.<a class="changeset-link reference internal" href="#change-7bb1f65298c3ca1debf3d2f941ac1247">(link)</a><p></p>
3181
<li><p id="change-0.4.0beta1-71"><span class="target" id="change-35fdc74c58ccab72b6a95ed3fd9c27bd"><strong>[metadata] </strong></span>Standardized the behavior for table reflection where types can’t be
3182
located; NullType is substituted instead, warning is raised.<a class="changeset-link reference internal" href="#change-35fdc74c58ccab72b6a95ed3fd9c27bd">(link)</a><p></p>
3185
<li><p id="change-0.4.0beta1-72"><span class="target" id="change-91634a26453429e65ac127027572ca43"><strong>[metadata] </strong></span>ColumnCollection (i.e. the ‘c’ attribute on tables) follows dictionary
3186
semantics for “__contains__”<a class="changeset-link reference internal" href="#change-91634a26453429e65ac127027572ca43">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/606">#606</a></p>
3189
<li><p id="change-0.4.0beta1-73"><span class="target" id="change-c2feef689fd707ec3da5f884a6aa2987"><strong>[engines] </strong></span>Speed! The mechanics of result processing and bind parameter processing
3190
have been overhauled, streamlined and optimized to issue as little method
3191
calls as possible. Bench tests for mass INSERT and mass rowset iteration
3192
both show 0.4 to be over twice as fast as 0.3, using 68% fewer function
3193
calls.<a class="changeset-link reference internal" href="#change-c2feef689fd707ec3da5f884a6aa2987">(link)</a><p></p>
3196
<li><p id="change-0.4.0beta1-74"><span class="target" id="change-dbcb4c5e8906eb7ab54649e1e2eee3e6"><strong>[engines] </strong></span>You can now hook into the pool lifecycle and run SQL statements or other
3197
logic at new each DBAPI connection, pool check-out and check-in.<a class="changeset-link reference internal" href="#change-dbcb4c5e8906eb7ab54649e1e2eee3e6">(link)</a><p></p>
3200
<li><p id="change-0.4.0beta1-75"><span class="target" id="change-fd980057fb18ce87420a619497401906"><strong>[engines] </strong></span>Connections gain a .properties collection, with contents scoped to the
3201
lifetime of the underlying DBAPI connection<a class="changeset-link reference internal" href="#change-fd980057fb18ce87420a619497401906">(link)</a><p></p>
3204
<li><p id="change-0.4.0beta1-76"><span class="target" id="change-7db700fb15caca564e6d1b470ddbf1c7"><strong>[engines] </strong></span>Removed auto_close_cursors and disallow_open_cursors arguments from Pool;
3205
reduces overhead as cursors are normally closed by ResultProxy and
3206
Connection.<a class="changeset-link reference internal" href="#change-7db700fb15caca564e6d1b470ddbf1c7">(link)</a><p></p>
3209
<li><p id="change-0.4.0beta1-77"><span class="target" id="change-3b532a60bc0029ec354daf934d3a927a"><strong>[extensions] </strong></span>proxyengine is temporarily removed, pending an actually working
3210
replacement.<a class="changeset-link reference internal" href="#change-3b532a60bc0029ec354daf934d3a927a">(link)</a><p></p>
3213
<li><p id="change-0.4.0beta1-78"><span class="target" id="change-4365514b9b0ac1a9bf2782c1798256a6"><strong>[extensions] </strong></span>SelectResults has been replaced by Query. SelectResults /
3214
SelectResultsExt still exist but just return a slightly modified Query
3215
object for backwards-compatibility. join_to() method from SelectResults
3216
isn’t present anymore, need to use join().<a class="changeset-link reference internal" href="#change-4365514b9b0ac1a9bf2782c1798256a6">(link)</a><p></p>
3219
<li><p id="change-0.4.0beta1-79"><span class="target" id="change-bf48335461a856fcc94af29e957c22d2"><strong>[postgres] </strong></span>Added PGArray datatype for using postgres array datatypes.<a class="changeset-link reference internal" href="#change-bf48335461a856fcc94af29e957c22d2">(link)</a><p></p>
3231
<div id="docs-bottom-navigation" class="docs-navigation-links">
3233
<a href="changelog_05.html" title="previous chapter">0.5 Changelog</a>
3235
<a href="changelog_03.html" title="next chapter">0.3 Changelog</a>
3237
<div id="docs-copyright">
3238
© <a href="../copyright.html">Copyright</a> 2007-2013, the SQLAlchemy authors and contributors.
3239
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.