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.5 Changelog" href="changelog_05.html" />
38
<link rel="prev" title="0.7 Changelog" href="changelog_07.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_07.html" title="previous chapter">0.7 Changelog</a>
84
<a href="changelog_05.html" title="next chapter">0.5 Changelog</a>
88
<a href="../contents.html">Table of Contents</a> |
89
<a href="../genindex.html">Index</a>
90
| <a href="../_sources/changelog/changelog_06.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.6 Changelog</a><ul>
117
<li><a class="reference internal" href="#change-0.6.9">0.6.9</a><ul>
118
<li><a class="reference internal" href="#change-0.6.9-general">general</a></li>
119
<li><a class="reference internal" href="#change-0.6.9-orm">orm</a></li>
120
<li><a class="reference internal" href="#change-0.6.9-engine">engine</a></li>
121
<li><a class="reference internal" href="#change-0.6.9-sql">sql</a></li>
122
<li><a class="reference internal" href="#change-0.6.9-schema">schema</a></li>
123
<li><a class="reference internal" href="#change-0.6.9-postgresql">postgresql</a></li>
124
<li><a class="reference internal" href="#change-0.6.9-mysql">mysql</a></li>
125
<li><a class="reference internal" href="#change-0.6.9-mssql">mssql</a></li>
126
<li><a class="reference internal" href="#change-0.6.9-oracle">oracle</a></li>
127
<li><a class="reference internal" href="#change-0.6.9-misc">misc</a></li>
130
<li><a class="reference internal" href="#change-0.6.8">0.6.8</a><ul>
131
<li><a class="reference internal" href="#change-0.6.8-orm">orm</a></li>
132
<li><a class="reference internal" href="#change-0.6.8-engine">engine</a></li>
133
<li><a class="reference internal" href="#change-0.6.8-sql">sql</a></li>
134
<li><a class="reference internal" href="#change-0.6.8-postgresql">postgresql</a></li>
135
<li><a class="reference internal" href="#change-0.6.8-mssql">mssql</a></li>
138
<li><a class="reference internal" href="#change-0.6.7">0.6.7</a><ul>
139
<li><a class="reference internal" href="#change-0.6.7-orm">orm</a></li>
140
<li><a class="reference internal" href="#change-0.6.7-orm-declarative">orm declarative</a></li>
141
<li><a class="reference internal" href="#change-0.6.7-engine">engine</a></li>
142
<li><a class="reference internal" href="#change-0.6.7-sql">sql</a></li>
143
<li><a class="reference internal" href="#change-0.6.7-postgresql">postgresql</a></li>
144
<li><a class="reference internal" href="#change-0.6.7-mysql">mysql</a></li>
145
<li><a class="reference internal" href="#change-0.6.7-sqlite">sqlite</a></li>
146
<li><a class="reference internal" href="#change-0.6.7-mssql">mssql</a></li>
147
<li><a class="reference internal" href="#change-0.6.7-oracle">oracle</a></li>
148
<li><a class="reference internal" href="#change-0.6.7-firebird">firebird</a></li>
149
<li><a class="reference internal" href="#change-0.6.7-misc">misc</a></li>
152
<li><a class="reference internal" href="#change-0.6.6">0.6.6</a><ul>
153
<li><a class="reference internal" href="#change-0.6.6-orm">orm</a></li>
154
<li><a class="reference internal" href="#change-0.6.6-orm-declarative">orm declarative</a></li>
155
<li><a class="reference internal" href="#change-0.6.6-engine">engine</a></li>
156
<li><a class="reference internal" href="#change-0.6.6-sql">sql</a></li>
157
<li><a class="reference internal" href="#change-0.6.6-postgresql">postgresql</a></li>
158
<li><a class="reference internal" href="#change-0.6.6-mysql">mysql</a></li>
159
<li><a class="reference internal" href="#change-0.6.6-sqlite">sqlite</a></li>
160
<li><a class="reference internal" href="#change-0.6.6-mssql">mssql</a></li>
161
<li><a class="reference internal" href="#change-0.6.6-oracle">oracle</a></li>
162
<li><a class="reference internal" href="#change-0.6.6-firebird">firebird</a></li>
163
<li><a class="reference internal" href="#change-0.6.6-misc">misc</a></li>
166
<li><a class="reference internal" href="#change-0.6.5">0.6.5</a><ul>
167
<li><a class="reference internal" href="#change-0.6.5-orm">orm</a></li>
168
<li><a class="reference internal" href="#change-0.6.5-orm-declarative">orm declarative</a></li>
169
<li><a class="reference internal" href="#change-0.6.5-engine">engine</a></li>
170
<li><a class="reference internal" href="#change-0.6.5-sql">sql</a></li>
171
<li><a class="reference internal" href="#change-0.6.5-postgresql">postgresql</a></li>
172
<li><a class="reference internal" href="#change-0.6.5-mysql">mysql</a></li>
173
<li><a class="reference internal" href="#change-0.6.5-mssql">mssql</a></li>
174
<li><a class="reference internal" href="#change-0.6.5-oracle">oracle</a></li>
175
<li><a class="reference internal" href="#change-0.6.5-misc">misc</a></li>
178
<li><a class="reference internal" href="#change-0.6.4">0.6.4</a><ul>
179
<li><a class="reference internal" href="#change-0.6.4-orm">orm</a></li>
180
<li><a class="reference internal" href="#change-0.6.4-orm-declarative">orm declarative</a></li>
181
<li><a class="reference internal" href="#change-0.6.4-engine">engine</a></li>
182
<li><a class="reference internal" href="#change-0.6.4-sql">sql</a></li>
183
<li><a class="reference internal" href="#change-0.6.4-postgresql">postgresql</a></li>
184
<li><a class="reference internal" href="#change-0.6.4-mssql">mssql</a></li>
185
<li><a class="reference internal" href="#change-0.6.4-oracle">oracle</a></li>
186
<li><a class="reference internal" href="#change-0.6.4-firebird">firebird</a></li>
187
<li><a class="reference internal" href="#change-0.6.4-misc">misc</a></li>
190
<li><a class="reference internal" href="#change-0.6.3">0.6.3</a><ul>
191
<li><a class="reference internal" href="#change-0.6.3-orm">orm</a></li>
192
<li><a class="reference internal" href="#change-0.6.3-mysql">mysql</a></li>
193
<li><a class="reference internal" href="#change-0.6.3-oracle">oracle</a></li>
196
<li><a class="reference internal" href="#change-0.6.2">0.6.2</a><ul>
197
<li><a class="reference internal" href="#change-0.6.2-orm">orm</a></li>
198
<li><a class="reference internal" href="#change-0.6.2-orm-declarative">orm declarative</a></li>
199
<li><a class="reference internal" href="#change-0.6.2-sql">sql</a></li>
200
<li><a class="reference internal" href="#change-0.6.2-postgresql">postgresql</a></li>
201
<li><a class="reference internal" href="#change-0.6.2-mysql">mysql</a></li>
202
<li><a class="reference internal" href="#change-0.6.2-mssql">mssql</a></li>
203
<li><a class="reference internal" href="#change-0.6.2-oracle">oracle</a></li>
204
<li><a class="reference internal" href="#change-0.6.2-firebird">firebird</a></li>
205
<li><a class="reference internal" href="#change-0.6.2-misc">misc</a></li>
208
<li><a class="reference internal" href="#change-0.6.1">0.6.1</a><ul>
209
<li><a class="reference internal" href="#change-0.6.1-orm">orm</a></li>
210
<li><a class="reference internal" href="#change-0.6.1-sql">sql</a></li>
211
<li><a class="reference internal" href="#change-0.6.1-mysql">mysql</a></li>
212
<li><a class="reference internal" href="#change-0.6.1-sqlite">sqlite</a></li>
213
<li><a class="reference internal" href="#change-0.6.1-oracle">oracle</a></li>
214
<li><a class="reference internal" href="#change-0.6.1-firebird">firebird</a></li>
215
<li><a class="reference internal" href="#change-0.6.1-misc">misc</a></li>
218
<li><a class="reference internal" href="#change-0.6.0">0.6.0</a><ul>
219
<li><a class="reference internal" href="#change-0.6.0-orm">orm</a></li>
220
<li><a class="reference internal" href="#change-0.6.0-sql">sql</a></li>
221
<li><a class="reference internal" href="#change-0.6.0-postgresql">postgresql</a></li>
222
<li><a class="reference internal" href="#change-0.6.0-oracle">oracle</a></li>
223
<li><a class="reference internal" href="#change-0.6.0-firebird">firebird</a></li>
224
<li><a class="reference internal" href="#change-0.6.0-misc">misc</a></li>
227
<li><a class="reference internal" href="#change-0.6beta3">0.6beta3</a><ul>
228
<li><a class="reference internal" href="#change-0.6beta3-orm">orm</a></li>
229
<li><a class="reference internal" href="#change-0.6beta3-orm-declarative">orm declarative</a></li>
230
<li><a class="reference internal" href="#change-0.6beta3-sql">sql</a></li>
231
<li><a class="reference internal" href="#change-0.6beta3-postgresql">postgresql</a></li>
232
<li><a class="reference internal" href="#change-0.6beta3-mysql">mysql</a></li>
233
<li><a class="reference internal" href="#change-0.6beta3-oracle">oracle</a></li>
234
<li><a class="reference internal" href="#change-0.6beta3-misc">misc</a></li>
237
<li><a class="reference internal" href="#change-0.6beta2">0.6beta2</a><ul>
238
<li><a class="reference internal" href="#change-0.6beta2-orm">orm</a></li>
239
<li><a class="reference internal" href="#change-0.6beta2-orm-declarative">orm declarative</a></li>
240
<li><a class="reference internal" href="#change-0.6beta2-sql">sql</a></li>
241
<li><a class="reference internal" href="#change-0.6beta2-mysql">mysql</a></li>
242
<li><a class="reference internal" href="#change-0.6beta2-sqlite">sqlite</a></li>
243
<li><a class="reference internal" href="#change-0.6beta2-mssql">mssql</a></li>
244
<li><a class="reference internal" href="#change-0.6beta2-oracle">oracle</a></li>
245
<li><a class="reference internal" href="#change-0.6beta2-misc">misc</a></li>
248
<li><a class="reference internal" href="#change-0.6beta1">0.6beta1</a><ul>
249
<li><a class="reference internal" href="#change-0.6beta1-orm">orm</a></li>
250
<li><a class="reference internal" href="#change-0.6beta1-sql">sql</a></li>
251
<li><a class="reference internal" href="#change-0.6beta1-schema">schema</a></li>
252
<li><a class="reference internal" href="#change-0.6beta1-postgresql">postgresql</a></li>
253
<li><a class="reference internal" href="#change-0.6beta1-mysql">mysql</a></li>
254
<li><a class="reference internal" href="#change-0.6beta1-sqlite">sqlite</a></li>
255
<li><a class="reference internal" href="#change-0.6beta1-mssql">mssql</a></li>
256
<li><a class="reference internal" href="#change-0.6beta1-oracle">oracle</a></li>
257
<li><a class="reference internal" href="#change-0.6beta1-firebird">firebird</a></li>
258
<li><a class="reference internal" href="#change-0.6beta1-misc">misc</a></li>
266
<h4>Previous Topic</h4>
268
<a href="changelog_07.html" title="previous chapter">0.7 Changelog</a>
272
<a href="changelog_05.html" title="next chapter">0.5 Changelog</a>
276
<h4>Quick Search</h4>
278
<form class="search" action="../search.html" method="get">
279
<input type="text" name="q" size="18" /> <input type="submit" value="Search" />
280
<input type="hidden" name="check_keywords" value="yes" />
281
<input type="hidden" name="area" value="default" />
287
<div id="docs-body" class="withsidebar" >
289
<div class="section" id="changelog">
290
<h1>0.6 Changelog<a class="headerlink" href="#changelog" title="Permalink to this headline">¶</a></h1>
291
<div class="section" id="change-0.6.9">
292
<h2>0.6.9<a class="headerlink" href="#change-0.6.9" title="Permalink to this headline">¶</a></h2>
293
Released: Sat May 05 2012<div class="section" id="change-0.6.9-general">
294
<h3>general<a class="headerlink" href="#change-0.6.9-general" title="Permalink to this headline">¶</a></h3>
296
<li><p id="change-0.6.9-0"><span class="target" id="change-12863cf30d488f3bc66ad4bcfbbf8fd5"><strong>[general] </strong></span>Adjusted the “importlater” mechanism, which is
297
used internally to resolve import cycles,
298
such that the usage of __import__ is completed
299
when the import of sqlalchemy or sqlalchemy.orm
300
is done, thereby avoiding any usage of __import__
301
after the application starts new threads,
302
fixes.<a class="changeset-link reference internal" href="#change-12863cf30d488f3bc66ad4bcfbbf8fd5">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2279">#2279</a></p>
307
<div class="section" id="change-0.6.9-orm">
308
<h3>orm<a class="headerlink" href="#change-0.6.9-orm" title="Permalink to this headline">¶</a></h3>
310
<li><p id="change-0.6.9-1"><span class="target" id="change-90dd35d523894cd2e514049899fa3652"><strong>[orm] [bug] </strong></span>fixed inappropriate evaluation of user-mapped
311
object in a boolean context within query.get().<a class="changeset-link reference internal" href="#change-90dd35d523894cd2e514049899fa3652">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2310">#2310</a></p>
314
<li><p id="change-0.6.9-2"><span class="target" id="change-48105c68fcefac76f598d7b48e49e120"><strong>[orm] [bug] </strong></span>Fixed the error formatting raised when
315
a tuple is inadvertently passed to session.query().<a class="changeset-link reference internal" href="#change-48105c68fcefac76f598d7b48e49e120">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2297">#2297</a></p>
318
<li><p id="change-0.6.9-3"><span class="target" id="change-1f18f8d75432f09d5bbc6ac09e88b038"><strong>[orm] </strong></span>Fixed bug whereby the source clause
319
used by query.join() would be inconsistent
320
if against a column expression that combined
321
multiple entities together.<a class="changeset-link reference internal" href="#change-1f18f8d75432f09d5bbc6ac09e88b038">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2197">#2197</a></p>
324
<li><p id="change-0.6.9-4"><span class="target" id="change-bec888b1020a652a9d416e4e6b261a7e"><strong>[orm] </strong></span>Fixed bug apparent only in Python 3 whereby
325
sorting of persistent + pending objects during
326
flush would produce an illegal comparison,
327
if the persistent object primary key
328
is not a single integer.<a class="changeset-link reference internal" href="#change-bec888b1020a652a9d416e4e6b261a7e">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2228">#2228</a></p>
331
<li><p id="change-0.6.9-5"><span class="target" id="change-dad2fbaff0f9f5aa2ebbcf509ad408a3"><strong>[orm] </strong></span>Fixed bug where query.join() + aliased=True
332
from a joined-inh structure to itself on
333
relationship() with join condition on the child
334
table would convert the lead entity into the
335
joined one inappropriately.<a class="changeset-link reference internal" href="#change-dad2fbaff0f9f5aa2ebbcf509ad408a3">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2234">#2234</a></p>
338
<li><p id="change-0.6.9-6"><span class="target" id="change-12f7542f530a786aa0c66534c7a55317"><strong>[orm] </strong></span>Fixed bug whereby mapper.order_by attribute would
339
be ignored in the “inner” query within a
340
subquery eager load. .<a class="changeset-link reference internal" href="#change-12f7542f530a786aa0c66534c7a55317">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2287">#2287</a></p>
343
<li><p id="change-0.6.9-7"><span class="target" id="change-324c9d754e04e96958acbba0a3dc83ec"><strong>[orm] </strong></span>Fixed bug whereby if a mapped class
344
redefined __hash__() or __eq__() to something
345
non-standard, which is a supported use case
346
as SQLA should never consult these,
347
the methods would be consulted if the class
348
was part of a “composite” (i.e. non-single-entity)
349
result set.<a class="changeset-link reference internal" href="#change-324c9d754e04e96958acbba0a3dc83ec">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2215">#2215</a></p>
352
<li><p id="change-0.6.9-8"><span class="target" id="change-ccbce1aaf7fc09560215d0f41426e87e"><strong>[orm] </strong></span>Fixed subtle bug that caused SQL to blow
353
up if: column_property() against subquery +
354
joinedload + LIMIT + order by the column
355
property() occurred. .<a class="changeset-link reference internal" href="#change-ccbce1aaf7fc09560215d0f41426e87e">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2188">#2188</a></p>
358
<li><p id="change-0.6.9-9"><span class="target" id="change-18699e5af1eae1a1ce72667d2f948b1f"><strong>[orm] </strong></span>The join condition produced by with_parent
359
as well as when using a “dynamic” relationship
360
against a parent will generate unique
361
bindparams, rather than incorrectly repeating
362
the same bindparam. .<a class="changeset-link reference internal" href="#change-18699e5af1eae1a1ce72667d2f948b1f">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2207">#2207</a></p>
365
<li><p id="change-0.6.9-10"><span class="target" id="change-c0fbe0ad615ed9a900a904e02ea5ecd8"><strong>[orm] </strong></span>Repaired the “no statement condition”
366
assertion in Query which would attempt
367
to raise if a generative method were called
368
after from_statement() were called..<a class="changeset-link reference internal" href="#change-c0fbe0ad615ed9a900a904e02ea5ecd8">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2199">#2199</a></p>
371
<li><p id="change-0.6.9-11"><span class="target" id="change-91ff76e5a82e6e129deb5a0cad60796d"><strong>[orm] </strong></span>Cls.column.collate(“some collation”) now
372
works.<a class="changeset-link reference internal" href="#change-91ff76e5a82e6e129deb5a0cad60796d">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1776">#1776</a></p>
377
<div class="section" id="change-0.6.9-engine">
378
<h3>engine<a class="headerlink" href="#change-0.6.9-engine" title="Permalink to this headline">¶</a></h3>
380
<li><p id="change-0.6.9-12"><span class="target" id="change-7da4cdf9f79cae9743a85d40954ac411"><strong>[engine] </strong></span>Backported the fix for introduced
381
in 0.7.4, which ensures that the connection
382
is in a valid state before attempting to call
383
rollback()/prepare()/release() on savepoint
384
and two-phase transactions.<a class="changeset-link reference internal" href="#change-7da4cdf9f79cae9743a85d40954ac411">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2317">#2317</a></p>
389
<div class="section" id="change-0.6.9-sql">
390
<h3>sql<a class="headerlink" href="#change-0.6.9-sql" title="Permalink to this headline">¶</a></h3>
392
<li><p id="change-0.6.9-13"><span class="target" id="change-d49c6908f106df0a29516c49cddab3c2"><strong>[sql] </strong></span>Fixed two subtle bugs involving column
393
correspondence in a selectable,
394
one with the same labeled subquery repeated, the other
395
when the label has been “grouped” and
396
loses itself. Affects.<a class="changeset-link reference internal" href="#change-d49c6908f106df0a29516c49cddab3c2">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2188">#2188</a></p>
399
<li><p id="change-0.6.9-14"><span class="target" id="change-08b55ba78d7b3fa1a51925aecafe255b"><strong>[sql] </strong></span>Fixed bug whereby “warn on unicode” flag
400
would get set for the String type
401
when used with certain dialects. This
402
bug is not in 0.7.<a class="changeset-link reference internal" href="#change-08b55ba78d7b3fa1a51925aecafe255b">(link)</a><p></p>
405
<li><p id="change-0.6.9-15"><span class="target" id="change-1897da4753826ae9d5eacb9bce3c482f"><strong>[sql] </strong></span>Fixed bug whereby with_only_columns() method of
406
Select would fail if a selectable were passed.. However, the FROM behavior is
407
still incorrect here, so you need 0.7 in
408
any case for this use case to be usable.<a class="changeset-link reference internal" href="#change-1897da4753826ae9d5eacb9bce3c482f">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2270">#2270</a></p>
413
<div class="section" id="change-0.6.9-schema">
414
<h3>schema<a class="headerlink" href="#change-0.6.9-schema" title="Permalink to this headline">¶</a></h3>
416
<li><p id="change-0.6.9-16"><span class="target" id="change-0d0176936941374dd977d3cfc229ea75"><strong>[schema] </strong></span>Added an informative error message when
417
ForeignKeyConstraint refers to a column name in
418
the parent that is not found.<a class="changeset-link reference internal" href="#change-0d0176936941374dd977d3cfc229ea75">(link)</a><p></p>
423
<div class="section" id="change-0.6.9-postgresql">
424
<h3>postgresql<a class="headerlink" href="#change-0.6.9-postgresql" title="Permalink to this headline">¶</a></h3>
426
<li><p id="change-0.6.9-17"><span class="target" id="change-525baeb589c68e1d82ba3a075efda6a4"><strong>[postgresql] </strong></span>Fixed bug related to whereby the
427
same modified index behavior in PG 9 affected
428
primary key reflection on a renamed column..<a class="changeset-link reference internal" href="#change-525baeb589c68e1d82ba3a075efda6a4">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2291">#2291</a>, <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2141">#2141</a></p>
433
<div class="section" id="change-0.6.9-mysql">
434
<h3>mysql<a class="headerlink" href="#change-0.6.9-mysql" title="Permalink to this headline">¶</a></h3>
436
<li><p id="change-0.6.9-18"><span class="target" id="change-0698928580db2e78fa0bf2b5d0fb757a"><strong>[mysql] </strong></span>Fixed OurSQL dialect to use ansi-neutral
437
quote symbol “’” for XA commands instead
438
of ‘”’. .<a class="changeset-link reference internal" href="#change-0698928580db2e78fa0bf2b5d0fb757a">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2186">#2186</a></p>
441
<li><p id="change-0.6.9-19"><span class="target" id="change-893dc29708dfe84565bb6b59ebc5d116"><strong>[mysql] </strong></span>a CREATE TABLE will put the COLLATE option
442
after CHARSET, which appears to be part of
443
MySQL’s arbitrary rules regarding if it will actually
444
work or not.<a class="changeset-link reference internal" href="#change-893dc29708dfe84565bb6b59ebc5d116">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2225">#2225</a></p>
449
<div class="section" id="change-0.6.9-mssql">
450
<h3>mssql<a class="headerlink" href="#change-0.6.9-mssql" title="Permalink to this headline">¶</a></h3>
452
<li><p id="change-0.6.9-20"><span class="target" id="change-2ca5517878da9a4646159611f7fadfd5"><strong>[mssql] [bug] </strong></span>Decode incoming values when retrieving
453
list of index names and the names of columns
454
within those indexes.<a class="changeset-link reference internal" href="#change-2ca5517878da9a4646159611f7fadfd5">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2269">#2269</a></p>
459
<div class="section" id="change-0.6.9-oracle">
460
<h3>oracle<a class="headerlink" href="#change-0.6.9-oracle" title="Permalink to this headline">¶</a></h3>
462
<li><p id="change-0.6.9-21"><span class="target" id="change-a0976892727bd6ce76216c086a0e73cf"><strong>[oracle] </strong></span>Added ORA-00028 to disconnect codes, use
463
cx_oracle _Error.code to get at the code,.<a class="changeset-link reference internal" href="#change-a0976892727bd6ce76216c086a0e73cf">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2200">#2200</a></p>
466
<li><p id="change-0.6.9-22"><span class="target" id="change-c9c4f1305df1aa628e2d4f756511f177"><strong>[oracle] </strong></span>repaired the oracle.RAW type which did not
467
generate the correct DDL.<a class="changeset-link reference internal" href="#change-c9c4f1305df1aa628e2d4f756511f177">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2220">#2220</a></p>
470
<li><p id="change-0.6.9-23"><span class="target" id="change-eda1d903a91584d2894e843edeb325ce"><strong>[oracle] </strong></span>added CURRENT to reserved word list.<a class="changeset-link reference internal" href="#change-eda1d903a91584d2894e843edeb325ce">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2212">#2212</a></p>
475
<div class="section" id="change-0.6.9-misc">
476
<h3>misc<a class="headerlink" href="#change-0.6.9-misc" title="Permalink to this headline">¶</a></h3>
478
<li><p id="change-0.6.9-24"><span class="target" id="change-876cb8fb1ac9a1ba6772001f2b81829e"><strong>[examples] </strong></span>Adjusted dictlike-polymorphic.py example
479
to apply the CAST such that it works on
480
PG, other databases.<a class="changeset-link reference internal" href="#change-876cb8fb1ac9a1ba6772001f2b81829e">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2266">#2266</a></p>
486
<div class="section" id="change-0.6.8">
487
<h2>0.6.8<a class="headerlink" href="#change-0.6.8" title="Permalink to this headline">¶</a></h2>
488
Released: Sun Jun 05 2011<div class="section" id="change-0.6.8-orm">
489
<h3>orm<a class="headerlink" href="#change-0.6.8-orm" title="Permalink to this headline">¶</a></h3>
491
<li><p id="change-0.6.8-0"><span class="target" id="change-5211656e5b9bab3746a031467f734f52"><strong>[orm] </strong></span>Calling query.get() against a column-based entity is
492
invalid, this condition now raises a deprecation warning.<a class="changeset-link reference internal" href="#change-5211656e5b9bab3746a031467f734f52">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2144">#2144</a></p>
495
<li><p id="change-0.6.8-1"><span class="target" id="change-1bb5eb9cd9ead7741537faf42dbb717a"><strong>[orm] </strong></span>a non_primary mapper will inherit the _identity_class
496
of the primary mapper. This so that a non_primary
497
established against a class that’s normally in an
498
inheritance mapping will produce results that are
499
identity-map compatible with that of the primary
500
mapper<a class="changeset-link reference internal" href="#change-1bb5eb9cd9ead7741537faf42dbb717a">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2151">#2151</a></p>
503
<li><p id="change-0.6.8-2"><span class="target" id="change-d26ba3de23d7c188bace06d868980bdd"><strong>[orm] </strong></span>Backported 0.7’s identity map implementation, which
504
does not use a mutex around removal. This as some users
505
were still getting deadlocks despite the adjustments
506
in 0.6.7; the 0.7 approach that doesn’t use a mutex
507
does not appear to produce “dictionary changed size”
508
issues, the original rationale for the mutex.<a class="changeset-link reference internal" href="#change-d26ba3de23d7c188bace06d868980bdd">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2148">#2148</a></p>
511
<li><p id="change-0.6.8-3"><span class="target" id="change-7a589ce2e13c9008b3def2fd5a90ac23"><strong>[orm] </strong></span>Fixed the error message emitted for “can’t
512
execute syncrule for destination column ‘q’;
513
mapper ‘X’ does not map this column” to
514
reference the correct mapper. .<a class="changeset-link reference internal" href="#change-7a589ce2e13c9008b3def2fd5a90ac23">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2163">#2163</a></p>
517
<li><p id="change-0.6.8-4"><span class="target" id="change-fa833bfebba673a74e3bda247932e868"><strong>[orm] </strong></span>Fixed bug where determination of “self referential”
518
relationship would fail with no workaround
519
for joined-inh subclass related to itself,
520
or joined-inh subclass related to a subclass
521
of that with no cols in the sub-sub class
522
in the join condition.<a class="changeset-link reference internal" href="#change-fa833bfebba673a74e3bda247932e868">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2149">#2149</a></p>
525
<li><p id="change-0.6.8-5"><span class="target" id="change-ffe3e5b094cad44312444477b1d9c3b5"><strong>[orm] </strong></span>mapper() will ignore non-configured foreign keys
526
to unrelated tables when determining inherit
527
condition between parent and child class.
528
This is equivalent to behavior already
529
applied to declarative. Note that 0.7 has a
530
more comprehensive solution to this, altering
531
how join() itself determines an FK error.<a class="changeset-link reference internal" href="#change-ffe3e5b094cad44312444477b1d9c3b5">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2153">#2153</a></p>
534
<li><p id="change-0.6.8-6"><span class="target" id="change-e86ab075b7ef34298069ec75797e7bd8"><strong>[orm] </strong></span>Fixed bug whereby mapper mapped to an anonymous
535
alias would fail if logging were used, due to
536
unescaped % sign in the alias name.<a class="changeset-link reference internal" href="#change-e86ab075b7ef34298069ec75797e7bd8">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2171">#2171</a></p>
539
<li><p id="change-0.6.8-7"><span class="target" id="change-90aba29b5bd34a14cf4fa753d35659ee"><strong>[orm] </strong></span>Modify the text of the message which occurs
540
when the “identity” key isn’t detected on
541
flush, to include the common cause that
542
the Column isn’t set up to detect
543
auto-increment correctly;.<a class="changeset-link reference internal" href="#change-90aba29b5bd34a14cf4fa753d35659ee">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2170">#2170</a></p>
546
<li><p id="change-0.6.8-8"><span class="target" id="change-2f30675b878168f0ac612120144c8b76"><strong>[orm] </strong></span>Fixed bug where transaction-level “deleted”
547
collection wouldn’t be cleared of expunged
548
states, raising an error if they later
549
became transient.<a class="changeset-link reference internal" href="#change-2f30675b878168f0ac612120144c8b76">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2182">#2182</a></p>
554
<div class="section" id="change-0.6.8-engine">
555
<h3>engine<a class="headerlink" href="#change-0.6.8-engine" title="Permalink to this headline">¶</a></h3>
557
<li><p id="change-0.6.8-9"><span class="target" id="change-81e707c0cdab968a06ef47f7b2d2940e"><strong>[engine] </strong></span>Adjusted the __contains__() method of
558
a RowProxy result row such that no exception
559
throw is generated internally;
560
NoSuchColumnError() also will generate its
561
message regardless of whether or not the column
562
construct can be coerced to a string..<a class="changeset-link reference internal" href="#change-81e707c0cdab968a06ef47f7b2d2940e">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2178">#2178</a></p>
567
<div class="section" id="change-0.6.8-sql">
568
<h3>sql<a class="headerlink" href="#change-0.6.8-sql" title="Permalink to this headline">¶</a></h3>
570
<li><p id="change-0.6.8-10"><span class="target" id="change-d38c459e931e28a7c7cd6e4a62af4849"><strong>[sql] </strong></span>Fixed bug whereby if FetchedValue was passed
571
to column server_onupdate, it would not
572
have its parent “column” assigned, added
573
test coverage for all column default assignment
574
patterns.<a class="changeset-link reference internal" href="#change-d38c459e931e28a7c7cd6e4a62af4849">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2147">#2147</a></p>
577
<li><p id="change-0.6.8-11"><span class="target" id="change-2ae59c579c4c2ced22f234c933eedb03"><strong>[sql] </strong></span>Fixed bug whereby nesting a label of a select()
578
with another label in it would produce incorrect
579
exported columns. Among other things this would
580
break an ORM column_property() mapping against
581
another column_property(). .<a class="changeset-link reference internal" href="#change-2ae59c579c4c2ced22f234c933eedb03">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2167">#2167</a></p>
586
<div class="section" id="change-0.6.8-postgresql">
587
<h3>postgresql<a class="headerlink" href="#change-0.6.8-postgresql" title="Permalink to this headline">¶</a></h3>
589
<li><p id="change-0.6.8-12"><span class="target" id="change-d7f16be247c5f9c9413e70ca6d68a835"><strong>[postgresql] </strong></span>Fixed bug affecting PG 9 whereby index reflection
590
would fail if against a column whose name
591
had changed. .<a class="changeset-link reference internal" href="#change-d7f16be247c5f9c9413e70ca6d68a835">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2141">#2141</a></p>
594
<li><p id="change-0.6.8-13"><span class="target" id="change-5fb3b20bf3b31a34fb78d3340bf1dcd1"><strong>[postgresql] </strong></span>Some unit test fixes regarding numeric arrays,
595
MATCH operator. A potential floating-point
596
inaccuracy issue was fixed, and certain tests
597
of the MATCH operator only execute within an
598
EN-oriented locale for now. .<a class="changeset-link reference internal" href="#change-5fb3b20bf3b31a34fb78d3340bf1dcd1">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2175">#2175</a></p>
603
<div class="section" id="change-0.6.8-mssql">
604
<h3>mssql<a class="headerlink" href="#change-0.6.8-mssql" title="Permalink to this headline">¶</a></h3>
606
<li><p id="change-0.6.8-14"><span class="target" id="change-c07b8fa79245c2fb7647120e9fe7d228"><strong>[mssql] </strong></span>Fixed bug in MSSQL dialect whereby the aliasing
607
applied to a schema-qualified table would leak
608
into enclosing select statements.<a class="changeset-link reference internal" href="#change-c07b8fa79245c2fb7647120e9fe7d228">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2169">#2169</a></p>
611
<li><p id="change-0.6.8-15"><span class="target" id="change-6e28260bf17c92850ac3773eda0fe105"><strong>[mssql] </strong></span>Fixed bug whereby DATETIME2 type would fail on
612
the “adapt” step when used in result sets or
613
bound parameters. This issue is not in 0.7.<a class="changeset-link reference internal" href="#change-6e28260bf17c92850ac3773eda0fe105">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2159">#2159</a></p>
619
<div class="section" id="change-0.6.7">
620
<h2>0.6.7<a class="headerlink" href="#change-0.6.7" title="Permalink to this headline">¶</a></h2>
621
Released: Wed Apr 13 2011<div class="section" id="change-0.6.7-orm">
622
<h3>orm<a class="headerlink" href="#change-0.6.7-orm" title="Permalink to this headline">¶</a></h3>
624
<li><p id="change-0.6.7-0"><span class="target" id="change-eed859bebcbe8988e1d4cc3b30ebc835"><strong>[orm] </strong></span>Tightened the iterate vs. remove mutex around the
625
identity map iteration, attempting to reduce the
626
chance of an (extremely rare) reentrant gc operation
627
causing a deadlock. Might remove the mutex in
628
0.7.<a class="changeset-link reference internal" href="#change-eed859bebcbe8988e1d4cc3b30ebc835">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2087">#2087</a></p>
631
<li><p id="change-0.6.7-1"><span class="target" id="change-857bb51b7ea179692c74f9266bdba26d"><strong>[orm] </strong></span>Added a <cite>name</cite> argument to <cite>Query.subquery()</cite>, to allow
632
a fixed name to be assigned to the alias object.<a class="changeset-link reference internal" href="#change-857bb51b7ea179692c74f9266bdba26d">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2030">#2030</a></p>
635
<li><p id="change-0.6.7-2"><span class="target" id="change-4363d0760126c3a958074eb1490c4919"><strong>[orm] </strong></span>A warning is emitted when a joined-table inheriting mapper
636
has no primary keys on the locally mapped table
637
(but has pks on the superclass table).<a class="changeset-link reference internal" href="#change-4363d0760126c3a958074eb1490c4919">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2019">#2019</a></p>
640
<li><p id="change-0.6.7-3"><span class="target" id="change-b9b208bc91c2102e8f0fd7911db16925"><strong>[orm] </strong></span>Fixed bug where “middle” class in a polymorphic hierarchy
641
would have no ‘polymorphic_on’ column if it didn’t also
642
specify a ‘polymorphic_identity’, leading to strange
643
errors upon refresh, wrong class loaded when querying
644
from that target. Also emits the correct WHERE criterion
645
when using single table inheritance.<a class="changeset-link reference internal" href="#change-b9b208bc91c2102e8f0fd7911db16925">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2038">#2038</a></p>
648
<li><p id="change-0.6.7-4"><span class="target" id="change-a2fb7de3c9754e79e857eab068d7e269"><strong>[orm] </strong></span>Fixed bug where a column with a SQL or server side default
649
that was excluded from a mapping with include_properties
650
or exclude_properties would result in UnmappedColumnError.<a class="changeset-link reference internal" href="#change-a2fb7de3c9754e79e857eab068d7e269">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1995">#1995</a></p>
653
<li><p id="change-0.6.7-5"><span class="target" id="change-2c07178fa8d7673418fa3709242f8faf"><strong>[orm] </strong></span>A warning is emitted in the unusual case that an
654
append or similar event on a collection occurs after
655
the parent object has been dereferenced, which
656
prevents the parent from being marked as “dirty”
657
in the session. This will be an exception in 0.7.<a class="changeset-link reference internal" href="#change-2c07178fa8d7673418fa3709242f8faf">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2046">#2046</a></p>
660
<li><p id="change-0.6.7-6"><span class="target" id="change-59c721c9c15d94a562e9083c84012937"><strong>[orm] </strong></span>Fixed bug in query.options() whereby a path
661
applied to a lazyload using string keys could
662
overlap a same named attribute on the wrong
663
entity. Note 0.7 has an updated version of this
664
fix.<a class="changeset-link reference internal" href="#change-59c721c9c15d94a562e9083c84012937">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2098">#2098</a></p>
667
<li><p id="change-0.6.7-7"><span class="target" id="change-5e7605de1fa0c84b6669ddade822cb51"><strong>[orm] </strong></span>Reworded the exception raised when a flush
668
is attempted of a subclass that is not polymorphic
669
against the supertype.<a class="changeset-link reference internal" href="#change-5e7605de1fa0c84b6669ddade822cb51">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2063">#2063</a></p>
672
<li><p id="change-0.6.7-8"><span class="target" id="change-8d18a5abb18ac58c0bfa0091638be48f"><strong>[orm] </strong></span>Some fixes to the state handling regarding
673
backrefs, typically when autoflush=False, where
674
the back-referenced collection wouldn’t
675
properly handle add/removes with no net
676
change. Thanks to Richard Murri for the
677
test case + patch.<a class="changeset-link reference internal" href="#change-8d18a5abb18ac58c0bfa0091638be48f">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2123">#2123</a></p>
680
<li><p id="change-0.6.7-9"><span class="target" id="change-060dd78afd33881d181eec9588947add"><strong>[orm] </strong></span>a “having” clause would be copied from the
681
inside to the outside query if from_self()
682
were used..<a class="changeset-link reference internal" href="#change-060dd78afd33881d181eec9588947add">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2130">#2130</a></p>
687
<div class="section" id="change-0.6.7-orm-declarative">
688
<h3>orm declarative<a class="headerlink" href="#change-0.6.7-orm-declarative" title="Permalink to this headline">¶</a></h3>
690
<li><p id="change-0.6.7-10"><span class="target" id="change-d38e96868aa208c878f6a399209baa56"><strong>[declarative] [orm] </strong></span>Added an explicit check for the case that the name
691
‘metadata’ is used for a column attribute on a
692
declarative class.<a class="changeset-link reference internal" href="#change-d38e96868aa208c878f6a399209baa56">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2050">#2050</a></p>
695
<li><p id="change-0.6.7-11"><span class="target" id="change-04df06651398c4cc53b0100d0d7392f7"><strong>[declarative] [orm] </strong></span>Fix error message referencing old @classproperty
696
name to reference @declared_attr<a class="changeset-link reference internal" href="#change-04df06651398c4cc53b0100d0d7392f7">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2061">#2061</a></p>
699
<li><p id="change-0.6.7-12"><span class="target" id="change-5a35bc6fcdaed2657acdf3a146f57944"><strong>[declarative] [orm] </strong></span>Arguments in __mapper_args__ that aren’t “hashable”
700
aren’t mistaken for always-hashable, possibly-column
701
arguments.<a class="changeset-link reference internal" href="#change-5a35bc6fcdaed2657acdf3a146f57944">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2091">#2091</a></p>
706
<div class="section" id="change-0.6.7-engine">
707
<h3>engine<a class="headerlink" href="#change-0.6.7-engine" title="Permalink to this headline">¶</a></h3>
709
<li><p id="change-0.6.7-13"><span class="target" id="change-47dcc1090d3314545b6a9690f9d74116"><strong>[engine] </strong></span>Fixed bug in QueuePool, SingletonThreadPool whereby
710
connections that were discarded via overflow or periodic
711
cleanup() were not explicitly closed, leaving garbage
712
collection to the task instead. This generally only
713
affects non-reference-counting backends like Jython
714
and Pypy. Thanks to Jaimy Azle for spotting
715
this.<a class="changeset-link reference internal" href="#change-47dcc1090d3314545b6a9690f9d74116">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2102">#2102</a></p>
720
<div class="section" id="change-0.6.7-sql">
721
<h3>sql<a class="headerlink" href="#change-0.6.7-sql" title="Permalink to this headline">¶</a></h3>
723
<li><p id="change-0.6.7-14"><span class="target" id="change-a275b5bc06266dc2cdf5221ac4efa4ae"><strong>[sql] </strong></span>Column.copy(), as used in table.tometadata(), copies the
724
‘doc’ attribute.<a class="changeset-link reference internal" href="#change-a275b5bc06266dc2cdf5221ac4efa4ae">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2028">#2028</a></p>
727
<li><p id="change-0.6.7-15"><span class="target" id="change-ad5304b19826c1a70051cdf7b77c35bc"><strong>[sql] </strong></span>Added some defs to the resultproxy.c extension so that
728
the extension compiles and runs on Python 2.4.<a class="changeset-link reference internal" href="#change-ad5304b19826c1a70051cdf7b77c35bc">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2023">#2023</a></p>
731
<li><p id="change-0.6.7-16"><span class="target" id="change-5a0bb2e6701ec13c1651c09ef85839e5"><strong>[sql] </strong></span>The compiler extension now supports overriding the default
732
compilation of expression._BindParamClause including that
733
the auto-generated binds within the VALUES/SET clause
734
of an insert()/update() statement will also use the new
735
compilation rules.<a class="changeset-link reference internal" href="#change-5a0bb2e6701ec13c1651c09ef85839e5">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2042">#2042</a></p>
738
<li><p id="change-0.6.7-17"><span class="target" id="change-cd2a42bedeaff3d6db0e9583c7366c01"><strong>[sql] </strong></span>Added accessors to ResultProxy “returns_rows”, “is_insert”<a class="changeset-link reference internal" href="#change-cd2a42bedeaff3d6db0e9583c7366c01">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2089">#2089</a></p>
741
<li><p id="change-0.6.7-18"><span class="target" id="change-2f014c320217753b2e7338e74b17e074"><strong>[sql] </strong></span>The limit/offset keywords to select() as well
742
as the value passed to select.limit()/offset()
743
will be coerced to integer.<a class="changeset-link reference internal" href="#change-2f014c320217753b2e7338e74b17e074">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2116">#2116</a></p>
748
<div class="section" id="change-0.6.7-postgresql">
749
<h3>postgresql<a class="headerlink" href="#change-0.6.7-postgresql" title="Permalink to this headline">¶</a></h3>
751
<li><p id="change-0.6.7-19"><span class="target" id="change-ab73a9ae528ee69666fab4ec822db451"><strong>[postgresql] </strong></span>When explicit sequence execution derives the name
752
of the auto-generated sequence of a SERIAL column,
753
which currently only occurs if implicit_returning=False,
754
now accommodates if the table + column name is greater
755
than 63 characters using the same logic Postgresql uses.<a class="changeset-link reference internal" href="#change-ab73a9ae528ee69666fab4ec822db451">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1083">#1083</a></p>
758
<li><p id="change-0.6.7-20"><span class="target" id="change-0d9b1d5d5cbdcb0ca647c9b409c42200"><strong>[postgresql] </strong></span>Added an additional libpq message to the list of “disconnect”
759
exceptions, “could not receive data from server”<a class="changeset-link reference internal" href="#change-0d9b1d5d5cbdcb0ca647c9b409c42200">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2044">#2044</a></p>
762
<li><p id="change-0.6.7-21"><span class="target" id="change-934e48213c937d20f95930337f7e57e9"><strong>[postgresql] </strong></span>Added RESERVED_WORDS for postgresql dialect.<a class="changeset-link reference internal" href="#change-934e48213c937d20f95930337f7e57e9">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2092">#2092</a></p>
765
<li><p id="change-0.6.7-22"><span class="target" id="change-9afcfc7fa95e4d1c05cc91e90f14074b"><strong>[postgresql] </strong></span>Fixed the BIT type to allow a “length” parameter, “varying”
766
parameter. Reflection also fixed.<a class="changeset-link reference internal" href="#change-9afcfc7fa95e4d1c05cc91e90f14074b">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2073">#2073</a></p>
771
<div class="section" id="change-0.6.7-mysql">
772
<h3>mysql<a class="headerlink" href="#change-0.6.7-mysql" title="Permalink to this headline">¶</a></h3>
774
<li><p id="change-0.6.7-23"><span class="target" id="change-694da80c3029deb8ea396e5708b75604"><strong>[mysql] </strong></span>oursql dialect accepts the same “ssl” arguments in
775
create_engine() as that of MySQLdb.<a class="changeset-link reference internal" href="#change-694da80c3029deb8ea396e5708b75604">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2047">#2047</a></p>
780
<div class="section" id="change-0.6.7-sqlite">
781
<h3>sqlite<a class="headerlink" href="#change-0.6.7-sqlite" title="Permalink to this headline">¶</a></h3>
783
<li><p id="change-0.6.7-24"><span class="target" id="change-ed6a6e71dbdafae0b4f6e0831116d94f"><strong>[sqlite] </strong></span>Fixed bug where reflection of foreign key
784
created as “REFERENCES <tablename>” without
785
col name would fail.<a class="changeset-link reference internal" href="#change-ed6a6e71dbdafae0b4f6e0831116d94f">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2115">#2115</a></p>
790
<div class="section" id="change-0.6.7-mssql">
791
<h3>mssql<a class="headerlink" href="#change-0.6.7-mssql" title="Permalink to this headline">¶</a></h3>
793
<li><p id="change-0.6.7-25"><span class="target" id="change-abb1e8cdc1c90914b2196c74eeb32842"><strong>[mssql] </strong></span>Rewrote the query used to get the definition of a view,
794
typically when using the Inspector interface, to
795
use sys.sql_modules instead of the information schema,
796
thereby allowing views definitions longer than 4000
797
characters to be fully returned.<a class="changeset-link reference internal" href="#change-abb1e8cdc1c90914b2196c74eeb32842">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2071">#2071</a></p>
802
<div class="section" id="change-0.6.7-oracle">
803
<h3>oracle<a class="headerlink" href="#change-0.6.7-oracle" title="Permalink to this headline">¶</a></h3>
805
<li><p id="change-0.6.7-26"><span class="target" id="change-52cfc9b390aeab5dad8108be21fb6c91"><strong>[oracle] </strong></span>Using column names that would require quotes
806
for the column itself or for a name-generated
807
bind parameter, such as names with special
808
characters, underscores, non-ascii characters,
809
now properly translate bind parameter keys when
810
talking to cx_oracle.<a class="changeset-link reference internal" href="#change-52cfc9b390aeab5dad8108be21fb6c91">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2100">#2100</a></p>
813
<li><p id="change-0.6.7-27"><span class="target" id="change-a0b34ccb9b1535f2c510607844e32242"><strong>[oracle] </strong></span>Oracle dialect adds use_binds_for_limits=False
814
create_engine() flag, will render the LIMIT/OFFSET
815
values inline instead of as binds, reported to
816
modify the execution plan used by Oracle.<a class="changeset-link reference internal" href="#change-a0b34ccb9b1535f2c510607844e32242">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2116">#2116</a></p>
821
<div class="section" id="change-0.6.7-firebird">
822
<h3>firebird<a class="headerlink" href="#change-0.6.7-firebird" title="Permalink to this headline">¶</a></h3>
824
<li><p id="change-0.6.7-28"><span class="target" id="change-c7435c028a162f66ad2348bf1b312568"><strong>[firebird] </strong></span>The “implicit_returning” flag on create_engine() is
825
honored if set to False.<a class="changeset-link reference internal" href="#change-c7435c028a162f66ad2348bf1b312568">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2083">#2083</a></p>
830
<div class="section" id="change-0.6.7-misc">
831
<h3>misc<a class="headerlink" href="#change-0.6.7-misc" title="Permalink to this headline">¶</a></h3>
833
<li><p id="change-0.6.7-29"><span class="target" id="change-a13940d4af6ee75c1a62ada363719185"><strong>[informix] </strong></span>Added RESERVED_WORDS informix dialect.<a class="changeset-link reference internal" href="#change-a13940d4af6ee75c1a62ada363719185">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2092">#2092</a></p>
836
<li><p id="change-0.6.7-30"><span class="target" id="change-1f8f8c315ffd15103961e7340c643cf5"><strong>[ext] </strong></span>The horizontal_shard ShardedSession class accepts the common
837
Session argument “query_cls” as a constructor argument,
838
to enable further subclassing of ShardedQuery.<a class="changeset-link reference internal" href="#change-1f8f8c315ffd15103961e7340c643cf5">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2090">#2090</a></p>
841
<li><p id="change-0.6.7-31"><span class="target" id="change-4d5a071f11cdecd01c76f3e46df9a46b"><strong>[documentation] </strong></span>Documented SQLite DATE/TIME/DATETIME types.<a class="changeset-link reference internal" href="#change-4d5a071f11cdecd01c76f3e46df9a46b">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2029">#2029</a></p>
844
<li><p id="change-0.6.7-32"><span class="target" id="change-6ad83653aed5df61bea17b14bda619f6"><strong>[examples] </strong></span>The Beaker caching example allows a “query_cls” argument
845
to the query_callable() function.<a class="changeset-link reference internal" href="#change-6ad83653aed5df61bea17b14bda619f6">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2090">#2090</a></p>
851
<div class="section" id="change-0.6.6">
852
<h2>0.6.6<a class="headerlink" href="#change-0.6.6" title="Permalink to this headline">¶</a></h2>
853
Released: Sat Jan 08 2011<div class="section" id="change-0.6.6-orm">
854
<h3>orm<a class="headerlink" href="#change-0.6.6-orm" title="Permalink to this headline">¶</a></h3>
856
<li><p id="change-0.6.6-0"><span class="target" id="change-73d44895e2706b7e163324b206400f33"><strong>[orm] </strong></span>Fixed bug whereby a non-“mutable” attribute modified event
857
which occurred on an object that was clean except for
858
preceding mutable attribute changes would fail to strongly
859
reference itself in the identity map. This would cause the
860
object to be garbage collected, losing track of any changes
861
that weren’t previously saved in the “mutable changes”
862
dictionary.<a class="changeset-link reference internal" href="#change-73d44895e2706b7e163324b206400f33">(link)</a><p></p>
865
<li><p id="change-0.6.6-1"><span class="target" id="change-cc7c109cd2e5f972d7c361a19e549015"><strong>[orm] </strong></span>Fixed bug whereby “passive_deletes=’all’” wasn’t passing
866
the correct symbols to lazy loaders during flush, thereby
867
causing an unwarranted load.<a class="changeset-link reference internal" href="#change-cc7c109cd2e5f972d7c361a19e549015">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2013">#2013</a></p>
870
<li><p id="change-0.6.6-2"><span class="target" id="change-a06e3ac0ceb000a16fd9ccd8151858a9"><strong>[orm] </strong></span>Fixed bug which prevented composite mapped
871
attributes from being used on a mapped select statement.. Note the workings of composite are slated to
872
change significantly in 0.7.<a class="changeset-link reference internal" href="#change-a06e3ac0ceb000a16fd9ccd8151858a9">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1997">#1997</a></p>
875
<li><p id="change-0.6.6-3"><span class="target" id="change-78f279b93ff41fe6f4e382ab7a39d1dc"><strong>[orm] </strong></span>active_history flag also added to composite().
876
The flag has no effect in 0.6, but is instead
877
a placeholder flag for forwards compatibility,
878
as it applies in 0.7 for composites.<a class="changeset-link reference internal" href="#change-78f279b93ff41fe6f4e382ab7a39d1dc">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1976">#1976</a></p>
881
<li><p id="change-0.6.6-4"><span class="target" id="change-e583324a8feefce60c8c25f58fb1489c"><strong>[orm] </strong></span>Fixed uow bug whereby expired objects passed to
882
Session.delete() would not have unloaded references
883
or collections taken into account when deleting
884
objects, despite passive_deletes remaining at
885
its default of False.<a class="changeset-link reference internal" href="#change-e583324a8feefce60c8c25f58fb1489c">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2002">#2002</a></p>
888
<li><p id="change-0.6.6-5"><span class="target" id="change-24a0a0f1cefec7af7929abec55c2677d"><strong>[orm] </strong></span>A warning is emitted when version_id_col is specified
889
on an inheriting mapper when the inherited mapper
890
already has one, if those column expressions are not
891
the same.<a class="changeset-link reference internal" href="#change-24a0a0f1cefec7af7929abec55c2677d">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1987">#1987</a></p>
894
<li><p id="change-0.6.6-6"><span class="target" id="change-950897823db98ee106b0d8ae719faea0"><strong>[orm] </strong></span>“innerjoin” flag doesn’t take effect along the chain
895
of joinedload() joins if a previous join in that chain
896
is an outer join, thus allowing primary rows without
897
a referenced child row to be correctly returned
898
in results.<a class="changeset-link reference internal" href="#change-950897823db98ee106b0d8ae719faea0">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1954">#1954</a></p>
901
<li><p id="change-0.6.6-7"><span class="target" id="change-0a61da9c990ed25523ab57b8e6ff715f"><strong>[orm] </strong></span>Fixed bug regarding “subqueryload” strategy whereby
902
strategy would fail if the entity was an aliased()
903
construct.<a class="changeset-link reference internal" href="#change-0a61da9c990ed25523ab57b8e6ff715f">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1964">#1964</a></p>
906
<li><p id="change-0.6.6-8"><span class="target" id="change-1703b90dcfd7ffd0b4f81bcbb70c3d44"><strong>[orm] </strong></span>Fixed bug regarding “subqueryload” strategy whereby
907
the join would fail if using a multi-level load
908
of the form from A->joined-subclass->C<a class="changeset-link reference internal" href="#change-1703b90dcfd7ffd0b4f81bcbb70c3d44">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2014">#2014</a></p>
911
<li><p id="change-0.6.6-9"><span class="target" id="change-4a73b51d264c9ebf2bfe59749c653a7e"><strong>[orm] </strong></span>Fixed indexing of Query objects by -1. It was erroneously
912
transformed to the empty slice -1:0 that resulted in
913
IndexError.<a class="changeset-link reference internal" href="#change-4a73b51d264c9ebf2bfe59749c653a7e">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1968">#1968</a></p>
916
<li><p id="change-0.6.6-10"><span class="target" id="change-99c12b8a201a49a117b4bb21da31173a"><strong>[orm] </strong></span>The mapper argument “primary_key” can be passed as a
917
single column as well as a list or tuple.
918
The documentation examples that illustrated it as a
919
scalar value have been changed to lists.<a class="changeset-link reference internal" href="#change-99c12b8a201a49a117b4bb21da31173a">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1971">#1971</a></p>
922
<li><p id="change-0.6.6-11"><span class="target" id="change-ff4076489a43c234bed638b787e33718"><strong>[orm] </strong></span>Added active_history flag to relationship()
923
and column_property(), forces attribute events to
924
always load the “old” value, so that it’s available to
925
attributes.get_history().<a class="changeset-link reference internal" href="#change-ff4076489a43c234bed638b787e33718">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1961">#1961</a></p>
928
<li><p id="change-0.6.6-12"><span class="target" id="change-0ff4a3f02593bf67a026324aec361fc5"><strong>[orm] </strong></span>Query.get() will raise if the number of params
929
in a composite key is too large, as well as too
930
small.<a class="changeset-link reference internal" href="#change-0ff4a3f02593bf67a026324aec361fc5">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1977">#1977</a></p>
933
<li><p id="change-0.6.6-13"><span class="target" id="change-05860eb2ecae8e9521c06c989b36d3df"><strong>[orm] </strong></span>Backport of “optimized get” fix from 0.7,
934
improves the generation of joined-inheritance
935
“load expired row” behavior.<a class="changeset-link reference internal" href="#change-05860eb2ecae8e9521c06c989b36d3df">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1992">#1992</a></p>
938
<li><p id="change-0.6.6-14"><span class="target" id="change-dad16deefe860c0ae2a562ef161b1063"><strong>[orm] </strong></span>A little more verbiage to the “primaryjoin” error,
939
in an unusual condition that the join condition
940
“works” for viewonly but doesn’t work for non-viewonly,
941
and foreign_keys wasn’t used - adds “foreign_keys” to
942
the suggestion. Also add “foreign_keys” to the
943
suggestion for the generic “direction” error.<a class="changeset-link reference internal" href="#change-dad16deefe860c0ae2a562ef161b1063">(link)</a><p></p>
948
<div class="section" id="change-0.6.6-orm-declarative">
949
<h3>orm declarative<a class="headerlink" href="#change-0.6.6-orm-declarative" title="Permalink to this headline">¶</a></h3>
951
<li><p id="change-0.6.6-15"><span class="target" id="change-1c894bdd6f1952bc473239bc08a14b89"><strong>[declarative] [orm] </strong></span>An error is raised if __table_args__ is not in tuple
952
or dict format, and is not None.<a class="changeset-link reference internal" href="#change-1c894bdd6f1952bc473239bc08a14b89">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1972">#1972</a></p>
957
<div class="section" id="change-0.6.6-engine">
958
<h3>engine<a class="headerlink" href="#change-0.6.6-engine" title="Permalink to this headline">¶</a></h3>
960
<li><p id="change-0.6.6-16"><span class="target" id="change-e344fa51f77920bcead6517070be003a"><strong>[engine] </strong></span>The “unicode warning” against non-unicode bind data
961
is now raised only when the
962
Unicode type is used explictly; not when
963
convert_unicode=True is used on the engine
964
or String type.<a class="changeset-link reference internal" href="#change-e344fa51f77920bcead6517070be003a">(link)</a><p></p>
967
<li><p id="change-0.6.6-17"><span class="target" id="change-060786b76864313d10ab31bd71a4aeb8"><strong>[engine] </strong></span>Fixed memory leak in C version of Decimal result
968
processor.<a class="changeset-link reference internal" href="#change-060786b76864313d10ab31bd71a4aeb8">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1978">#1978</a></p>
971
<li><p id="change-0.6.6-18"><span class="target" id="change-a782cc312fd2acd3583135d10d33de6d"><strong>[engine] </strong></span>Implemented sequence check capability for the C
972
version of RowProxy, as well as 2.7 style
973
“collections.Sequence” registration for RowProxy.<a class="changeset-link reference internal" href="#change-a782cc312fd2acd3583135d10d33de6d">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1871">#1871</a></p>
976
<li><p id="change-0.6.6-19"><span class="target" id="change-4d3bfa440284b95d35ecfb86606c4b1d"><strong>[engine] </strong></span>Threadlocal engine methods rollback(), commit(),
977
prepare() won’t raise if no transaction is in progress;
978
this was a regression introduced in 0.6.<a class="changeset-link reference internal" href="#change-4d3bfa440284b95d35ecfb86606c4b1d">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1998">#1998</a></p>
981
<li><p id="change-0.6.6-20"><span class="target" id="change-bfd7df5b5e155908748f2e41fef4e6cb"><strong>[engine] </strong></span>Threadlocal engine returns itself upon begin(),
982
begin_nested(); engine then implements contextmanager
983
methods to allow the “with” statement.<a class="changeset-link reference internal" href="#change-bfd7df5b5e155908748f2e41fef4e6cb">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2004">#2004</a></p>
988
<div class="section" id="change-0.6.6-sql">
989
<h3>sql<a class="headerlink" href="#change-0.6.6-sql" title="Permalink to this headline">¶</a></h3>
991
<li><p id="change-0.6.6-21"><span class="target" id="change-8501b4f05d5a273f29d09e5fda4682b4"><strong>[sql] </strong></span>Fixed operator precedence rules for multiple
992
chains of a single non-associative operator.
993
I.e. “x - (y - z)” will compile as “x - (y - z)”
994
and not “x - y - z”. Also works with labels,
995
i.e. “x - (y - z).label(‘foo’)”<a class="changeset-link reference internal" href="#change-8501b4f05d5a273f29d09e5fda4682b4">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1984">#1984</a></p>
998
<li><p id="change-0.6.6-22"><span class="target" id="change-9329ac8a67c101712cc52dcd1ef51dfe"><strong>[sql] </strong></span>The ‘info’ attribute of Column is copied during
999
Column.copy(), i.e. as occurs when using columns
1000
in declarative mixins.<a class="changeset-link reference internal" href="#change-9329ac8a67c101712cc52dcd1ef51dfe">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1967">#1967</a></p>
1003
<li><p id="change-0.6.6-23"><span class="target" id="change-313ab80f4ccba634879714775e2d1937"><strong>[sql] </strong></span>Added a bind processor for booleans which coerces
1004
to int, for DBAPIs such as pymssql that naively call
1005
str() on values.<a class="changeset-link reference internal" href="#change-313ab80f4ccba634879714775e2d1937">(link)</a><p></p>
1008
<li><p id="change-0.6.6-24"><span class="target" id="change-c6bca81c575803cd5d89152c9793de63"><strong>[sql] </strong></span>CheckConstraint will copy its ‘initially’, ‘deferrable’,
1009
and ‘_create_rule’ attributes within a copy()/tometadata()<a class="changeset-link reference internal" href="#change-c6bca81c575803cd5d89152c9793de63">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2000">#2000</a></p>
1014
<div class="section" id="change-0.6.6-postgresql">
1015
<h3>postgresql<a class="headerlink" href="#change-0.6.6-postgresql" title="Permalink to this headline">¶</a></h3>
1017
<li><p id="change-0.6.6-25"><span class="target" id="change-6dfbe255f49659e489e09c208c1d7bee"><strong>[postgresql] </strong></span>Single element tuple expressions inside an IN clause
1018
parenthesize correctly, also from<a class="changeset-link reference internal" href="#change-6dfbe255f49659e489e09c208c1d7bee">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1984">#1984</a></p>
1021
<li><p id="change-0.6.6-26"><span class="target" id="change-55c1f840b71087d0e09bb8bc2afa14e4"><strong>[postgresql] </strong></span>Ensured every numeric, float, int code, scalar + array,
1022
are recognized by psycopg2 and pg8000’s “numeric”
1023
base type.<a class="changeset-link reference internal" href="#change-55c1f840b71087d0e09bb8bc2afa14e4">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1955">#1955</a></p>
1026
<li><p id="change-0.6.6-27"><span class="target" id="change-0e07e9da5e3d2dc702aaf8213f255dc2"><strong>[postgresql] </strong></span>Added as_uuid=True flag to the UUID type, will receive
1027
and return values as Python UUID() objects rather than
1028
strings. Currently, the UUID type is only known to
1029
work with psycopg2.<a class="changeset-link reference internal" href="#change-0e07e9da5e3d2dc702aaf8213f255dc2">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1956">#1956</a></p>
1032
<li><p id="change-0.6.6-28"><span class="target" id="change-6f1e93205663537c4ef282d5cfc3edef"><strong>[postgresql] </strong></span>Fixed bug whereby KeyError would occur with non-ENUM
1033
supported PG versions after a pool dispose+recreate
1034
would occur.<a class="changeset-link reference internal" href="#change-6f1e93205663537c4ef282d5cfc3edef">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1989">#1989</a></p>
1039
<div class="section" id="change-0.6.6-mysql">
1040
<h3>mysql<a class="headerlink" href="#change-0.6.6-mysql" title="Permalink to this headline">¶</a></h3>
1042
<li><p id="change-0.6.6-29"><span class="target" id="change-15404de376dfeacb313c1bcb2ee66a33"><strong>[mysql] </strong></span>Fixed error handling for Jython + zxjdbc, such that
1043
has_table() property works again. Regression from
1044
0.6.3 (we don’t have a Jython buildbot, sorry)<a class="changeset-link reference internal" href="#change-15404de376dfeacb313c1bcb2ee66a33">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1960">#1960</a></p>
1049
<div class="section" id="change-0.6.6-sqlite">
1050
<h3>sqlite<a class="headerlink" href="#change-0.6.6-sqlite" title="Permalink to this headline">¶</a></h3>
1052
<li><p id="change-0.6.6-30"><span class="target" id="change-6d83957f57c2e3d7f41b95967ddb322c"><strong>[sqlite] </strong></span>The REFERENCES clause in a CREATE TABLE that includes
1053
a remote schema to another table with the same schema
1054
name now renders the remote name without
1055
the schema clause, as required by SQLite.<a class="changeset-link reference internal" href="#change-6d83957f57c2e3d7f41b95967ddb322c">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1851">#1851</a></p>
1058
<li><p id="change-0.6.6-31"><span class="target" id="change-c7c69439e2cc0ec7af6b3dffa8a3a86f"><strong>[sqlite] </strong></span>On the same theme, the REFERENCES clause in a CREATE TABLE
1059
that includes a remote schema to a <em>different</em> schema
1060
than that of the parent table doesn’t render at all,
1061
as cross-schema references do not appear to be supported.<a class="changeset-link reference internal" href="#change-c7c69439e2cc0ec7af6b3dffa8a3a86f">(link)</a><p></p>
1066
<div class="section" id="change-0.6.6-mssql">
1067
<h3>mssql<a class="headerlink" href="#change-0.6.6-mssql" title="Permalink to this headline">¶</a></h3>
1069
<li><p id="change-0.6.6-32"><span class="target" id="change-445f4c11a73f0a2d7a02c8297f45a174"><strong>[mssql] </strong></span>The rewrite of index reflection in was
1070
unfortunately not tested correctly, and returned incorrect
1071
results. This regression is now fixed.<a class="changeset-link reference internal" href="#change-445f4c11a73f0a2d7a02c8297f45a174">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1770">#1770</a></p>
1076
<div class="section" id="change-0.6.6-oracle">
1077
<h3>oracle<a class="headerlink" href="#change-0.6.6-oracle" title="Permalink to this headline">¶</a></h3>
1079
<li><p id="change-0.6.6-33"><span class="target" id="change-2ccadf16ce306a495b45d7e349e3a56d"><strong>[oracle] </strong></span>The cx_oracle “decimal detection” logic, which takes place
1080
for result set columns with ambiguous numeric characteristics,
1081
now uses the decimal point character determined by the locale/
1082
NLS_LANG setting, using an on-first-connect detection of
1083
this character. cx_oracle 5.0.3 or greater is also required
1084
when using a non-period-decimal-point NLS_LANG setting..<a class="changeset-link reference internal" href="#change-2ccadf16ce306a495b45d7e349e3a56d">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1953">#1953</a></p>
1089
<div class="section" id="change-0.6.6-firebird">
1090
<h3>firebird<a class="headerlink" href="#change-0.6.6-firebird" title="Permalink to this headline">¶</a></h3>
1092
<li><p id="change-0.6.6-34"><span class="target" id="change-cefc7fd8608289b2871c372d3f415aa1"><strong>[firebird] </strong></span>Firebird numeric type now checks for Decimal explicitly,
1093
lets float() pass right through, thereby allowing
1094
special values such as float(‘inf’).<a class="changeset-link reference internal" href="#change-cefc7fd8608289b2871c372d3f415aa1">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2012">#2012</a></p>
1099
<div class="section" id="change-0.6.6-misc">
1100
<h3>misc<a class="headerlink" href="#change-0.6.6-misc" title="Permalink to this headline">¶</a></h3>
1102
<li><p id="change-0.6.6-35"><span class="target" id="change-589cc5d2ae80b9d8ba7435234c630b85"><strong>[sqlsoup] </strong></span>Added “map_to()” method to SqlSoup, which is a “master”
1103
method which accepts explicit arguments for each aspect of
1104
the selectable and mapping, including a base class per
1105
mapping.<a class="changeset-link reference internal" href="#change-589cc5d2ae80b9d8ba7435234c630b85">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1975">#1975</a></p>
1108
<li><p id="change-0.6.6-36"><span class="target" id="change-c8bc4f5b37cc4e77cd766cce0179426c"><strong>[sqlsoup] </strong></span>Mapped selectables used with the map(), with_labels(),
1109
join() methods no longer put the given argument into the
1110
internal “cache” dictionary. Particularly since the
1111
join() and select() objects are created in the method
1112
itself this was pretty much a pure memory leaking behavior.<a class="changeset-link reference internal" href="#change-c8bc4f5b37cc4e77cd766cce0179426c">(link)</a><p></p>
1115
<li><p id="change-0.6.6-37"><span class="target" id="change-cdab141baa9b101f65543811538eaad3"><strong>[examples] </strong></span>The versioning example now supports detection of changes
1116
in an associated relationship().<a class="changeset-link reference internal" href="#change-cdab141baa9b101f65543811538eaad3">(link)</a><p></p>
1122
<div class="section" id="change-0.6.5">
1123
<h2>0.6.5<a class="headerlink" href="#change-0.6.5" title="Permalink to this headline">¶</a></h2>
1124
Released: Sun Oct 24 2010<div class="section" id="change-0.6.5-orm">
1125
<h3>orm<a class="headerlink" href="#change-0.6.5-orm" title="Permalink to this headline">¶</a></h3>
1127
<li><p id="change-0.6.5-0"><span class="target" id="change-05ec37b51f434e62c267fe20d4e58c7e"><strong>[orm] </strong></span>Added a new “lazyload” option “immediateload”.
1128
Issues the usual “lazy” load operation automatically
1129
as the object is populated. The use case
1130
here is when loading objects to be placed in
1131
an offline cache, or otherwise used after
1132
the session isn’t available, and straight ‘select’
1133
loading, not ‘joined’ or ‘subquery’, is desired.<a class="changeset-link reference internal" href="#change-05ec37b51f434e62c267fe20d4e58c7e">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1914">#1914</a></p>
1136
<li><p id="change-0.6.5-1"><span class="target" id="change-10955dae4ce54a020b91ac0a8757e360"><strong>[orm] </strong></span>New Query methods: query.label(name), query.as_scalar(),
1137
return the query’s statement as a scalar subquery
1138
with /without label;
1139
query.with_entities(<a href="#id1"><span class="problematic" id="id2">*</span></a>ent), replaces the SELECT list of
1140
the query with new entities.
1141
Roughly equivalent to a generative form of query.values()
1142
which accepts mapped entities as well as column
1143
expressions.<a class="changeset-link reference internal" href="#change-10955dae4ce54a020b91ac0a8757e360">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1920">#1920</a></p>
1146
<li><p id="change-0.6.5-2"><span class="target" id="change-d784a2da322b348050aefe3c6258ba39"><strong>[orm] </strong></span>Fixed recursion bug which could occur when moving
1147
an object from one reference to another, with
1148
backrefs involved, where the initiating parent
1149
was a subclass (with its own mapper) of the
1150
previous parent.<a class="changeset-link reference internal" href="#change-d784a2da322b348050aefe3c6258ba39">(link)</a><p></p>
1153
<li><p id="change-0.6.5-3"><span class="target" id="change-6af93b4a17eb71913cf760ae65958264"><strong>[orm] </strong></span>Fixed a regression in 0.6.4 which occurred if you
1154
passed an empty list to “include_properties” on
1155
mapper()<a class="changeset-link reference internal" href="#change-6af93b4a17eb71913cf760ae65958264">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1918">#1918</a></p>
1158
<li><p id="change-0.6.5-4"><span class="target" id="change-b79708d8c7a705b6ac80798508585034"><strong>[orm] </strong></span>Fixed labeling bug in Query whereby the NamedTuple
1159
would mis-apply labels if any of the column
1160
expressions were un-labeled.<a class="changeset-link reference internal" href="#change-b79708d8c7a705b6ac80798508585034">(link)</a><p></p>
1163
<li><p id="change-0.6.5-5"><span class="target" id="change-3ce4439ac51efb211009bf9295f36135"><strong>[orm] </strong></span>Patched a case where query.join() would adapt the
1164
right side to the right side of the left’s join
1165
inappropriately<a class="changeset-link reference internal" href="#change-3ce4439ac51efb211009bf9295f36135">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1925">#1925</a></p>
1168
<li><p id="change-0.6.5-6"><span class="target" id="change-2520d6ed386bd5f52025b2ea26acaf3c"><strong>[orm] </strong></span>Query.select_from() has been beefed up to help
1169
ensure that a subsequent call to query.join()
1170
will use the select_from() entity, assuming it’s
1171
a mapped entity and not a plain selectable,
1172
as the default “left” side, not the first entity
1173
in the Query object’s list of entities.<a class="changeset-link reference internal" href="#change-2520d6ed386bd5f52025b2ea26acaf3c">(link)</a><p></p>
1176
<li><p id="change-0.6.5-7"><span class="target" id="change-6ac225a74a7670ddfe45fd42b639020c"><strong>[orm] </strong></span>The exception raised by Session when it is used
1177
subsequent to a subtransaction rollback (which is what
1178
happens when a flush fails in autocommit=False mode) has
1179
now been reworded (this is the “inactive due to a
1180
rollback in a subtransaction” message). In particular,
1181
if the rollback was due to an exception during flush(),
1182
the message states this is the case, and reiterates the
1183
string form of the original exception that occurred
1184
during flush. If the session is closed due to explicit
1185
usage of subtransactions (not very common), the message
1186
just states this is the case.<a class="changeset-link reference internal" href="#change-6ac225a74a7670ddfe45fd42b639020c">(link)</a><p></p>
1189
<li><p id="change-0.6.5-8"><span class="target" id="change-d238e9c9585eb81bc60ff2f4cd32320f"><strong>[orm] </strong></span>The exception raised by Mapper when repeated requests to
1190
its initialization are made after initialization already
1191
failed no longer assumes the “hasattr” case, since
1192
there’s other scenarios in which this message gets
1193
emitted, and the message also does not compound onto
1194
itself multiple times - you get the same message for
1195
each attempt at usage. The misnomer “compiles” is being
1196
traded out for “initialize”.<a class="changeset-link reference internal" href="#change-d238e9c9585eb81bc60ff2f4cd32320f">(link)</a><p></p>
1199
<li><p id="change-0.6.5-9"><span class="target" id="change-9ec0c4f2f483bf5d304f33c8593de5d9"><strong>[orm] </strong></span>Fixed bug in query.update() where ‘evaluate’ or ‘fetch’
1200
expiration would fail if the column expression key was
1201
a class attribute with a different keyname as the
1202
actual column name.<a class="changeset-link reference internal" href="#change-9ec0c4f2f483bf5d304f33c8593de5d9">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1935">#1935</a></p>
1205
<li><p id="change-0.6.5-10"><span class="target" id="change-d84b4cf05c01f57aba9894d09098d696"><strong>[orm] </strong></span>Added an assertion during flush which ensures
1206
that no NULL-holding identity keys were generated
1207
on “newly persistent” objects.
1208
This can occur when user defined code inadvertently
1209
triggers flushes on not-fully-loaded objects.<a class="changeset-link reference internal" href="#change-d84b4cf05c01f57aba9894d09098d696">(link)</a><p></p>
1212
<li><p id="change-0.6.5-11"><span class="target" id="change-83d77852281b4f90915f5a66c5aeb2f4"><strong>[orm] </strong></span>lazy loads for relationship attributes now use
1213
the current state, not the “committed” state,
1214
of foreign and primary key attributes
1215
when issuing SQL, if a flush is not in process.
1216
Previously, only the database-committed state would
1217
be used. In particular, this would cause a many-to-one
1218
get()-on-lazyload operation to fail, as autoflush
1219
is not triggered on these loads when the attributes are
1220
determined and the “committed” state may not be
1221
available.<a class="changeset-link reference internal" href="#change-83d77852281b4f90915f5a66c5aeb2f4">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1910">#1910</a></p>
1224
<li><p id="change-0.6.5-12"><span class="target" id="change-54bd435e0495c759195b5a89782f09f3"><strong>[orm] </strong></span>A new flag on relationship(), load_on_pending, allows
1225
the lazy loader to fire off on pending objects without a
1226
flush taking place, as well as a transient object that’s
1227
been manually “attached” to the session. Note that this
1228
flag blocks attribute events from taking place when an
1229
object is loaded, so backrefs aren’t available until
1230
after a flush. The flag is only intended for very
1231
specific use cases.<a class="changeset-link reference internal" href="#change-54bd435e0495c759195b5a89782f09f3">(link)</a><p></p>
1234
<li><p id="change-0.6.5-13"><span class="target" id="change-080a574eb24dbc2249cb0cf42cd0c506"><strong>[orm] </strong></span>Another new flag on relationship(), cascade_backrefs,
1235
disables the “save-update” cascade when the event was
1236
initiated on the “reverse” side of a bidirectional
1237
relationship. This is a cleaner behavior so that
1238
many-to-ones can be set on a transient object without
1239
it getting sucked into the child object’s session,
1240
while still allowing the forward collection to
1241
cascade. We <em>might</em> default this to False in 0.7.<a class="changeset-link reference internal" href="#change-080a574eb24dbc2249cb0cf42cd0c506">(link)</a><p></p>
1244
<li><p id="change-0.6.5-14"><span class="target" id="change-cd1698eb18bf61cf0da5afee7a5e7c4a"><strong>[orm] </strong></span>Slight improvement to the behavior of
1245
“passive_updates=False” when placed only on the
1246
many-to-one side of a relationship; documentation has
1247
been clarified that passive_updates=False should really
1248
be on the one-to-many side.<a class="changeset-link reference internal" href="#change-cd1698eb18bf61cf0da5afee7a5e7c4a">(link)</a><p></p>
1251
<li><p id="change-0.6.5-15"><span class="target" id="change-cad7611b381713d7cffe14e33ee704bf"><strong>[orm] </strong></span>Placing passive_deletes=True on a many-to-one emits
1252
a warning, since you probably intended to put it on
1253
the one-to-many side.<a class="changeset-link reference internal" href="#change-cad7611b381713d7cffe14e33ee704bf">(link)</a><p></p>
1256
<li><p id="change-0.6.5-16"><span class="target" id="change-6b88ae16dd7b28d9830d7684992e3cb7"><strong>[orm] </strong></span>Fixed bug that would prevent “subqueryload” from
1257
working correctly with single table inheritance
1258
for a relationship from a subclass - the “where
1259
type in (x, y, z)” only gets placed on the inside,
1260
instead of repeatedly.<a class="changeset-link reference internal" href="#change-6b88ae16dd7b28d9830d7684992e3cb7">(link)</a><p></p>
1263
<li><p id="change-0.6.5-17"><span class="target" id="change-34f0bff0696715bf8cb3e59f6d10b4bb"><strong>[orm] </strong></span>When using from_self() with single table inheritance,
1264
the “where type in (x, y, z)” is placed on the outside
1265
of the query only, instead of repeatedly. May make
1266
some more adjustments to this.<a class="changeset-link reference internal" href="#change-34f0bff0696715bf8cb3e59f6d10b4bb">(link)</a><p></p>
1269
<li><p id="change-0.6.5-18"><span class="target" id="change-b008ec0e6f859c0904e7abd78a62457f"><strong>[orm] </strong></span>scoped_session emits a warning when configure() is
1270
called if a Session is already present (checks only the
1271
current thread)<a class="changeset-link reference internal" href="#change-b008ec0e6f859c0904e7abd78a62457f">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1924">#1924</a></p>
1274
<li><p id="change-0.6.5-19"><span class="target" id="change-63bb35cc7429215a5a693a352a838a9b"><strong>[orm] </strong></span>reworked the internals of mapper.cascade_iterator() to
1275
cut down method calls by about 9% in some circumstances.<a class="changeset-link reference internal" href="#change-63bb35cc7429215a5a693a352a838a9b">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1932">#1932</a></p>
1280
<div class="section" id="change-0.6.5-orm-declarative">
1281
<h3>orm declarative<a class="headerlink" href="#change-0.6.5-orm-declarative" title="Permalink to this headline">¶</a></h3>
1283
<li><p id="change-0.6.5-20"><span class="target" id="change-b19f9aa816f9e63c03fa209095e76f51"><strong>[declarative] [orm] </strong></span>@classproperty (soon/now @declared_attr) takes effect for
1284
__mapper_args__, __table_args__, __tablename__ on
1285
a base class that is not a mixin, as well as mixins.<a class="changeset-link reference internal" href="#change-b19f9aa816f9e63c03fa209095e76f51">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1922">#1922</a></p>
1288
<li><p id="change-0.6.5-21"><span class="target" id="change-b9792dc15f6375711ec84bb73ae74272"><strong>[declarative] [orm] </strong></span>@classproperty ‘s official name/location for usage
1289
with declarative is sqlalchemy.ext.declarative.declared_attr.
1290
Same thing, but moving there since it is more of a
1291
“marker” that’s specific to declararative,
1292
not just an attribute technique.<a class="changeset-link reference internal" href="#change-b9792dc15f6375711ec84bb73ae74272">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1915">#1915</a></p>
1295
<li><p id="change-0.6.5-22"><span class="target" id="change-172b80261166fbfb39ffe45d8499afe2"><strong>[declarative] [orm] </strong></span>Fixed bug whereby columns on a mixin wouldn’t propagate
1296
correctly to a single-table, or joined-table,
1297
inheritance scheme where the attribute name is
1298
different than that of the column.,.<a class="changeset-link reference internal" href="#change-172b80261166fbfb39ffe45d8499afe2">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1931">#1931</a>, <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1930">#1930</a></p>
1301
<li><p id="change-0.6.5-23"><span class="target" id="change-b0075b372f99003ca5b69e678f306150"><strong>[declarative] [orm] </strong></span>A mixin can now specify a column that overrides
1302
a column of the same name associated with a superclass.
1303
Thanks to Oystein Haaland.<a class="changeset-link reference internal" href="#change-b0075b372f99003ca5b69e678f306150">(link)</a><p></p>
1308
<div class="section" id="change-0.6.5-engine">
1309
<h3>engine<a class="headerlink" href="#change-0.6.5-engine" title="Permalink to this headline">¶</a></h3>
1311
<li><p id="change-0.6.5-24"><span class="target" id="change-1059318af334dfde665aff47590e8542"><strong>[engine] </strong></span>Fixed a regression in 0.6.4 whereby the change that
1312
allowed cursor errors to be raised consistently broke
1313
the result.lastrowid accessor. Test coverage has
1314
been added for result.lastrowid. Note that lastrowid
1315
is only supported by Pysqlite and some MySQL drivers,
1316
so isn’t super-useful in the general case.<a class="changeset-link reference internal" href="#change-1059318af334dfde665aff47590e8542">(link)</a><p></p>
1319
<li><p id="change-0.6.5-25"><span class="target" id="change-ebd200888550cee6694d854883573fa6"><strong>[engine] </strong></span>the logging message emitted by the engine when
1320
a connection is first used is now “BEGIN (implicit)”
1321
to emphasize that DBAPI has no explicit begin().<a class="changeset-link reference internal" href="#change-ebd200888550cee6694d854883573fa6">(link)</a><p></p>
1324
<li><p id="change-0.6.5-26"><span class="target" id="change-583d616a6e6d2ed7c2874a91f7e8b83a"><strong>[engine] </strong></span>added “views=True” option to metadata.reflect(),
1325
will add the list of available views to those
1326
being reflected.<a class="changeset-link reference internal" href="#change-583d616a6e6d2ed7c2874a91f7e8b83a">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1936">#1936</a></p>
1329
<li><p id="change-0.6.5-27"><span class="target" id="change-50d5bffb777603ddce658a6a67b8e205"><strong>[engine] </strong></span>engine_from_config() now accepts ‘debug’ for
1330
‘echo’, ‘echo_pool’, ‘force’ for ‘convert_unicode’,
1331
boolean values for ‘use_native_unicode’.<a class="changeset-link reference internal" href="#change-50d5bffb777603ddce658a6a67b8e205">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1899">#1899</a></p>
1336
<div class="section" id="change-0.6.5-sql">
1337
<h3>sql<a class="headerlink" href="#change-0.6.5-sql" title="Permalink to this headline">¶</a></h3>
1339
<li><p id="change-0.6.5-28"><span class="target" id="change-38a4e7cd800b41adf3d50801a7f7cb1b"><strong>[sql] </strong></span>Fixed bug in TypeDecorator whereby the dialect-specific
1340
type was getting pulled in to generate the DDL for a
1341
given type, which didn’t always return the correct result.<a class="changeset-link reference internal" href="#change-38a4e7cd800b41adf3d50801a7f7cb1b">(link)</a><p></p>
1344
<li><p id="change-0.6.5-29"><span class="target" id="change-1f4462b0b5fe565c42d2a26adc200c72"><strong>[sql] </strong></span>TypeDecorator can now have a fully constructed type
1345
specified as its “impl”, in addition to a type class.<a class="changeset-link reference internal" href="#change-1f4462b0b5fe565c42d2a26adc200c72">(link)</a><p></p>
1348
<li><p id="change-0.6.5-30"><span class="target" id="change-9dc92f16ad4db3c34c0aa4eae14c851f"><strong>[sql] </strong></span>TypeDecorator will now place itself as the resulting
1349
type for a binary expression where the type coercion
1350
rules would normally return its impl type - previously,
1351
a copy of the impl type would be returned which would
1352
have the TypeDecorator embedded into it as the “dialect”
1353
impl, this was probably an unintentional way of achieving
1354
the desired effect.<a class="changeset-link reference internal" href="#change-9dc92f16ad4db3c34c0aa4eae14c851f">(link)</a><p></p>
1357
<li><p id="change-0.6.5-31"><span class="target" id="change-2b8e904daae0d182fbf0aaa6bca9d64b"><strong>[sql] </strong></span>TypeDecorator.load_dialect_impl() returns “self.impl” by
1358
default, i.e. not the dialect implementation type of
1359
“self.impl”. This to support compilation correctly.
1360
Behavior can be user-overridden in exactly the same way
1361
as before to the same effect.<a class="changeset-link reference internal" href="#change-2b8e904daae0d182fbf0aaa6bca9d64b">(link)</a><p></p>
1364
<li><p id="change-0.6.5-32"><span class="target" id="change-5f6436f4c6adbb07cdec29782b336960"><strong>[sql] </strong></span>Added type_coerce(expr, <a href="#id15"><span class="problematic" id="id16">type_</span></a>) expression element.
1365
Treats the given expression as the given type when evaluating
1366
expressions and processing result rows, but does not
1367
affect the generation of SQL, other than an anonymous
1368
label.<a class="changeset-link reference internal" href="#change-5f6436f4c6adbb07cdec29782b336960">(link)</a><p></p>
1371
<li><p id="change-0.6.5-33"><span class="target" id="change-6c855e196152b57c304b333e9770fa07"><strong>[sql] </strong></span>Table.tometadata() now copies Index objects associated
1372
with the Table as well.<a class="changeset-link reference internal" href="#change-6c855e196152b57c304b333e9770fa07">(link)</a><p></p>
1375
<li><p id="change-0.6.5-34"><span class="target" id="change-81cb47d5917f4a66ca50b654ececaf77"><strong>[sql] </strong></span>Table.tometadata() issues a warning if the given Table
1376
is already present in the target MetaData - the existing
1377
Table object is returned.<a class="changeset-link reference internal" href="#change-81cb47d5917f4a66ca50b654ececaf77">(link)</a><p></p>
1380
<li><p id="change-0.6.5-35"><span class="target" id="change-6c2eaa8e6ce7b6c71555f1222eccbb27"><strong>[sql] </strong></span>An informative error message is raised if a Column
1381
which has not yet been assigned a name, i.e. as in
1382
declarative, is used in a context where it is
1383
exported to the columns collection of an enclosing
1384
select() construct, or if any construct involving
1385
that column is compiled before its name is
1386
assigned.<a class="changeset-link reference internal" href="#change-6c2eaa8e6ce7b6c71555f1222eccbb27">(link)</a><p></p>
1389
<li><p id="change-0.6.5-36"><span class="target" id="change-69ad40851eefcd610d8d70ebd3511697"><strong>[sql] </strong></span>as_scalar(), label() can be called on a selectable
1390
which contains a Column that is not yet named.<a class="changeset-link reference internal" href="#change-69ad40851eefcd610d8d70ebd3511697">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1862">#1862</a></p>
1393
<li><p id="change-0.6.5-37"><span class="target" id="change-fcb44a57a6160aab1d8c4e8427c9b044"><strong>[sql] </strong></span>Fixed recursion overflow which could occur when operating
1394
with two expressions both of type “NullType”, but
1395
not the singleton NULLTYPE instance.<a class="changeset-link reference internal" href="#change-fcb44a57a6160aab1d8c4e8427c9b044">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1907">#1907</a></p>
1400
<div class="section" id="change-0.6.5-postgresql">
1401
<h3>postgresql<a class="headerlink" href="#change-0.6.5-postgresql" title="Permalink to this headline">¶</a></h3>
1403
<li><p id="change-0.6.5-38"><span class="target" id="change-4d094ee39f2d2bfb4cbd1e9cd2912640"><strong>[postgresql] </strong></span>Added “as_tuple” flag to ARRAY type, returns results
1404
as tuples instead of lists to allow hashing.<a class="changeset-link reference internal" href="#change-4d094ee39f2d2bfb4cbd1e9cd2912640">(link)</a><p></p>
1407
<li><p id="change-0.6.5-39"><span class="target" id="change-5b9e6f2e203f6ec007fcf90d5d5d9e90"><strong>[postgresql] </strong></span>Fixed bug which prevented “domain” built from a
1408
custom type such as “enum” from being reflected.<a class="changeset-link reference internal" href="#change-5b9e6f2e203f6ec007fcf90d5d5d9e90">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1933">#1933</a></p>
1413
<div class="section" id="change-0.6.5-mysql">
1414
<h3>mysql<a class="headerlink" href="#change-0.6.5-mysql" title="Permalink to this headline">¶</a></h3>
1416
<li><p id="change-0.6.5-40"><span class="target" id="change-e8d0855d359fcbb93416e1b0988fdb8e"><strong>[mysql] </strong></span>Fixed bug involving reflection of CURRENT_TIMESTAMP
1417
default used with ON UPDATE clause, thanks to
1418
Taavi Burns<a class="changeset-link reference internal" href="#change-e8d0855d359fcbb93416e1b0988fdb8e">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1940">#1940</a></p>
1423
<div class="section" id="change-0.6.5-mssql">
1424
<h3>mssql<a class="headerlink" href="#change-0.6.5-mssql" title="Permalink to this headline">¶</a></h3>
1426
<li><p id="change-0.6.5-41"><span class="target" id="change-f16e997950ea6bca39c0a059887dfbfd"><strong>[mssql] </strong></span>Fixed reflection bug which did not properly handle
1427
reflection of unknown types.<a class="changeset-link reference internal" href="#change-f16e997950ea6bca39c0a059887dfbfd">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1946">#1946</a></p>
1430
<li><p id="change-0.6.5-42"><span class="target" id="change-022e82021b20bc2c059207eb8b7234af"><strong>[mssql] </strong></span>Fixed bug where aliasing of tables with “schema” would
1431
fail to compile properly.<a class="changeset-link reference internal" href="#change-022e82021b20bc2c059207eb8b7234af">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1943">#1943</a></p>
1434
<li><p id="change-0.6.5-43"><span class="target" id="change-9f19687a241d918bf9dd03d0cc3ff3ed"><strong>[mssql] </strong></span>Rewrote the reflection of indexes to use sys.
1435
catalogs, so that column names of any configuration
1436
(spaces, embedded commas, etc.) can be reflected.
1437
Note that reflection of indexes requires SQL
1438
Server 2005 or greater.<a class="changeset-link reference internal" href="#change-9f19687a241d918bf9dd03d0cc3ff3ed">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1770">#1770</a></p>
1441
<li><p id="change-0.6.5-44"><span class="target" id="change-ffe886676fb15f105e1a8cc37dfb6f9d"><strong>[mssql] </strong></span>mssql+pymssql dialect now honors the “port” portion
1442
of the URL instead of discarding it.<a class="changeset-link reference internal" href="#change-ffe886676fb15f105e1a8cc37dfb6f9d">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1952">#1952</a></p>
1447
<div class="section" id="change-0.6.5-oracle">
1448
<h3>oracle<a class="headerlink" href="#change-0.6.5-oracle" title="Permalink to this headline">¶</a></h3>
1450
<li><p id="change-0.6.5-45"><span class="target" id="change-b1ce6e2ee29e5229dafefbb51f14def2"><strong>[oracle] </strong></span>The implicit_retunring argument to create_engine()
1451
is now honored regardless of detected version of
1452
Oracle. Previously, the flag would be forced
1453
to False if server version info was < 10.<a class="changeset-link reference internal" href="#change-b1ce6e2ee29e5229dafefbb51f14def2">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1878">#1878</a></p>
1458
<div class="section" id="change-0.6.5-misc">
1459
<h3>misc<a class="headerlink" href="#change-0.6.5-misc" title="Permalink to this headline">¶</a></h3>
1461
<li><p id="change-0.6.5-46"><span class="target" id="change-8af323a4cf559c67e71f9b667f9548f5"><strong>[informix] </strong></span><em>Major</em> cleanup / modernization of the Informix
1462
dialect for 0.6, courtesy Florian Apolloner.<a class="changeset-link reference internal" href="#change-8af323a4cf559c67e71f9b667f9548f5">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1906">#1906</a></p>
1465
<li><p id="change-0.6.5-47"><span class="target" id="change-e6cb2547ce70b9a4f2dec84481578326"><strong>[tests] </strong></span>the NoseSQLAlchemyPlugin has been moved to a
1466
new package “sqlalchemy_nose” which installs
1467
along with “sqlalchemy”. This so that the “nosetests”
1468
script works as always but also allows the
1469
–with-coverage option to turn on coverage before
1470
SQLAlchemy modules are imported, allowing coverage
1471
to work correctly.<a class="changeset-link reference internal" href="#change-e6cb2547ce70b9a4f2dec84481578326">(link)</a><p></p>
1474
<li><p id="change-0.6.5-48"><span class="target" id="change-2643e47a8fea315fd31765418be4607e"><strong>[misc] </strong></span>CircularDependencyError now has .cycles and .edges
1475
members, which are the set of elements involved in
1476
one or more cycles, and the set of edges as 2-tuples.<a class="changeset-link reference internal" href="#change-2643e47a8fea315fd31765418be4607e">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1890">#1890</a></p>
1482
<div class="section" id="change-0.6.4">
1483
<h2>0.6.4<a class="headerlink" href="#change-0.6.4" title="Permalink to this headline">¶</a></h2>
1484
Released: Tue Sep 07 2010<div class="section" id="change-0.6.4-orm">
1485
<h3>orm<a class="headerlink" href="#change-0.6.4-orm" title="Permalink to this headline">¶</a></h3>
1487
<li><p id="change-0.6.4-0"><span class="target" id="change-535033df965223821f740fe36bbc21c8"><strong>[orm] </strong></span>The name ConcurrentModificationError has been
1488
changed to StaleDataError, and descriptive
1489
error messages have been revised to reflect
1490
exactly what the issue is. Both names will
1491
remain available for the forseeable future
1492
for schemes that may be specifying
1493
ConcurrentModificationError in an “except:”
1494
clause.<a class="changeset-link reference internal" href="#change-535033df965223821f740fe36bbc21c8">(link)</a><p></p>
1497
<li><p id="change-0.6.4-1"><span class="target" id="change-c8ed6002ef9d50947734327801710649"><strong>[orm] </strong></span>Added a mutex to the identity map which mutexes
1498
remove operations against iteration methods,
1499
which now pre-buffer before returning an
1500
iterable. This because asyncrhonous gc
1501
can remove items via the gc thread at any time.<a class="changeset-link reference internal" href="#change-c8ed6002ef9d50947734327801710649">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1891">#1891</a></p>
1504
<li><p id="change-0.6.4-2"><span class="target" id="change-c30b33f0a0466c41b96742c2e74aad91"><strong>[orm] </strong></span>The Session class is now present in sqlalchemy.orm.*.
1505
We’re moving away from the usage of create_session(),
1506
which has non-standard defaults, for those situations
1507
where a one-step Session constructor is desired. Most
1508
users should stick with sessionmaker() for general use,
1509
however.<a class="changeset-link reference internal" href="#change-c30b33f0a0466c41b96742c2e74aad91">(link)</a><p></p>
1512
<li><p id="change-0.6.4-3"><span class="target" id="change-8dff7e6fded59f4fa37d00624eb71bed"><strong>[orm] </strong></span>query.with_parent() now accepts transient objects
1513
and will use the non-persistent values of their pk/fk
1514
attributes in order to formulate the criterion.
1515
Docs are also clarified as to the purpose of with_parent().<a class="changeset-link reference internal" href="#change-8dff7e6fded59f4fa37d00624eb71bed">(link)</a><p></p>
1518
<li><p id="change-0.6.4-4"><span class="target" id="change-2638d82e47303db82e79a9e5c1361b30"><strong>[orm] </strong></span>The include_properties and exclude_properties arguments
1519
to mapper() now accept Column objects as members in
1520
addition to strings. This so that same-named Column
1521
objects, such as those within a join(), can be
1522
disambiguated.<a class="changeset-link reference internal" href="#change-2638d82e47303db82e79a9e5c1361b30">(link)</a><p></p>
1525
<li><p id="change-0.6.4-5"><span class="target" id="change-96944473a095ce6dfc07cbc71640f1d9"><strong>[orm] </strong></span>A warning is now emitted if a mapper is created against a
1526
join or other single selectable that includes multiple
1527
columns with the same name in its .c. collection,
1528
and those columns aren’t explictly named as part of
1529
the same or separate attributes (or excluded).
1530
In 0.7 this warning will be an exception. Note that
1531
this warning is not emitted when the combination occurs
1532
as a result of inheritance, so that attributes
1533
still allow being overridden naturally.. In 0.7 this will be improved further.<a class="changeset-link reference internal" href="#change-96944473a095ce6dfc07cbc71640f1d9">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1896">#1896</a></p>
1536
<li><p id="change-0.6.4-6"><span class="target" id="change-95c2749ceb65bb793c5d3667b070c596"><strong>[orm] </strong></span>The primary_key argument to mapper() can now specify
1537
a series of columns that are only a subset of
1538
the calculated “primary key” columns of the mapped
1539
selectable, without an error being raised. This
1540
helps for situations where a selectable’s effective
1541
primary key is simpler than the number of columns
1542
in the selectable that are actually marked as
1543
“primary_key”, such as a join against two
1544
tables on their primary key columns.<a class="changeset-link reference internal" href="#change-95c2749ceb65bb793c5d3667b070c596">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1896">#1896</a></p>
1547
<li><p id="change-0.6.4-7"><span class="target" id="change-fa24485df7e6bb87af279c1ebf82e0ec"><strong>[orm] </strong></span>An object that’s been deleted now gets a flag
1548
‘deleted’, which prohibits the object from
1549
being re-add()ed to the session, as previously
1550
the object would live in the identity map
1551
silently until its attributes were accessed.
1552
The make_transient() function now resets this
1553
flag along with the “key” flag.<a class="changeset-link reference internal" href="#change-fa24485df7e6bb87af279c1ebf82e0ec">(link)</a><p></p>
1556
<li><p id="change-0.6.4-8"><span class="target" id="change-a8fc0dce447503a22a961b5cf7d20ae8"><strong>[orm] </strong></span>make_transient() can be safely called on an
1557
already transient instance.<a class="changeset-link reference internal" href="#change-a8fc0dce447503a22a961b5cf7d20ae8">(link)</a><p></p>
1560
<li><p id="change-0.6.4-9"><span class="target" id="change-6b78024db59658489dadbac75c893b54"><strong>[orm] </strong></span>a warning is emitted in mapper() if the polymorphic_on
1561
column is not present either in direct or derived
1562
form in the mapped selectable or in the
1563
with_polymorphic selectable, instead of silently
1564
ignoring it. Look for this to become an
1565
exception in 0.7.<a class="changeset-link reference internal" href="#change-6b78024db59658489dadbac75c893b54">(link)</a><p></p>
1568
<li><p id="change-0.6.4-10"><span class="target" id="change-4714288dd0e270666ddd8fcd21827ebc"><strong>[orm] </strong></span>Another pass through the series of error messages
1569
emitted when relationship() is configured with
1570
ambiguous arguments. The “foreign_keys”
1571
setting is no longer mentioned, as it is almost
1572
never needed and it is preferable users set up
1573
correct ForeignKey metadata, which is now the
1574
recommendation. If ‘foreign_keys’
1575
is used and is incorrect, the message suggests
1576
the attribute is probably unnecessary. Docs
1577
for the attribute are beefed up. This
1578
because all confused relationship() users on the
1579
ML appear to be attempting to use foreign_keys
1580
due to the message, which only confuses them
1581
further since Table metadata is much clearer.<a class="changeset-link reference internal" href="#change-4714288dd0e270666ddd8fcd21827ebc">(link)</a><p></p>
1584
<li><p id="change-0.6.4-11"><span class="target" id="change-0c977ba4a7beb44f73ec46ff9a6699ac"><strong>[orm] </strong></span>If the “secondary” table has no ForeignKey metadata
1585
and no foreign_keys is set, even though the
1586
user is passing screwed up information, it is assumed
1587
that primary/secondaryjoin expressions should
1588
consider only and all cols in “secondary” to be
1589
foreign. It’s not possible with “secondary” for
1590
the foreign keys to be elsewhere in any case.
1591
A warning is now emitted instead of an error,
1592
and the mapping succeeds.<a class="changeset-link reference internal" href="#change-0c977ba4a7beb44f73ec46ff9a6699ac">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1877">#1877</a></p>
1595
<li><p id="change-0.6.4-12"><span class="target" id="change-9feca02adf52a0e5fcf4763b9b262443"><strong>[orm] </strong></span>Moving an o2m object from one collection to
1596
another, or vice versa changing the referenced
1597
object by an m2o, where the foreign key is also a
1598
member of the primary key, will now be more
1599
carefully checked during flush if the change in
1600
value of the foreign key on the “many” side is the
1601
result of a change in the primary key of the “one”
1602
side, or if the “one” is just a different object.
1603
In one case, a cascade-capable DB would have
1604
cascaded the value already and we need to look at
1605
the “new” PK value to do an UPDATE, in the other we
1606
need to continue looking at the “old”. We now look
1607
at the “old”, assuming passive_updates=True,
1608
unless we know it was a PK switch that
1609
triggered the change.<a class="changeset-link reference internal" href="#change-9feca02adf52a0e5fcf4763b9b262443">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1856">#1856</a></p>
1612
<li><p id="change-0.6.4-13"><span class="target" id="change-7b40a0ed4bb3ad00531e5ece518709c2"><strong>[orm] </strong></span>The value of version_id_col can be changed
1613
manually, and this will result in an UPDATE
1614
of the row. Versioned UPDATEs and DELETEs
1615
now use the “committed” value of the
1616
version_id_col in the WHERE clause and
1617
not the pending changed value. The
1618
version generator is also bypassed if
1619
manual changes are present on the attribute.<a class="changeset-link reference internal" href="#change-7b40a0ed4bb3ad00531e5ece518709c2">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1857">#1857</a></p>
1622
<li><p id="change-0.6.4-14"><span class="target" id="change-8665092a2dcfbeb8cfd12fb215aaa1e2"><strong>[orm] </strong></span>Repaired the usage of merge() when used with
1623
concrete inheriting mappers. Such mappers frequently
1624
have so-called “concrete” attributes, which are
1625
subclass attributes that “disable” propagation from
1626
the parent - these needed to allow a merge()
1627
operation to pass through without effect.<a class="changeset-link reference internal" href="#change-8665092a2dcfbeb8cfd12fb215aaa1e2">(link)</a><p></p>
1630
<li><p id="change-0.6.4-15"><span class="target" id="change-4510836f41e7d0aacd0767c13db1d59b"><strong>[orm] </strong></span>Specifying a non-column based argument
1631
for column_mapped_collection, including string,
1632
text() etc., will raise an error message that
1633
specifically asks for a column element, no longer
1634
misleads with incorrect information about
1635
text() or literal().<a class="changeset-link reference internal" href="#change-4510836f41e7d0aacd0767c13db1d59b">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1863">#1863</a></p>
1638
<li><p id="change-0.6.4-16"><span class="target" id="change-671bef71f312d0040b6a4caf49decd77"><strong>[orm] </strong></span>Similarly, for relationship(), foreign_keys,
1639
remote_side, order_by - all column-based
1640
expressions are enforced - lists of strings
1641
are explicitly disallowed since this is a
1642
very common error<a class="changeset-link reference internal" href="#change-671bef71f312d0040b6a4caf49decd77">(link)</a><p></p>
1645
<li><p id="change-0.6.4-17"><span class="target" id="change-ca14d6f9dcfb96b5f02b1a2ef13fa35d"><strong>[orm] </strong></span>Dynamic attributes don’t support collection
1646
population - added an assertion for when
1647
set_committed_value() is called, as well as
1648
when joinedload() or subqueryload() options
1649
are applied to a dynamic attribute, instead
1650
of failure / silent failure.<a class="changeset-link reference internal" href="#change-ca14d6f9dcfb96b5f02b1a2ef13fa35d">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1864">#1864</a></p>
1653
<li><p id="change-0.6.4-18"><span class="target" id="change-d81765c5426dca3b1ec2a2f05a542dbb"><strong>[orm] </strong></span>Fixed bug whereby generating a Query derived
1654
from one which had the same column repeated
1655
with different label names, typically
1656
in some UNION situations, would fail to
1657
propagate the inner columns completely to
1658
the outer query.<a class="changeset-link reference internal" href="#change-d81765c5426dca3b1ec2a2f05a542dbb">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1852">#1852</a></p>
1661
<li><p id="change-0.6.4-19"><span class="target" id="change-8519514b873baed592912155c0427a1e"><strong>[orm] </strong></span>object_session() raises the proper
1662
UnmappedInstanceError when presented with an
1663
unmapped instance.<a class="changeset-link reference internal" href="#change-8519514b873baed592912155c0427a1e">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1881">#1881</a></p>
1666
<li><p id="change-0.6.4-20"><span class="target" id="change-e79a357376a117fe672113952bbe015b"><strong>[orm] </strong></span>Applied further memoizations to calculated Mapper
1667
properties, with significant (~90%) runtime mapper.py
1668
call count reduction in heavily polymorphic mapping
1669
configurations.<a class="changeset-link reference internal" href="#change-e79a357376a117fe672113952bbe015b">(link)</a><p></p>
1672
<li><p id="change-0.6.4-21"><span class="target" id="change-a71fab65be706a5c214db3ca5b3abbb9"><strong>[orm] </strong></span>mapper _get_col_to_prop private method used
1673
by the versioning example is deprecated;
1674
now use mapper.get_property_by_column() which
1675
will remain the public method for this.<a class="changeset-link reference internal" href="#change-a71fab65be706a5c214db3ca5b3abbb9">(link)</a><p></p>
1678
<li><p id="change-0.6.4-22"><span class="target" id="change-8d5f4593adc4160b12a49dcee66d174f"><strong>[orm] </strong></span>the versioning example works correctly now
1679
if versioning on a col that was formerly
1680
NULL.<a class="changeset-link reference internal" href="#change-8d5f4593adc4160b12a49dcee66d174f">(link)</a><p></p>
1685
<div class="section" id="change-0.6.4-orm-declarative">
1686
<h3>orm declarative<a class="headerlink" href="#change-0.6.4-orm-declarative" title="Permalink to this headline">¶</a></h3>
1688
<li><p id="change-0.6.4-23"><span class="target" id="change-d4f2d73f8008d60634e100a68c13d398"><strong>[declarative] [orm] </strong></span>if @classproperty is used with a regular class-bound
1689
mapper property attribute, it will be called to get the
1690
actual attribute value during initialization. Currently,
1691
there’s no advantage to using @classproperty on a column
1692
or relationship attribute of a declarative class that
1693
isn’t a mixin - evaluation is at the same time as if
1694
@classproperty weren’t used. But here we at least allow
1695
it to function as expected.<a class="changeset-link reference internal" href="#change-d4f2d73f8008d60634e100a68c13d398">(link)</a><p></p>
1698
<li><p id="change-0.6.4-24"><span class="target" id="change-868509e7b789f5e8a014c772349e3eb7"><strong>[declarative] [orm] </strong></span>Fixed bug where “Can’t add additional column” message
1699
would display the wrong name.<a class="changeset-link reference internal" href="#change-868509e7b789f5e8a014c772349e3eb7">(link)</a><p></p>
1704
<div class="section" id="change-0.6.4-engine">
1705
<h3>engine<a class="headerlink" href="#change-0.6.4-engine" title="Permalink to this headline">¶</a></h3>
1707
<li><p id="change-0.6.4-25"><span class="target" id="change-589479e3126e16088d4e863148a31849"><strong>[engine] </strong></span>Calling fetchone() or similar on a result that
1708
has already been exhausted, has been closed,
1709
or is not a result-returning result now
1710
raises ResourceClosedError, a subclass of
1711
InvalidRequestError, in all cases, regardless
1712
of backend. Previously, some DBAPIs would
1713
raise ProgrammingError (i.e. pysqlite), others
1714
would return None leading to downstream breakages
1715
(i.e. MySQL-python).<a class="changeset-link reference internal" href="#change-589479e3126e16088d4e863148a31849">(link)</a><p></p>
1718
<li><p id="change-0.6.4-26"><span class="target" id="change-0c3f6fab852e973ab1d2ba1c54362a92"><strong>[engine] </strong></span>Fixed bug in Connection whereby if a “disconnect”
1719
event occurred in the “initialize” phase of the
1720
first connection pool connect, an AttributeError
1721
would be raised when the Connection would attempt
1722
to invalidate the DBAPI connection.<a class="changeset-link reference internal" href="#change-0c3f6fab852e973ab1d2ba1c54362a92">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1894">#1894</a></p>
1725
<li><p id="change-0.6.4-27"><span class="target" id="change-ab05177ef559d382cd656f5e04d11148"><strong>[engine] </strong></span>Connection, ResultProxy, as well as Session use
1726
ResourceClosedError for all “this
1727
connection/transaction/result is closed” types of
1728
errors.<a class="changeset-link reference internal" href="#change-ab05177ef559d382cd656f5e04d11148">(link)</a><p></p>
1731
<li><p id="change-0.6.4-28"><span class="target" id="change-d4066423ccfa075735e1ebf61f2cbc24"><strong>[engine] </strong></span>Connection.invalidate() can be called more than
1732
once and subsequent calls do nothing.<a class="changeset-link reference internal" href="#change-d4066423ccfa075735e1ebf61f2cbc24">(link)</a><p></p>
1737
<div class="section" id="change-0.6.4-sql">
1738
<h3>sql<a class="headerlink" href="#change-0.6.4-sql" title="Permalink to this headline">¶</a></h3>
1740
<li><p id="change-0.6.4-29"><span class="target" id="change-480b20f80312b137c4a7324b0d657a63"><strong>[sql] </strong></span>Calling execute() on an alias() construct is pending
1741
deprecation for 0.7, as it is not itself an
1742
“executable” construct. It currently “proxies” its
1743
inner element and is conditionally “executable” but
1744
this is not the kind of ambiguity we like these days.<a class="changeset-link reference internal" href="#change-480b20f80312b137c4a7324b0d657a63">(link)</a><p></p>
1747
<li><p id="change-0.6.4-30"><span class="target" id="change-eb5f51e1a650e79182bb020de761924f"><strong>[sql] </strong></span>The execute() and scalar() methods of ClauseElement
1748
are now moved appropriately to the Executable
1749
subclass. ClauseElement.execute()/ scalar() are still
1750
present and are pending deprecation in 0.7, but note
1751
these would always raise an error anyway if you were
1752
not an Executable (unless you were an alias(), see
1753
previous note).<a class="changeset-link reference internal" href="#change-eb5f51e1a650e79182bb020de761924f">(link)</a><p></p>
1756
<li><p id="change-0.6.4-31"><span class="target" id="change-95e0aca2331a7b95d533d515094ccb13"><strong>[sql] </strong></span>Added basic math expression coercion for
1757
Numeric->Integer,
1758
so that resulting type is Numeric regardless
1759
of the direction of the expression.<a class="changeset-link reference internal" href="#change-95e0aca2331a7b95d533d515094ccb13">(link)</a><p></p>
1762
<li><p id="change-0.6.4-32"><span class="target" id="change-a584b4c246f0f778263d5dc8e66808ad"><strong>[sql] </strong></span>Changed the scheme used to generate truncated
1763
“auto” index names when using the “index=True”
1764
flag on Column. The truncation only takes
1765
place with the auto-generated name, not one
1766
that is user-defined (an error would be
1767
raised instead), and the truncation scheme
1768
itself is now based on a fragment of an md5
1769
hash of the identifier name, so that multiple
1770
indexes on columns with similar names still
1771
have unique names.<a class="changeset-link reference internal" href="#change-a584b4c246f0f778263d5dc8e66808ad">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1855">#1855</a></p>
1774
<li><p id="change-0.6.4-33"><span class="target" id="change-cdd20195fab17091c475b43262749a74"><strong>[sql] </strong></span>The generated index name also is based on
1775
a “max index name length” attribute which is
1776
separate from the “max identifier length” -
1777
this to appease MySQL who has a max length
1778
of 64 for index names, separate from their
1779
overall max length of 255.<a class="changeset-link reference internal" href="#change-cdd20195fab17091c475b43262749a74">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1412">#1412</a></p>
1782
<li><p id="change-0.6.4-34"><span class="target" id="change-e0733f3fbe5188168ab9fc6dd0040998"><strong>[sql] </strong></span>the text() construct, if placed in a column
1783
oriented situation, will at least return NULLTYPE
1784
for its type instead of None, allowing it to
1785
be used a little more freely for ad-hoc column
1786
expressions than before. literal_column()
1787
is still the better choice, however.<a class="changeset-link reference internal" href="#change-e0733f3fbe5188168ab9fc6dd0040998">(link)</a><p></p>
1790
<li><p id="change-0.6.4-35"><span class="target" id="change-be54ec2b3e2eb3de741a48665fe37d51"><strong>[sql] </strong></span>Added full description of parent table/column,
1791
target table/column in error message raised when
1792
ForeignKey can’t resolve target.<a class="changeset-link reference internal" href="#change-be54ec2b3e2eb3de741a48665fe37d51">(link)</a><p></p>
1795
<li><p id="change-0.6.4-36"><span class="target" id="change-95d89e7a08c42c04836f4ec67f236a9f"><strong>[sql] </strong></span>Fixed bug whereby replacing composite foreign key
1796
columns in a reflected table would cause an attempt
1797
to remove the reflected constraint from the table
1798
a second time, raising a KeyError.<a class="changeset-link reference internal" href="#change-95d89e7a08c42c04836f4ec67f236a9f">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1865">#1865</a></p>
1801
<li><p id="change-0.6.4-37"><span class="target" id="change-0a8949e6824cfb04db55beb3e85e4aed"><strong>[sql] </strong></span>the _Label construct, i.e. the one that is produced
1802
whenever you say somecol.label(), now counts itself
1803
in its “proxy_set” unioned with that of it’s
1804
contained column’s proxy set, instead of
1805
directly returning that of the contained column.
1806
This allows column correspondence
1807
operations which depend on the identity of the
1808
_Labels themselves to return the correct result<a class="changeset-link reference internal" href="#change-0a8949e6824cfb04db55beb3e85e4aed">(link)</a><p></p>
1811
<li><p id="change-0.6.4-38"><span class="target" id="change-babee0cfb69d9dbe635ee89deaa616d3"><strong>[sql] </strong></span>fixes ORM bug.<a class="changeset-link reference internal" href="#change-babee0cfb69d9dbe635ee89deaa616d3">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1852">#1852</a></p>
1816
<div class="section" id="change-0.6.4-postgresql">
1817
<h3>postgresql<a class="headerlink" href="#change-0.6.4-postgresql" title="Permalink to this headline">¶</a></h3>
1819
<li><p id="change-0.6.4-39"><span class="target" id="change-f20cfbd769e0d3362affb83971075073"><strong>[postgresql] </strong></span>Fixed the psycopg2 dialect to use its
1820
set_isolation_level() method instead of relying
1821
upon the base “SET SESSION ISOLATION” command,
1822
as psycopg2 resets the isolation level on each new
1823
transaction otherwise.<a class="changeset-link reference internal" href="#change-f20cfbd769e0d3362affb83971075073">(link)</a><p></p>
1828
<div class="section" id="change-0.6.4-mssql">
1829
<h3>mssql<a class="headerlink" href="#change-0.6.4-mssql" title="Permalink to this headline">¶</a></h3>
1831
<li><p id="change-0.6.4-40"><span class="target" id="change-653ce1cee9e040e6cd9de66cc99d034d"><strong>[mssql] </strong></span>Fixed “default schema” query to work with
1832
pymssql backend.<a class="changeset-link reference internal" href="#change-653ce1cee9e040e6cd9de66cc99d034d">(link)</a><p></p>
1837
<div class="section" id="change-0.6.4-oracle">
1838
<h3>oracle<a class="headerlink" href="#change-0.6.4-oracle" title="Permalink to this headline">¶</a></h3>
1840
<li><p id="change-0.6.4-41"><span class="target" id="change-c4096e037bacbf97eddd92b0034f98ca"><strong>[oracle] </strong></span>Added ROWID type to the Oracle dialect, for those
1841
cases where an explicit CAST might be needed.<a class="changeset-link reference internal" href="#change-c4096e037bacbf97eddd92b0034f98ca">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1879">#1879</a></p>
1844
<li><p id="change-0.6.4-42"><span class="target" id="change-0c48f10bbe06c8a4b97b10e3f86708d7"><strong>[oracle] </strong></span>Oracle reflection of indexes has been tuned so
1845
that indexes which include some or all primary
1846
key columns, but not the same set of columns
1847
as that of the primary key, are reflected.
1848
Indexes which contain the identical columns
1849
as that of the primary key are skipped within
1850
reflection, as the index in that case is assumed
1851
to be the auto-generated primary key index.
1852
Previously, any index with PK columns present
1853
would be skipped. Thanks to Kent Bower
1854
for the patch.<a class="changeset-link reference internal" href="#change-0c48f10bbe06c8a4b97b10e3f86708d7">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1867">#1867</a></p>
1857
<li><p id="change-0.6.4-43"><span class="target" id="change-ee4487a1aebbf952cb6ceaac4cb47cc8"><strong>[oracle] </strong></span>Oracle now reflects the names of primary key
1858
constraints - also thanks to Kent Bower.<a class="changeset-link reference internal" href="#change-ee4487a1aebbf952cb6ceaac4cb47cc8">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1868">#1868</a></p>
1863
<div class="section" id="change-0.6.4-firebird">
1864
<h3>firebird<a class="headerlink" href="#change-0.6.4-firebird" title="Permalink to this headline">¶</a></h3>
1866
<li><p id="change-0.6.4-44"><span class="target" id="change-92ab44e94581b35f750bf10f4e470570"><strong>[firebird] </strong></span>Fixed bug whereby a column default would fail to
1867
reflect if the “default” keyword were lower case.<a class="changeset-link reference internal" href="#change-92ab44e94581b35f750bf10f4e470570">(link)</a><p></p>
1872
<div class="section" id="change-0.6.4-misc">
1873
<h3>misc<a class="headerlink" href="#change-0.6.4-misc" title="Permalink to this headline">¶</a></h3>
1875
<li><p id="change-0.6.4-45"><span class="target" id="change-431a87a1564f158a2d2ac1b341792ad1"><strong>[informix] </strong></span>Applied patches from to get
1876
basic Informix functionality up again. We
1877
rely upon end-user testing to ensure that
1878
Informix is working to some degree.<a class="changeset-link reference internal" href="#change-431a87a1564f158a2d2ac1b341792ad1">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1904">#1904</a></p>
1881
<li><p id="change-0.6.4-46"><span class="target" id="change-d47912608c4830253d4f01066a3062bb"><strong>[documentation] </strong></span>The docs have been reorganized such that the “API
1882
Reference” section is gone - all the docstrings from
1883
there which were public API are moved into the
1884
context of the main doc section that talks about it.
1885
Main docs divided into “SQLAlchemy Core” and
1886
“SQLAlchemy ORM” sections, mapper/relationship docs
1887
have been broken out. Lots of sections rewritten
1888
and/or reorganized.<a class="changeset-link reference internal" href="#change-d47912608c4830253d4f01066a3062bb">(link)</a><p></p>
1891
<li><p id="change-0.6.4-47"><span class="target" id="change-4d0bf2f6176ff585be192cce5473508e"><strong>[examples] </strong></span>The beaker_caching example has been reorgnized
1892
such that the Session, cache manager,
1893
declarative_base are part of environment, and
1894
custom cache code is portable and now within
1895
“caching_query.py”. This allows the example to
1896
be easier to “drop in” to existing projects.<a class="changeset-link reference internal" href="#change-4d0bf2f6176ff585be192cce5473508e">(link)</a><p></p>
1899
<li><p id="change-0.6.4-48"><span class="target" id="change-723cdb6f299e5eb37115fdceb06a6607"><strong>[examples] </strong></span>the history_meta versioning recipe sets “unique=False”
1900
when copying columns, so that the versioning
1901
table handles multiple rows with repeating values.<a class="changeset-link reference internal" href="#change-723cdb6f299e5eb37115fdceb06a6607">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1887">#1887</a></p>
1907
<div class="section" id="change-0.6.3">
1908
<h2>0.6.3<a class="headerlink" href="#change-0.6.3" title="Permalink to this headline">¶</a></h2>
1909
Released: Thu Jul 15 2010<div class="section" id="change-0.6.3-orm">
1910
<h3>orm<a class="headerlink" href="#change-0.6.3-orm" title="Permalink to this headline">¶</a></h3>
1912
<li><p id="change-0.6.3-0"><span class="target" id="change-4e1bf9516dda613ab1a572293546c083"><strong>[orm] </strong></span>Removed errant many-to-many load in unitofwork
1913
which triggered unnecessarily on expired/unloaded
1914
collections. This load now takes place only if
1915
passive_updates is False and the parent primary
1916
key has changed, or if passive_deletes is False
1917
and a delete of the parent has occurred.<a class="changeset-link reference internal" href="#change-4e1bf9516dda613ab1a572293546c083">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1845">#1845</a></p>
1920
<li><p id="change-0.6.3-1"><span class="target" id="change-e9a54d540af9838dfb180c80efdf1e83"><strong>[orm] </strong></span>Column-entities (i.e. query(Foo.id)) copy their
1921
state more fully when queries are derived from
1922
themselves + a selectable (i.e. from_self(),
1923
union(), etc.), so that join() and such have the
1924
correct state to work from.<a class="changeset-link reference internal" href="#change-e9a54d540af9838dfb180c80efdf1e83">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1853">#1853</a></p>
1927
<li><p id="change-0.6.3-2"><span class="target" id="change-fb73bd1dbda53a059f9cdc6d0d8ccf45"><strong>[orm] </strong></span>Fixed bug where Query.join() would fail if
1928
querying a non-ORM column then joining without
1929
an on clause when a FROM clause is already
1930
present, now raises a checked exception the
1931
same way it does when the clause is not
1932
present.<a class="changeset-link reference internal" href="#change-fb73bd1dbda53a059f9cdc6d0d8ccf45">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1853">#1853</a></p>
1935
<li><p id="change-0.6.3-3"><span class="target" id="change-03a152a294855452e7463fb4ac21ffd6"><strong>[orm] </strong></span>Improved the check for an “unmapped class”,
1936
including the case where the superclass is mapped
1937
but the subclass is not. Any attempts to access
1938
cls._sa_class_manager.mapper now raise
1939
UnmappedClassError().<a class="changeset-link reference internal" href="#change-03a152a294855452e7463fb4ac21ffd6">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1142">#1142</a></p>
1942
<li><p id="change-0.6.3-4"><span class="target" id="change-f9299feaa7fe289b5bdc8377a2dcdb09"><strong>[orm] </strong></span>Added “column_descriptions” accessor to Query,
1943
returns a list of dictionaries containing
1944
naming/typing information about the entities
1945
the Query will return. Can be helpful for
1946
building GUIs on top of ORM queries.<a class="changeset-link reference internal" href="#change-f9299feaa7fe289b5bdc8377a2dcdb09">(link)</a><p></p>
1951
<div class="section" id="change-0.6.3-mysql">
1952
<h3>mysql<a class="headerlink" href="#change-0.6.3-mysql" title="Permalink to this headline">¶</a></h3>
1954
<li><p id="change-0.6.3-5"><span class="target" id="change-40d3531e4ce4a40c3c74e0f48699dccc"><strong>[mysql] </strong></span>The _extract_error_code() method now works
1955
correctly with each MySQL dialect (
1956
MySQL-python, OurSQL, MySQL-Connector-Python,
1957
PyODBC). Previously,
1958
the reconnect logic would fail for OperationalError
1959
conditions, however since MySQLdb and OurSQL
1960
have their own reconnect feature, there was no
1961
symptom for these drivers here unless one
1962
watched the logs.<a class="changeset-link reference internal" href="#change-40d3531e4ce4a40c3c74e0f48699dccc">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1848">#1848</a></p>
1967
<div class="section" id="change-0.6.3-oracle">
1968
<h3>oracle<a class="headerlink" href="#change-0.6.3-oracle" title="Permalink to this headline">¶</a></h3>
1970
<li><p id="change-0.6.3-6"><span class="target" id="change-41dfa08c3915f42b47619e4e28ee162f"><strong>[oracle] </strong></span>More tweaks to cx_oracle Decimal handling.
1971
“Ambiguous” numerics with no decimal place
1972
are coerced to int at the connection handler
1973
level. The advantage here is that ints
1974
come back as ints without SQLA type
1975
objects being involved and without needless
1976
conversion to Decimal first.<p>Unfortunately, some exotic subquery cases
1977
can even see different types between
1978
individual result rows, so the Numeric
1979
handler, when instructed to return Decimal,
1980
can’t take full advantage of “native decimal”
1981
mode and must run isinstance() on every value
1982
to check if its Decimal already. Reopen of</p>
1983
<a class="changeset-link reference internal" href="#change-41dfa08c3915f42b47619e4e28ee162f">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1840">#1840</a></p>
1989
<div class="section" id="change-0.6.2">
1990
<h2>0.6.2<a class="headerlink" href="#change-0.6.2" title="Permalink to this headline">¶</a></h2>
1991
Released: Tue Jul 06 2010<div class="section" id="change-0.6.2-orm">
1992
<h3>orm<a class="headerlink" href="#change-0.6.2-orm" title="Permalink to this headline">¶</a></h3>
1994
<li><p id="change-0.6.2-0"><span class="target" id="change-edf1e1a95a7fcdc97aa5ad0561516766"><strong>[orm] </strong></span>Query.join() will check for a call of the
1995
form query.join(target, clause_expression),
1996
i.e. missing the tuple, and raise an informative
1997
error message that this is the wrong calling form.<a class="changeset-link reference internal" href="#change-edf1e1a95a7fcdc97aa5ad0561516766">(link)</a><p></p>
2000
<li><p id="change-0.6.2-1"><span class="target" id="change-d632a942ba2390aa0d69b7b8d3db7726"><strong>[orm] </strong></span>Fixed bug regarding flushes on self-referential
2001
bi-directional many-to-many relationships, where
2002
two objects made to mutually reference each other
2003
in one flush would fail to insert a row for both
2004
sides. Regression from 0.5.<a class="changeset-link reference internal" href="#change-d632a942ba2390aa0d69b7b8d3db7726">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1824">#1824</a></p>
2007
<li><p id="change-0.6.2-2"><span class="target" id="change-38b01fe13c4a4ea626916c8378f614d5"><strong>[orm] </strong></span>the post_update feature of relationship() has been
2008
reworked architecturally to integrate more closely
2009
with the new 0.6 unit of work. The motivation
2010
for the change is so that multiple “post update”
2011
calls, each affecting different foreign key
2012
columns of the same row, are executed in a single
2013
UPDATE statement, rather than one UPDATE
2014
statement per column per row. Multiple row
2015
updates are also batched into executemany()s as
2016
possible, while maintaining consistent row ordering.<a class="changeset-link reference internal" href="#change-38b01fe13c4a4ea626916c8378f614d5">(link)</a><p></p>
2019
<li><p id="change-0.6.2-3"><span class="target" id="change-ec68a36d898ae8d2624447dffe1f74b3"><strong>[orm] </strong></span>Query.statement, Query.subquery(), etc. now transfer
2020
the values of bind parameters, i.e. those specified
2021
by query.params(), into the resulting SQL expression.
2022
Previously the values would not be transferred
2023
and bind parameters would come out as None.<a class="changeset-link reference internal" href="#change-ec68a36d898ae8d2624447dffe1f74b3">(link)</a><p></p>
2026
<li><p id="change-0.6.2-4"><span class="target" id="change-8e80dd442877d5cc6d55d1eb9f2e27ce"><strong>[orm] </strong></span>Subquery-eager-loading now works with Query objects
2027
which include params(), as well as get() Queries.<a class="changeset-link reference internal" href="#change-8e80dd442877d5cc6d55d1eb9f2e27ce">(link)</a><p></p>
2030
<li><p id="change-0.6.2-5"><span class="target" id="change-89c7ce031cec5770d7feff6d59f82173"><strong>[orm] </strong></span>Can now call make_transient() on an instance that
2031
is referenced by parent objects via many-to-one,
2032
without the parent’s foreign key value getting
2033
temporarily set to None - this was a function
2034
of the “detect primary key switch” flush handler.
2035
It now ignores objects that are no longer
2036
in the “persistent” state, and the parent’s
2037
foreign key identifier is left unaffected.<a class="changeset-link reference internal" href="#change-89c7ce031cec5770d7feff6d59f82173">(link)</a><p></p>
2040
<li><p id="change-0.6.2-6"><span class="target" id="change-02c64ac9aea77a533f8caaee63e2dd2e"><strong>[orm] </strong></span>query.order_by() now accepts False, which cancels
2041
any existing order_by() state on the Query, allowing
2042
subsequent generative methods to be called which do
2043
not support ORDER BY. This is not the same as the
2044
already existing feature of passing None, which
2045
suppresses any existing order_by() settings, including
2046
those configured on the mapper. False will make it
2047
as though order_by() was never called, while
2048
None is an active setting.<a class="changeset-link reference internal" href="#change-02c64ac9aea77a533f8caaee63e2dd2e">(link)</a><p></p>
2051
<li><p id="change-0.6.2-7"><span class="target" id="change-fc22e992cca054293cfca434a70f8339"><strong>[orm] </strong></span>An instance which is moved to “transient”, has
2052
an incomplete or missing set of primary key
2053
attributes, and contains expired attributes, will
2054
raise an InvalidRequestError if an expired attribute
2055
is accessed, instead of getting a recursion overflow.<a class="changeset-link reference internal" href="#change-fc22e992cca054293cfca434a70f8339">(link)</a><p></p>
2058
<li><p id="change-0.6.2-8"><span class="target" id="change-f2c43f7ce40d71c11c2f7faf46d66f4a"><strong>[orm] </strong></span>The make_transient() function is now in the generated
2059
documentation.<a class="changeset-link reference internal" href="#change-f2c43f7ce40d71c11c2f7faf46d66f4a">(link)</a><p></p>
2062
<li><p id="change-0.6.2-9"><span class="target" id="change-9cb3e05a83cf387929738297b264ccf9"><strong>[orm] </strong></span>make_transient() removes all “loader” callables from
2063
the state being made transient, removing any
2064
“expired” state - all unloaded attributes reset back
2065
to undefined, None/empty on access.<a class="changeset-link reference internal" href="#change-9cb3e05a83cf387929738297b264ccf9">(link)</a><p></p>
2070
<div class="section" id="change-0.6.2-orm-declarative">
2071
<h3>orm declarative<a class="headerlink" href="#change-0.6.2-orm-declarative" title="Permalink to this headline">¶</a></h3>
2073
<li><p id="change-0.6.2-10"><span class="target" id="change-586d7016a7038e911f333b3d048f0c80"><strong>[declarative] [orm] </strong></span>Added support for @classproperty to provide
2074
any kind of schema/mapping construct from a
2075
declarative mixin, including columns with foreign
2076
keys, relationships, column_property, deferred.
2077
This solves all such issues on declarative mixins.
2078
An error is raised if any MapperProperty subclass
2079
is specified on a mixin without using @classproperty.<a class="changeset-link reference internal" href="#change-586d7016a7038e911f333b3d048f0c80">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1805">#1805</a>, <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1796">#1796</a>, <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1751">#1751</a></p>
2082
<li><p id="change-0.6.2-11"><span class="target" id="change-f1e04d8a9d224260a51570d93bc2bf4b"><strong>[declarative] [orm] </strong></span>a mixin class can now define a column that matches
2083
one which is present on a __table__ defined on a
2084
subclass. It cannot, however, define one that is
2085
not present in the __table__, and the error message
2086
here now works.<a class="changeset-link reference internal" href="#change-f1e04d8a9d224260a51570d93bc2bf4b">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1821">#1821</a></p>
2091
<div class="section" id="change-0.6.2-sql">
2092
<h3>sql<a class="headerlink" href="#change-0.6.2-sql" title="Permalink to this headline">¶</a></h3>
2094
<li><p id="change-0.6.2-12"><span class="target" id="change-92eb958a7927c4e9caecec020272c06f"><strong>[sql] </strong></span>The warning emitted by the Unicode and String types
2095
with convert_unicode=True no longer embeds the actual
2096
value passed. This so that the Python warning
2097
registry does not continue to grow in size, the warning
2098
is emitted once as per the warning filter settings,
2099
and large string values don’t pollute the output.<a class="changeset-link reference internal" href="#change-92eb958a7927c4e9caecec020272c06f">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1822">#1822</a></p>
2102
<li><p id="change-0.6.2-13"><span class="target" id="change-7ac2b12e9e86167b88a0806d4cbbe9fb"><strong>[sql] </strong></span>Fixed bug that would prevent overridden clause
2103
compilation from working for “annotated” expression
2104
elements, which are often generated by the ORM.<a class="changeset-link reference internal" href="#change-7ac2b12e9e86167b88a0806d4cbbe9fb">(link)</a><p></p>
2107
<li><p id="change-0.6.2-14"><span class="target" id="change-5e141a144264b09de7321f5569bcd21d"><strong>[sql] </strong></span>The argument to “ESCAPE” of a LIKE operator or similar
2108
is passed through render_literal_value(), which may
2109
implement escaping of backslashes.<a class="changeset-link reference internal" href="#change-5e141a144264b09de7321f5569bcd21d">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1400">#1400</a></p>
2112
<li><p id="change-0.6.2-15"><span class="target" id="change-854fbd022574e164314a3322bae40806"><strong>[sql] </strong></span>Fixed bug in Enum type which blew away native_enum
2113
flag when used with TypeDecorators or other adaption
2114
scenarios.<a class="changeset-link reference internal" href="#change-854fbd022574e164314a3322bae40806">(link)</a><p></p>
2117
<li><p id="change-0.6.2-16"><span class="target" id="change-da5d7dd83b9b8e3fa3dfc3c698adee89"><strong>[sql] </strong></span>Inspector hits bind.connect() when invoked to ensure
2118
initialize has been called. the internal name ”.conn”
2119
is changed to ”.bind”, since that’s what it is.<a class="changeset-link reference internal" href="#change-da5d7dd83b9b8e3fa3dfc3c698adee89">(link)</a><p></p>
2122
<li><p id="change-0.6.2-17"><span class="target" id="change-7031856f1234d33d0ce85911ecb27356"><strong>[sql] </strong></span>Modified the internals of “column annotation” such that
2123
a custom Column subclass can safely override
2124
_constructor to return Column, for the purposes of
2125
making “configurational” column classes that aren’t
2126
involved in proxying, etc.<a class="changeset-link reference internal" href="#change-7031856f1234d33d0ce85911ecb27356">(link)</a><p></p>
2129
<li><p id="change-0.6.2-18"><span class="target" id="change-10d73e5cbbe7209624f8a76e237438c6"><strong>[sql] </strong></span>Column.copy() takes along the “unique” attribute
2130
among others, fixes regarding declarative
2131
mixins<a class="changeset-link reference internal" href="#change-10d73e5cbbe7209624f8a76e237438c6">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1829">#1829</a></p>
2136
<div class="section" id="change-0.6.2-postgresql">
2137
<h3>postgresql<a class="headerlink" href="#change-0.6.2-postgresql" title="Permalink to this headline">¶</a></h3>
2139
<li><p id="change-0.6.2-19"><span class="target" id="change-a99b1c9cecc1e928c742b45ef8f90cc3"><strong>[postgresql] </strong></span>render_literal_value() is overridden which escapes
2140
backslashes, currently applies to the ESCAPE clause
2141
of LIKE and similar expressions.
2142
Ultimately this will have to detect the value of
2143
“standard_conforming_strings” for full behavior.<a class="changeset-link reference internal" href="#change-a99b1c9cecc1e928c742b45ef8f90cc3">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1400">#1400</a></p>
2146
<li><p id="change-0.6.2-20"><span class="target" id="change-48af7b36fa4c3f12a67261b2f80d7865"><strong>[postgresql] </strong></span>Won’t generate “CREATE TYPE” / “DROP TYPE” if
2147
using types.Enum on a PG version prior to 8.3 -
2148
the supports_native_enum flag is fully
2149
honored.<a class="changeset-link reference internal" href="#change-48af7b36fa4c3f12a67261b2f80d7865">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1836">#1836</a></p>
2154
<div class="section" id="change-0.6.2-mysql">
2155
<h3>mysql<a class="headerlink" href="#change-0.6.2-mysql" title="Permalink to this headline">¶</a></h3>
2157
<li><p id="change-0.6.2-21"><span class="target" id="change-91f3d4d5f1ca37036afc83b8e87c588c"><strong>[mysql] </strong></span>MySQL dialect doesn’t emit CAST() for MySQL version
2158
detected < 4.0.2. This allows the unicode
2159
check on connect to proceed.<a class="changeset-link reference internal" href="#change-91f3d4d5f1ca37036afc83b8e87c588c">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1826">#1826</a></p>
2162
<li><p id="change-0.6.2-22"><span class="target" id="change-5984734c58273d70156013fa76eb8074"><strong>[mysql] </strong></span>MySQL dialect now detects NO_BACKSLASH_ESCAPES sql
2163
mode, in addition to ANSI_QUOTES.<a class="changeset-link reference internal" href="#change-5984734c58273d70156013fa76eb8074">(link)</a><p></p>
2166
<li><p id="change-0.6.2-23"><span class="target" id="change-a99b1c9cecc1e928c742b45ef8f90cc3"><strong>[mysql] </strong></span>render_literal_value() is overridden which escapes
2167
backslashes, currently applies to the ESCAPE clause
2168
of LIKE and similar expressions. This behavior
2169
is derived from detecting the value of
2170
NO_BACKSLASH_ESCAPES.<a class="changeset-link reference internal" href="#change-a99b1c9cecc1e928c742b45ef8f90cc3">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1400">#1400</a></p>
2175
<div class="section" id="change-0.6.2-mssql">
2176
<h3>mssql<a class="headerlink" href="#change-0.6.2-mssql" title="Permalink to this headline">¶</a></h3>
2178
<li><p id="change-0.6.2-24"><span class="target" id="change-0e401708966cccc9a7cc010adc04da9a"><strong>[mssql] </strong></span>If server_version_info is outside the usual
2179
range of (8, ), (9, ), (10, ), a warning is emitted
2180
which suggests checking that the FreeTDS version
2181
configuration is using 7.0 or 8.0, not 4.2.<a class="changeset-link reference internal" href="#change-0e401708966cccc9a7cc010adc04da9a">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1825">#1825</a></p>
2186
<div class="section" id="change-0.6.2-oracle">
2187
<h3>oracle<a class="headerlink" href="#change-0.6.2-oracle" title="Permalink to this headline">¶</a></h3>
2189
<li><p id="change-0.6.2-25"><span class="target" id="change-8d37a789557837ae28f36a0368b2b8a3"><strong>[oracle] </strong></span>Fixed ora-8 compatibility flags such that they
2190
don’t cache a stale value from before the first
2191
database connection actually occurs.<a class="changeset-link reference internal" href="#change-8d37a789557837ae28f36a0368b2b8a3">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1819">#1819</a></p>
2194
<li><p id="change-0.6.2-26"><span class="target" id="change-7cd2a1495d29a7ea446ff63e34a7e290"><strong>[oracle] </strong></span>Oracle’s “native decimal” metadata begins to return
2195
ambiguous typing information about numerics
2196
when columns are embedded in subqueries as well
2197
as when ROWNUM is consulted with subqueries, as we
2198
do for limit/offset. We’ve added these ambiguous
2199
conditions to the cx_oracle “convert to Decimal()”
2200
handler, so that we receive numerics as Decimal
2201
in more cases instead of as floats. These are
2202
then converted, if requested, into Integer
2203
or Float, or otherwise kept as the lossless
2204
Decimal.<a class="changeset-link reference internal" href="#change-7cd2a1495d29a7ea446ff63e34a7e290">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1840">#1840</a></p>
2209
<div class="section" id="change-0.6.2-firebird">
2210
<h3>firebird<a class="headerlink" href="#change-0.6.2-firebird" title="Permalink to this headline">¶</a></h3>
2212
<li><p id="change-0.6.2-27"><span class="target" id="change-8020c6a07179eb3773cff83bf7e318ac"><strong>[firebird] </strong></span>Fixed incorrect signature in do_execute(), error
2213
introduced in 0.6.1.<a class="changeset-link reference internal" href="#change-8020c6a07179eb3773cff83bf7e318ac">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1823">#1823</a></p>
2216
<li><p id="change-0.6.2-28"><span class="target" id="change-911be84370c3f1ad4939567277f70d73"><strong>[firebird] </strong></span>Firebird dialect adds CHAR, VARCHAR types which
2217
accept a “charset” flag, to support Firebird
2218
“CHARACTER SET” clause.<a class="changeset-link reference internal" href="#change-911be84370c3f1ad4939567277f70d73">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1813">#1813</a></p>
2223
<div class="section" id="change-0.6.2-misc">
2224
<h3>misc<a class="headerlink" href="#change-0.6.2-misc" title="Permalink to this headline">¶</a></h3>
2226
<li><p id="change-0.6.2-29"><span class="target" id="change-af1b71d292a858ea4df75271507ce565"><strong>[extension] [compiler] </strong></span>The ‘default’ compiler is automatically copied over
2227
when overriding the compilation of a built in
2228
clause construct, so no KeyError is raised if the
2229
user-defined compiler is specific to certain
2230
backends and compilation for a different backend
2231
is invoked.<a class="changeset-link reference internal" href="#change-af1b71d292a858ea4df75271507ce565">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1838">#1838</a></p>
2234
<li><p id="change-0.6.2-30"><span class="target" id="change-848469658bfe0128fab72a42bba6e792"><strong>[documentation] </strong></span>Added documentation for the Inspector.<a class="changeset-link reference internal" href="#change-848469658bfe0128fab72a42bba6e792">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1820">#1820</a></p>
2237
<li><p id="change-0.6.2-31"><span class="target" id="change-4e33e10eba62ee01d6af5ccb29637f33"><strong>[documentation] </strong></span>Fixed @memoized_property and @memoized_instancemethod
2238
decorators so that Sphinx documentation picks up
2239
these attributes and methods, such as
2240
ResultProxy.inserted_primary_key.<a class="changeset-link reference internal" href="#change-4e33e10eba62ee01d6af5ccb29637f33">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1830">#1830</a></p>
2246
<div class="section" id="change-0.6.1">
2247
<h2>0.6.1<a class="headerlink" href="#change-0.6.1" title="Permalink to this headline">¶</a></h2>
2248
Released: Mon May 31 2010<div class="section" id="change-0.6.1-orm">
2249
<h3>orm<a class="headerlink" href="#change-0.6.1-orm" title="Permalink to this headline">¶</a></h3>
2251
<li><p id="change-0.6.1-0"><span class="target" id="change-3ad0634282071d683ecb076a3c1171ba"><strong>[orm] </strong></span>Fixed regression introduced in 0.6.0 involving improper
2252
history accounting on mutable attributes.<a class="changeset-link reference internal" href="#change-3ad0634282071d683ecb076a3c1171ba">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1782">#1782</a></p>
2255
<li><p id="change-0.6.1-1"><span class="target" id="change-f27d049a3ba382d9d975d84ab7db1040"><strong>[orm] </strong></span>Fixed regression introduced in 0.6.0 unit of work refactor
2256
that broke updates for bi-directional relationship()
2257
with post_update=True.<a class="changeset-link reference internal" href="#change-f27d049a3ba382d9d975d84ab7db1040">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1807">#1807</a></p>
2260
<li><p id="change-0.6.1-2"><span class="target" id="change-a5d06f591c00a5eb1caf7412dbddb887"><strong>[orm] </strong></span>session.merge() will not expire attributes on the returned
2261
instance if that instance is “pending”.<a class="changeset-link reference internal" href="#change-a5d06f591c00a5eb1caf7412dbddb887">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1789">#1789</a></p>
2264
<li><p id="change-0.6.1-3"><span class="target" id="change-b9cf399b6f68b033fd9ea792f88bd39b"><strong>[orm] </strong></span>fixed __setstate__ method of CollectionAdapter to not
2265
fail during deserialize where parent InstanceState not
2266
yet unserialized.<a class="changeset-link reference internal" href="#change-b9cf399b6f68b033fd9ea792f88bd39b">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1802">#1802</a></p>
2269
<li><p id="change-0.6.1-4"><span class="target" id="change-284309c7b5f31be13e7f4fa173f0d4e6"><strong>[orm] </strong></span>Added internal warning in case an instance without a
2270
full PK happened to be expired and then was asked
2271
to refresh.<a class="changeset-link reference internal" href="#change-284309c7b5f31be13e7f4fa173f0d4e6">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1797">#1797</a></p>
2274
<li><p id="change-0.6.1-5"><span class="target" id="change-9092dd0fbb06e94417193ea80605814f"><strong>[orm] </strong></span>Added more aggressive caching to the mapper’s usage of
2275
UPDATE, INSERT, and DELETE expressions. Assuming the
2276
statement has no per-object SQL expressions attached,
2277
the expression objects are cached by the mapper after
2278
the first create, and their compiled form is stored
2279
persistently in a cache dictionary for the duration of
2280
the related Engine. The cache is an LRUCache for the
2281
rare case that a mapper receives an extremely
2282
high number of different column patterns as UPDATEs.<a class="changeset-link reference internal" href="#change-9092dd0fbb06e94417193ea80605814f">(link)</a><p></p>
2287
<div class="section" id="change-0.6.1-sql">
2288
<h3>sql<a class="headerlink" href="#change-0.6.1-sql" title="Permalink to this headline">¶</a></h3>
2290
<li><p id="change-0.6.1-6"><span class="target" id="change-b08316c6ff8d2199ee21227c71237c3c"><strong>[sql] </strong></span>expr.in_() now accepts a text() construct as the argument.
2291
Grouping parenthesis are added automatically, i.e. usage
2292
is like <cite>col.in_(text(“select id from table”))</cite>.<a class="changeset-link reference internal" href="#change-b08316c6ff8d2199ee21227c71237c3c">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1793">#1793</a></p>
2295
<li><p id="change-0.6.1-7"><span class="target" id="change-72ff9fd4e95f73a9fac5793d46ee1989"><strong>[sql] </strong></span>Columns of _Binary type (i.e. LargeBinary, BLOB, etc.)
2296
will coerce a “basestring” on the right side into a
2297
_Binary as well so that required DBAPI processing
2298
takes place.<a class="changeset-link reference internal" href="#change-72ff9fd4e95f73a9fac5793d46ee1989">(link)</a><p></p>
2301
<li><p id="change-0.6.1-8"><span class="target" id="change-8d17b953e1ac169718caf18058bcd4a7"><strong>[sql] </strong></span>Added table.add_is_dependent_on(othertable), allows manual
2302
placement of dependency rules between two Table objects
2303
for use within create_all(), drop_all(), sorted_tables.<a class="changeset-link reference internal" href="#change-8d17b953e1ac169718caf18058bcd4a7">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1801">#1801</a></p>
2306
<li><p id="change-0.6.1-9"><span class="target" id="change-8952d0409ec113323968a616d7b3ff95"><strong>[sql] </strong></span>Fixed bug that prevented implicit RETURNING from functioning
2307
properly with composite primary key that contained zeroes.<a class="changeset-link reference internal" href="#change-8952d0409ec113323968a616d7b3ff95">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1778">#1778</a></p>
2310
<li><p id="change-0.6.1-10"><span class="target" id="change-82e4196d3222e0f8f2f39d0d56b49b68"><strong>[sql] </strong></span>Fixed errant space character when generating ADD CONSTRAINT
2311
for a named UNIQUE constraint.<a class="changeset-link reference internal" href="#change-82e4196d3222e0f8f2f39d0d56b49b68">(link)</a><p></p>
2314
<li><p id="change-0.6.1-11"><span class="target" id="change-946f08fd63ce4b879c2fba51fc21eccf"><strong>[sql] </strong></span>Fixed “table” argument on constructor of ForeginKeyConstraint<a class="changeset-link reference internal" href="#change-946f08fd63ce4b879c2fba51fc21eccf">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1571">#1571</a></p>
2317
<li><p id="change-0.6.1-12"><span class="target" id="change-e8fbe83ec8fc5eea2bdba7a800b0782f"><strong>[sql] </strong></span>Fixed bug in connection pool cursor wrapper whereby if a
2318
cursor threw an exception on close(), the logging of the
2319
message would fail.<a class="changeset-link reference internal" href="#change-e8fbe83ec8fc5eea2bdba7a800b0782f">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1786">#1786</a></p>
2322
<li><p id="change-0.6.1-13"><span class="target" id="change-a4876a0985ffddb6e31acca9c07979e7"><strong>[sql] </strong></span>the _make_proxy() method of ColumnClause and Column now use
2323
self.__class__ to determine the class of object to be returned
2324
instead of hardcoding to ColumnClause/Column, making it slightly
2325
easier to produce specific subclasses of these which work in
2326
alias/subquery situations.<a class="changeset-link reference internal" href="#change-a4876a0985ffddb6e31acca9c07979e7">(link)</a><p></p>
2329
<li><p id="change-0.6.1-14"><span class="target" id="change-cabf1086effe5bf3e53e5eb62e0a539f"><strong>[sql] </strong></span>func.XXX() doesn’t inadvertently resolve to non-Function
2330
classes (e.g. fixes func.text()).<a class="changeset-link reference internal" href="#change-cabf1086effe5bf3e53e5eb62e0a539f">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1798">#1798</a></p>
2335
<div class="section" id="change-0.6.1-mysql">
2336
<h3>mysql<a class="headerlink" href="#change-0.6.1-mysql" title="Permalink to this headline">¶</a></h3>
2338
<li><p id="change-0.6.1-15"><span class="target" id="change-aa357253b7d4e61fb60fe4179f37c4c4"><strong>[mysql] </strong></span>func.sysdate() emits “SYSDATE()”, i.e. with the ending
2339
parenthesis, on MySQL.<a class="changeset-link reference internal" href="#change-aa357253b7d4e61fb60fe4179f37c4c4">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1794">#1794</a></p>
2344
<div class="section" id="change-0.6.1-sqlite">
2345
<h3>sqlite<a class="headerlink" href="#change-0.6.1-sqlite" title="Permalink to this headline">¶</a></h3>
2347
<li><p id="change-0.6.1-16"><span class="target" id="change-f93c6942e6696df34b2e495e1a798242"><strong>[sqlite] </strong></span>Fixed concatenation of constraints when “PRIMARY KEY”
2348
constraint gets moved to column level due to SQLite
2349
AUTOINCREMENT keyword being rendered.<a class="changeset-link reference internal" href="#change-f93c6942e6696df34b2e495e1a798242">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1812">#1812</a></p>
2354
<div class="section" id="change-0.6.1-oracle">
2355
<h3>oracle<a class="headerlink" href="#change-0.6.1-oracle" title="Permalink to this headline">¶</a></h3>
2357
<li><p id="change-0.6.1-17"><span class="target" id="change-921c563fd599609c36d48fca98c94857"><strong>[oracle] </strong></span>Added a check for cx_oracle versions lower than version 5,
2358
in which case the incompatible “output type handler” won’t
2359
be used. This will impact decimal accuracy and some
2360
unicode handling issues.<a class="changeset-link reference internal" href="#change-921c563fd599609c36d48fca98c94857">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1775">#1775</a></p>
2363
<li><p id="change-0.6.1-18"><span class="target" id="change-de39458c5cf40832d3e712046e906059"><strong>[oracle] </strong></span>Fixed use_ansi=False mode, which was producing broken
2364
WHERE clauses in pretty much all cases.<a class="changeset-link reference internal" href="#change-de39458c5cf40832d3e712046e906059">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1790">#1790</a></p>
2367
<li><p id="change-0.6.1-19"><span class="target" id="change-c5cd67d9af16519e3e1648d461a6fa18"><strong>[oracle] </strong></span>Re-established support for Oracle 8 with cx_oracle,
2368
including that use_ansi is set to False automatically,
2369
NVARCHAR2 and NCLOB are not rendered for Unicode,
2370
“native unicode” check doesn’t fail, cx_oracle
2371
“native unicode” mode is disabled, VARCHAR() is emitted
2372
with bytes count instead of char count.<a class="changeset-link reference internal" href="#change-c5cd67d9af16519e3e1648d461a6fa18">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1808">#1808</a></p>
2375
<li><p id="change-0.6.1-20"><span class="target" id="change-42bad8b40515caa95e779b1bb6592e72"><strong>[oracle] </strong></span>oracle_xe 5 doesn’t accept a Python unicode object in
2376
its connect string in normal Python 2.x mode - so we coerce
2377
to str() directly. non-ascii characters aren’t supported
2378
in connect strings here since we don’t know what encoding
2379
we could use.<a class="changeset-link reference internal" href="#change-42bad8b40515caa95e779b1bb6592e72">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1670">#1670</a></p>
2382
<li><p id="change-0.6.1-21"><span class="target" id="change-c4fb3d2d0a0c5a82038662d1a131caa4"><strong>[oracle] </strong></span>FOR UPDATE is emitted in the syntactically correct position
2383
when limit/offset is used, i.e. the ROWNUM subquery.
2384
However, Oracle can’t really handle FOR UPDATE with ORDER BY
2385
or with subqueries, so its still not very usable, but at
2386
least SQLA gets the SQL past the Oracle parser.<a class="changeset-link reference internal" href="#change-c4fb3d2d0a0c5a82038662d1a131caa4">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1815">#1815</a></p>
2391
<div class="section" id="change-0.6.1-firebird">
2392
<h3>firebird<a class="headerlink" href="#change-0.6.1-firebird" title="Permalink to this headline">¶</a></h3>
2394
<li><p id="change-0.6.1-22"><span class="target" id="change-91fe7d4094c4263398493a015350a1ed"><strong>[firebird] </strong></span>Added a label to the query used within has_table() and
2395
has_sequence() to work with older versions of Firebird
2396
that don’t provide labels for result columns.<a class="changeset-link reference internal" href="#change-91fe7d4094c4263398493a015350a1ed">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1521">#1521</a></p>
2399
<li><p id="change-0.6.1-23"><span class="target" id="change-0d74fea7bfb3e3c84d0515cc593d4d87"><strong>[firebird] </strong></span>Added integer coercion to the “type_conv” attribute when
2400
passed via query string, so that it is properly interpreted
2401
by Kinterbasdb.<a class="changeset-link reference internal" href="#change-0d74fea7bfb3e3c84d0515cc593d4d87">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1779">#1779</a></p>
2404
<li><p id="change-0.6.1-24"><span class="target" id="change-03bb6ab00e44c5f02f340d559a5dab0f"><strong>[firebird] </strong></span>Added ‘connection shutdown’ to the list of exception strings
2405
which indicate a dropped connection.<a class="changeset-link reference internal" href="#change-03bb6ab00e44c5f02f340d559a5dab0f">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1646">#1646</a></p>
2410
<div class="section" id="change-0.6.1-misc">
2411
<h3>misc<a class="headerlink" href="#change-0.6.1-misc" title="Permalink to this headline">¶</a></h3>
2413
<li><p id="change-0.6.1-25"><span class="target" id="change-df53735fe0fac1271ec8b185d92b917c"><strong>[engines] </strong></span>Fixed building the C extensions on Python 2.4.<a class="changeset-link reference internal" href="#change-df53735fe0fac1271ec8b185d92b917c">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1781">#1781</a></p>
2416
<li><p id="change-0.6.1-26"><span class="target" id="change-bd1c201152d89a2c0a9fce60d6eb9f10"><strong>[engines] </strong></span>Pool classes will reuse the same “pool_logging_name” setting
2417
after a dispose() occurs.<a class="changeset-link reference internal" href="#change-bd1c201152d89a2c0a9fce60d6eb9f10">(link)</a><p></p>
2420
<li><p id="change-0.6.1-27"><span class="target" id="change-d98f14529ec58cd4e539be4876c55109"><strong>[engines] </strong></span>Engine gains an “execution_options” argument and
2421
update_execution_options() method, which will apply to
2422
all connections generated by this engine.<a class="changeset-link reference internal" href="#change-d98f14529ec58cd4e539be4876c55109">(link)</a><p></p>
2425
<li><p id="change-0.6.1-28"><span class="target" id="change-6bd58738b79dc1de9e4c774f875c967e"><strong>[sqlsoup] </strong></span>the SqlSoup constructor accepts a <cite>base</cite> argument which specifies
2426
the base class to use for mapped classes, the default being
2427
<cite>object</cite>.<a class="changeset-link reference internal" href="#change-6bd58738b79dc1de9e4c774f875c967e">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1783">#1783</a></p>
2433
<div class="section" id="change-0.6.0">
2434
<h2>0.6.0<a class="headerlink" href="#change-0.6.0" title="Permalink to this headline">¶</a></h2>
2435
Released: Sun Apr 18 2010<div class="section" id="change-0.6.0-orm">
2436
<h3>orm<a class="headerlink" href="#change-0.6.0-orm" title="Permalink to this headline">¶</a></h3>
2438
<li><p id="change-0.6.0-0"><span class="target" id="change-3b1217c725cfaca8d0f18b95fec0c71d"><strong>[orm] </strong></span>Unit of work internals have been rewritten. Units of work
2439
with large numbers of objects interdependent objects
2440
can now be flushed without recursion overflows
2441
as there is no longer reliance upon recursive calls. The number of internal structures now stays
2442
constant for a particular session state, regardless of
2443
how many relationships are present on mappings. The flow
2444
of events now corresponds to a linear list of steps,
2445
generated by the mappers and relationships based on actual
2446
work to be done, filtered through a single topological sort
2447
for correct ordering. Flush actions are assembled using
2448
far fewer steps and less memory.<a class="changeset-link reference internal" href="#change-3b1217c725cfaca8d0f18b95fec0c71d">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1742">#1742</a>, <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1081">#1081</a></p>
2451
<li><p id="change-0.6.0-1"><span class="target" id="change-97e2870a10f13e39b21451eade7f34e3"><strong>[orm] </strong></span>Along with the UOW rewrite, this also removes an issue
2452
introduced in 0.6beta3 regarding topological cycle detection
2453
for units of work with long dependency cycles. We now use
2454
an algorithm written by Guido (thanks Guido!).<a class="changeset-link reference internal" href="#change-97e2870a10f13e39b21451eade7f34e3">(link)</a><p></p>
2457
<li><p id="change-0.6.0-2"><span class="target" id="change-2c89e63a7b00b521ab6ebefa3e55a3d8"><strong>[orm] </strong></span>one-to-many relationships now maintain a list of positive
2458
parent-child associations within the flush, preventing
2459
previous parents marked as deleted from cascading a
2460
delete or NULL foreign key set on those child objects,
2461
despite the end-user not removing the child from the old
2462
association.<a class="changeset-link reference internal" href="#change-2c89e63a7b00b521ab6ebefa3e55a3d8">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1764">#1764</a></p>
2465
<li><p id="change-0.6.0-3"><span class="target" id="change-de68f57cafdd0eff2e36aba90d68a8d9"><strong>[orm] </strong></span>A collection lazy load will switch off default
2466
eagerloading on the reverse many-to-one side, since
2467
that loading is by definition unnecessary.<a class="changeset-link reference internal" href="#change-de68f57cafdd0eff2e36aba90d68a8d9">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1495">#1495</a></p>
2470
<li><p id="change-0.6.0-4"><span class="target" id="change-60b9bbf87ecba4f952f15d81c023040f"><strong>[orm] </strong></span>Session.refresh() now does an equivalent expire()
2471
on the given instance first, so that the “refresh-expire”
2472
cascade is propagated. Previously, refresh() was
2473
not affected in any way by the presence of “refresh-expire”
2474
cascade. This is a change in behavior versus that
2475
of 0.6beta2, where the “lockmode” flag passed to refresh()
2476
would cause a version check to occur. Since the instance
2477
is first expired, refresh() always upgrades the object
2478
to the most recent version.<a class="changeset-link reference internal" href="#change-60b9bbf87ecba4f952f15d81c023040f">(link)</a><p></p>
2481
<li><p id="change-0.6.0-5"><span class="target" id="change-f00123490bb1d2834b93640ea8cbd25d"><strong>[orm] </strong></span>The ‘refresh-expire’ cascade, when reaching a pending object,
2482
will expunge the object if the cascade also includes
2483
“delete-orphan”, or will simply detach it otherwise.<a class="changeset-link reference internal" href="#change-f00123490bb1d2834b93640ea8cbd25d">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1754">#1754</a></p>
2486
<li><p id="change-0.6.0-6"><span class="target" id="change-446d9794507b3c1360eb69dd3f886c1b"><strong>[orm] </strong></span>id(obj) is no longer used internally within topological.py,
2487
as the sorting functions now require hashable objects
2488
only.<a class="changeset-link reference internal" href="#change-446d9794507b3c1360eb69dd3f886c1b">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1756">#1756</a></p>
2491
<li><p id="change-0.6.0-7"><span class="target" id="change-89d6d3ab3f04efc830987da850dbcd9f"><strong>[orm] </strong></span>The ORM will set the docstring of all generated descriptors
2492
to None by default. This can be overridden using ‘doc’
2493
(or if using Sphinx, attribute docstrings work too).<a class="changeset-link reference internal" href="#change-89d6d3ab3f04efc830987da850dbcd9f">(link)</a><p></p>
2496
<li><p id="change-0.6.0-8"><span class="target" id="change-0c5e8a43f7cfd7406db906494f6c86cb"><strong>[orm] </strong></span>Added kw argument ‘doc’ to all mapper property callables
2497
as well as Column(). Will assemble the string ‘doc’ as
2498
the ‘__doc__’ attribute on the descriptor.<a class="changeset-link reference internal" href="#change-0c5e8a43f7cfd7406db906494f6c86cb">(link)</a><p></p>
2501
<li><p id="change-0.6.0-9"><span class="target" id="change-bfa16822997c1406790421c29fcddf84"><strong>[orm] </strong></span>Usage of version_id_col on a backend that supports
2502
cursor.rowcount for execute() but not executemany() now works
2503
when a delete is issued (already worked for saves, since those
2504
don’t use executemany()). For a backend that doesn’t support
2505
cursor.rowcount at all, a warning is emitted the same
2506
as with saves.<a class="changeset-link reference internal" href="#change-bfa16822997c1406790421c29fcddf84">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1761">#1761</a></p>
2509
<li><p id="change-0.6.0-10"><span class="target" id="change-7c8f475376472ec13a1f37c930bcffc9"><strong>[orm] </strong></span>The ORM now short-term caches the “compiled” form of
2510
insert() and update() constructs when flushing lists of
2511
objects of all the same class, thereby avoiding redundant
2512
compilation per individual INSERT/UPDATE within an
2513
individual flush() call.<a class="changeset-link reference internal" href="#change-7c8f475376472ec13a1f37c930bcffc9">(link)</a><p></p>
2516
<li><p id="change-0.6.0-11"><span class="target" id="change-9b2338aa43fcd0bf730a52d5e1a78bf1"><strong>[orm] </strong></span>internal getattr(), setattr(), getcommitted() methods
2517
on ColumnProperty, CompositeProperty, RelationshipProperty
2518
have been underscored (i.e. are private), signature has
2519
changed.<a class="changeset-link reference internal" href="#change-9b2338aa43fcd0bf730a52d5e1a78bf1">(link)</a><p></p>
2524
<div class="section" id="change-0.6.0-sql">
2525
<h3>sql<a class="headerlink" href="#change-0.6.0-sql" title="Permalink to this headline">¶</a></h3>
2527
<li><p id="change-0.6.0-12"><span class="target" id="change-2ad00fb1fb1dc9fb7c58e6eea6830e93"><strong>[sql] </strong></span>Restored some bind-labeling logic from 0.5 which ensures
2528
that tables with column names that overlap another column
2529
of the form “<tablename>_<columnname>” won’t produce
2530
errors if column._label is used as a bind name during
2531
an UPDATE. Test coverage which wasn’t present in 0.5
2532
has been added.<a class="changeset-link reference internal" href="#change-2ad00fb1fb1dc9fb7c58e6eea6830e93">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1755">#1755</a></p>
2535
<li><p id="change-0.6.0-13"><span class="target" id="change-8a0a290dfd11b9c9f0b759cacd2c60e7"><strong>[sql] </strong></span>somejoin.select(fold_equivalents=True) is no longer
2536
deprecated, and will eventually be rolled into a more
2537
comprehensive version of the feature for.<a class="changeset-link reference internal" href="#change-8a0a290dfd11b9c9f0b759cacd2c60e7">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1729">#1729</a></p>
2540
<li><p id="change-0.6.0-14"><span class="target" id="change-f49c7dce36721a3b7fff421faf1e347f"><strong>[sql] </strong></span>the Numeric type raises an <em>enormous</em> warning when expected
2541
to convert floats to Decimal from a DBAPI that returns floats.
2542
This includes SQLite, Sybase, MS-SQL.<a class="changeset-link reference internal" href="#change-f49c7dce36721a3b7fff421faf1e347f">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1759">#1759</a></p>
2545
<li><p id="change-0.6.0-15"><span class="target" id="change-79bb81f03cb8e5df4f9dd9a451f01db2"><strong>[sql] </strong></span>Fixed an error in expression typing which caused an endless
2546
loop for expressions with two NULL types.<a class="changeset-link reference internal" href="#change-79bb81f03cb8e5df4f9dd9a451f01db2">(link)</a><p></p>
2549
<li><p id="change-0.6.0-16"><span class="target" id="change-9a48a170841006eca908993bdd32d73e"><strong>[sql] </strong></span>Fixed bug in execution_options() feature whereby the existing
2550
Transaction and other state information from the parent
2551
connection would not be propagated to the sub-connection.<a class="changeset-link reference internal" href="#change-9a48a170841006eca908993bdd32d73e">(link)</a><p></p>
2554
<li><p id="change-0.6.0-17"><span class="target" id="change-60e732c087d2155ba7f95c3372a0b9e0"><strong>[sql] </strong></span>Added new ‘compiled_cache’ execution option. A dictionary
2555
where Compiled objects will be cached when the Connection
2556
compiles a clause expression into a dialect- and parameter-
2557
specific Compiled object. It is the user’s responsibility to
2558
manage the size of this dictionary, which will have keys
2559
corresponding to the dialect, clause element, the column
2560
names within the VALUES or SET clause of an INSERT or UPDATE,
2561
as well as the “batch” mode for an INSERT or UPDATE statement.<a class="changeset-link reference internal" href="#change-60e732c087d2155ba7f95c3372a0b9e0">(link)</a><p></p>
2564
<li><p id="change-0.6.0-18"><span class="target" id="change-768b947e2c0ef47ccdae7a24bea4fc76"><strong>[sql] </strong></span>Added get_pk_constraint() to reflection.Inspector, similar
2565
to get_primary_keys() except returns a dict that includes the
2566
name of the constraint, for supported backends (PG so far).<a class="changeset-link reference internal" href="#change-768b947e2c0ef47ccdae7a24bea4fc76">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1769">#1769</a></p>
2569
<li><p id="change-0.6.0-19"><span class="target" id="change-9e9da1b03603fbea0a497194ff379a0f"><strong>[sql] </strong></span>Table.create() and Table.drop() no longer apply metadata-
2570
level create/drop events.<a class="changeset-link reference internal" href="#change-9e9da1b03603fbea0a497194ff379a0f">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1771">#1771</a></p>
2575
<div class="section" id="change-0.6.0-postgresql">
2576
<h3>postgresql<a class="headerlink" href="#change-0.6.0-postgresql" title="Permalink to this headline">¶</a></h3>
2578
<li><p id="change-0.6.0-20"><span class="target" id="change-4a1523bb9932656419cad5bb47984b8f"><strong>[postgresql] </strong></span>Postgresql now reflects sequence names associated with
2579
SERIAL columns correctly, after the name of the sequence
2580
has been changed. Thanks to Kumar McMillan for the patch.<a class="changeset-link reference internal" href="#change-4a1523bb9932656419cad5bb47984b8f">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1071">#1071</a></p>
2583
<li><p id="change-0.6.0-21"><span class="target" id="change-f9a992cccbd35a7929c4a9fc18106789"><strong>[postgresql] </strong></span>Repaired missing import in psycopg2._PGNumeric type when
2584
unknown numeric is received.<a class="changeset-link reference internal" href="#change-f9a992cccbd35a7929c4a9fc18106789">(link)</a><p></p>
2587
<li><p id="change-0.6.0-22"><span class="target" id="change-b98fd25854c44f76b567995a581b059f"><strong>[postgresql] </strong></span>psycopg2/pg8000 dialects now aware of REAL[], FLOAT[],
2588
DOUBLE_PRECISION[], NUMERIC[] return types without
2589
raising an exception.<a class="changeset-link reference internal" href="#change-b98fd25854c44f76b567995a581b059f">(link)</a><p></p>
2592
<li><p id="change-0.6.0-23"><span class="target" id="change-795011bac9decfbec163b1e926b9af2e"><strong>[postgresql] </strong></span>Postgresql reflects the name of primary key constraints,
2593
if one exists.<a class="changeset-link reference internal" href="#change-795011bac9decfbec163b1e926b9af2e">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1769">#1769</a></p>
2598
<div class="section" id="change-0.6.0-oracle">
2599
<h3>oracle<a class="headerlink" href="#change-0.6.0-oracle" title="Permalink to this headline">¶</a></h3>
2601
<li><p id="change-0.6.0-24"><span class="target" id="change-e256b03edc9a352999ab763c545d8369"><strong>[oracle] </strong></span>Now using cx_oracle output converters so that the
2602
DBAPI returns natively the kinds of values we prefer:<a class="changeset-link reference internal" href="#change-e256b03edc9a352999ab763c545d8369">(link)</a><p></p>
2605
<li><p id="change-0.6.0-25"><span class="target" id="change-f9a62b0f03f5c58cd9451cf9002cb497"><strong>[oracle] </strong></span>NUMBER values with positive precision + scale convert
2606
to cx_oracle.STRING and then to Decimal. This
2607
allows perfect precision for the Numeric type when
2608
using cx_oracle.<a class="changeset-link reference internal" href="#change-f9a62b0f03f5c58cd9451cf9002cb497">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1759">#1759</a></p>
2611
<li><p id="change-0.6.0-26"><span class="target" id="change-ddda48d09bea40d9663e1537a8b7b708"><strong>[oracle] </strong></span>STRING/FIXED_CHAR now convert to unicode natively.
2612
SQLAlchemy’s String types then don’t need to
2613
apply any kind of conversions.<a class="changeset-link reference internal" href="#change-ddda48d09bea40d9663e1537a8b7b708">(link)</a><p></p>
2618
<div class="section" id="change-0.6.0-firebird">
2619
<h3>firebird<a class="headerlink" href="#change-0.6.0-firebird" title="Permalink to this headline">¶</a></h3>
2621
<li><p id="change-0.6.0-27"><span class="target" id="change-605572f4fbe5fbe913e1c270b3de66b4"><strong>[firebird] </strong></span>The functionality of result.rowcount can be disabled on a
2622
per-engine basis by setting ‘enable_rowcount=False’
2623
on create_engine(). Normally, cursor.rowcount is called
2624
after any UPDATE or DELETE statement unconditionally,
2625
because the cursor is then closed and Firebird requires
2626
an open cursor in order to get a rowcount. This
2627
call is slightly expensive however so it can be disabled.
2628
To re-enable on a per-execution basis, the
2629
‘enable_rowcount=True’ execution option may be used.<a class="changeset-link reference internal" href="#change-605572f4fbe5fbe913e1c270b3de66b4">(link)</a><p></p>
2634
<div class="section" id="change-0.6.0-misc">
2635
<h3>misc<a class="headerlink" href="#change-0.6.0-misc" title="Permalink to this headline">¶</a></h3>
2637
<li><p id="change-0.6.0-28"><span class="target" id="change-e0c034dd38e58d6263b4417bd5b20d8a"><strong>[engines] </strong></span>The C extension now also works with DBAPIs which use custom
2638
sequences as row (and not only tuples).<a class="changeset-link reference internal" href="#change-e0c034dd38e58d6263b4417bd5b20d8a">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1757">#1757</a></p>
2641
<li><p id="change-0.6.0-29"><span class="target" id="change-aa50f37469eba982996cc17bb2685a72"><strong>[ext] </strong></span>the compiler extension now allows @compiles decorators
2642
on base classes that extend to child classes, @compiles
2643
decorators on child classes that aren’t broken by a
2644
@compiles decorator on the base class.<a class="changeset-link reference internal" href="#change-aa50f37469eba982996cc17bb2685a72">(link)</a><p></p>
2647
<li><p id="change-0.6.0-30"><span class="target" id="change-0507e611abb0fe0ac48260501435bd99"><strong>[ext] </strong></span>Declarative will raise an informative error message
2648
if a non-mapped class attribute is referenced in the
2649
string-based relationship() arguments.<a class="changeset-link reference internal" href="#change-0507e611abb0fe0ac48260501435bd99">(link)</a><p></p>
2652
<li><p id="change-0.6.0-31"><span class="target" id="change-deb0113981b96ffb2348bb3031d2e553"><strong>[ext] </strong></span>Further reworked the “mixin” logic in declarative to
2653
additionally allow __mapper_args__ as a @classproperty
2654
on a mixin, such as to dynamically assign polymorphic_identity.<a class="changeset-link reference internal" href="#change-deb0113981b96ffb2348bb3031d2e553">(link)</a><p></p>
2657
<li><p id="change-0.6.0-32"><span class="target" id="change-cbe6875d1367b7c3a0bbeb9dddead99a"><strong>[examples] </strong></span>Updated attribute_shard.py example to use a more robust
2658
method of searching a Query for binary expressions which
2659
compare columns against literal values.<a class="changeset-link reference internal" href="#change-cbe6875d1367b7c3a0bbeb9dddead99a">(link)</a><p></p>
2665
<div class="section" id="change-0.6beta3">
2666
<h2>0.6beta3<a class="headerlink" href="#change-0.6beta3" title="Permalink to this headline">¶</a></h2>
2667
Released: Sun Mar 28 2010<div class="section" id="change-0.6beta3-orm">
2668
<h3>orm<a class="headerlink" href="#change-0.6beta3-orm" title="Permalink to this headline">¶</a></h3>
2670
<li><p id="change-0.6beta3-0"><span class="target" id="change-f967d8dbf3c4194f9e0b1af4d5804fd6"><strong>[orm] </strong></span>Major feature: Added new “subquery” loading capability to
2671
relationship(). This is an eager loading option which
2672
generates a second SELECT for each collection represented
2673
in a query, across all parents at once. The query
2674
re-issues the original end-user query wrapped in a subquery,
2675
applies joins out to the target collection, and loads
2676
all those collections fully in one result, similar to
2677
“joined” eager loading but using all inner joins and not
2678
re-fetching full parent rows repeatedly (as most DBAPIs seem
2679
to do, even if columns are skipped). Subquery loading is
2680
available at mapper config level using “lazy=’subquery’” and
2681
at the query options level using “subqueryload(props..)”,
2682
“subqueryload_all(props...)”.<a class="changeset-link reference internal" href="#change-f967d8dbf3c4194f9e0b1af4d5804fd6">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1675">#1675</a></p>
2685
<li><p id="change-0.6beta3-1"><span class="target" id="change-5767ddfaa66ff81d727e89c1b58f2c10"><strong>[orm] </strong></span>To accomodate the fact that there are now two kinds of eager
2686
loading available, the new names for eagerload() and
2687
eagerload_all() are joinedload() and joinedload_all(). The
2688
old names will remain as synonyms for the foreseeable future.<a class="changeset-link reference internal" href="#change-5767ddfaa66ff81d727e89c1b58f2c10">(link)</a><p></p>
2691
<li><p id="change-0.6beta3-2"><span class="target" id="change-5660c8fd9cb4729f0f6017950bde5b27"><strong>[orm] </strong></span>The “lazy” flag on the relationship() function now accepts
2692
a string argument for all kinds of loading: “select”, “joined”,
2693
“subquery”, “noload” and “dynamic”, where the default is now
2694
“select”. The old values of True/
2695
False/None still retain their usual meanings and will remain
2696
as synonyms for the foreseeable future.<a class="changeset-link reference internal" href="#change-5660c8fd9cb4729f0f6017950bde5b27">(link)</a><p></p>
2699
<li><p id="change-0.6beta3-3"><span class="target" id="change-cc53079a38c2d284e5b3d878ed0120c4"><strong>[orm] </strong></span>Added with_hint() method to Query() construct. This calls
2700
directly down to select().with_hint() and also accepts
2701
entities as well as tables and aliases. See with_hint() in the
2702
SQL section below.<a class="changeset-link reference internal" href="#change-cc53079a38c2d284e5b3d878ed0120c4">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/921">#921</a></p>
2705
<li><p id="change-0.6beta3-4"><span class="target" id="change-3ccda2938593dbe9607247dd4ea3f042"><strong>[orm] </strong></span>Fixed bug in Query whereby calling q.join(prop).from_self(...).
2706
join(prop) would fail to render the second join outside the
2707
subquery, when joining on the same criterion as was on the
2708
inside.<a class="changeset-link reference internal" href="#change-3ccda2938593dbe9607247dd4ea3f042">(link)</a><p></p>
2711
<li><p id="change-0.6beta3-5"><span class="target" id="change-2546a2848e4b1fdee1a5cacf7b6e9177"><strong>[orm] </strong></span>Fixed bug in Query whereby the usage of aliased() constructs
2712
would fail if the underlying table (but not the actual alias)
2713
were referenced inside the subquery generated by
2714
q.from_self() or q.select_from().<a class="changeset-link reference internal" href="#change-2546a2848e4b1fdee1a5cacf7b6e9177">(link)</a><p></p>
2717
<li><p id="change-0.6beta3-6"><span class="target" id="change-69588e4d5fc29aebd7af673e5d4ec0ae"><strong>[orm] </strong></span>Fixed bug which affected all eagerload() and similar options
2718
such that “remote” eager loads, i.e. eagerloads off of a lazy
2719
load such as query(A).options(eagerload(A.b, B.c))
2720
wouldn’t eagerload anything, but using eagerload(“b.c”) would
2721
work fine.<a class="changeset-link reference internal" href="#change-69588e4d5fc29aebd7af673e5d4ec0ae">(link)</a><p></p>
2724
<li><p id="change-0.6beta3-7"><span class="target" id="change-3bae9af3e07a2b3db696089c0e843fea"><strong>[orm] </strong></span>Query gains an add_columns(<a href="#id3"><span class="problematic" id="id4">*</span></a>columns) method which is a multi-
2725
version of add_column(col). add_column(col) is future
2726
deprecated.<a class="changeset-link reference internal" href="#change-3bae9af3e07a2b3db696089c0e843fea">(link)</a><p></p>
2729
<li><p id="change-0.6beta3-8"><span class="target" id="change-965b0258f91345cb3a06eb1191ba4dd6"><strong>[orm] </strong></span>Query.join() will detect if the end result will be
2730
“FROM A JOIN A”, and will raise an error if so.<a class="changeset-link reference internal" href="#change-965b0258f91345cb3a06eb1191ba4dd6">(link)</a><p></p>
2733
<li><p id="change-0.6beta3-9"><span class="target" id="change-33de22e92c0ea512daaf2bf928b86233"><strong>[orm] </strong></span>Query.join(Cls.propname, from_joinpoint=True) will check more
2734
carefully that “Cls” is compatible with the current joinpoint,
2735
and act the same way as Query.join(“propname”, from_joinpoint=True)
2736
in that regard.<a class="changeset-link reference internal" href="#change-33de22e92c0ea512daaf2bf928b86233">(link)</a><p></p>
2741
<div class="section" id="change-0.6beta3-orm-declarative">
2742
<h3>orm declarative<a class="headerlink" href="#change-0.6beta3-orm-declarative" title="Permalink to this headline">¶</a></h3>
2744
<li><p id="change-0.6beta3-10"><span class="target" id="change-830637c55ffba2f2e096ea3c18f4f4a7"><strong>[declarative] [orm] </strong></span>Using a mixin won’t break if the mixin implements an
2745
unpredictable __getattribute__(), i.e. Zope interfaces.<a class="changeset-link reference internal" href="#change-830637c55ffba2f2e096ea3c18f4f4a7">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1746">#1746</a></p>
2748
<li><p id="change-0.6beta3-11"><span class="target" id="change-bd6f8eba3f3862d4d8d1011707f7b4cf"><strong>[declarative] [orm] </strong></span>Using @classdecorator and similar on mixins to define
2749
__tablename__, __table_args__, etc. now works if
2750
the method references attributes on the ultimate
2751
subclass.<a class="changeset-link reference internal" href="#change-bd6f8eba3f3862d4d8d1011707f7b4cf">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1749">#1749</a></p>
2754
<li><p id="change-0.6beta3-12"><span class="target" id="change-1330f1fe92881e1fd934e9d4505add81"><strong>[declarative] [orm] </strong></span>relationships and columns with foreign keys aren’t
2755
allowed on declarative mixins, sorry.<a class="changeset-link reference internal" href="#change-1330f1fe92881e1fd934e9d4505add81">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1751">#1751</a></p>
2760
<div class="section" id="change-0.6beta3-sql">
2761
<h3>sql<a class="headerlink" href="#change-0.6beta3-sql" title="Permalink to this headline">¶</a></h3>
2763
<li><p id="change-0.6beta3-13"><span class="target" id="change-8921f11442b55f634ffd5da10a321a10"><strong>[sql] </strong></span>Added with_hint() method to select() construct. Specify
2764
a table/alias, hint text, and optional dialect name, and
2765
“hints” will be rendered in the appropriate place in the
2766
statement. Works for Oracle, Sybase, MySQL.<a class="changeset-link reference internal" href="#change-8921f11442b55f634ffd5da10a321a10">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/921">#921</a></p>
2769
<li><p id="change-0.6beta3-14"><span class="target" id="change-dbf96f0ccd57bb7e5c8878762570f98e"><strong>[sql] </strong></span>Fixed bug introduced in 0.6beta2 where column labels would
2770
render inside of column expressions already assigned a label.<a class="changeset-link reference internal" href="#change-dbf96f0ccd57bb7e5c8878762570f98e">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1747">#1747</a></p>
2775
<div class="section" id="change-0.6beta3-postgresql">
2776
<h3>postgresql<a class="headerlink" href="#change-0.6beta3-postgresql" title="Permalink to this headline">¶</a></h3>
2778
<li><p id="change-0.6beta3-15"><span class="target" id="change-51b8f6239dcbf5719eeda7f33fb074ad"><strong>[postgresql] </strong></span>The psycopg2 dialect will log NOTICE messages via the
2779
“sqlalchemy.dialects.postgresql” logger name.<a class="changeset-link reference internal" href="#change-51b8f6239dcbf5719eeda7f33fb074ad">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/877">#877</a></p>
2782
<li><p id="change-0.6beta3-16"><span class="target" id="change-cc407f1f9b807702cef6cfefc88505ae"><strong>[postgresql] </strong></span>the TIME and TIMESTAMP types are now availble from the
2783
postgresql dialect directly, which add the PG-specific
2784
argument ‘precision’ to both. ‘precision’ and
2785
‘timezone’ are correctly reflected for both TIME and
2786
TIMEZONE types.<a class="changeset-link reference internal" href="#change-cc407f1f9b807702cef6cfefc88505ae">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/997">#997</a></p>
2791
<div class="section" id="change-0.6beta3-mysql">
2792
<h3>mysql<a class="headerlink" href="#change-0.6beta3-mysql" title="Permalink to this headline">¶</a></h3>
2794
<li><p id="change-0.6beta3-17"><span class="target" id="change-683fd67a66959dc8c853731f14b2cc81"><strong>[mysql] </strong></span>No longer guessing that TINYINT(1) should be BOOLEAN
2795
when reflecting - TINYINT(1) is returned. Use Boolean/
2796
BOOLEAN in table definition to get boolean conversion
2797
behavior.<a class="changeset-link reference internal" href="#change-683fd67a66959dc8c853731f14b2cc81">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1752">#1752</a></p>
2802
<div class="section" id="change-0.6beta3-oracle">
2803
<h3>oracle<a class="headerlink" href="#change-0.6beta3-oracle" title="Permalink to this headline">¶</a></h3>
2805
<li><p id="change-0.6beta3-18"><span class="target" id="change-5c94b49a397096685020b6e1e5702ec7"><strong>[oracle] </strong></span>The Oracle dialect will issue VARCHAR type definitions
2806
using character counts, i.e. VARCHAR2(50 CHAR), so that
2807
the column is sized in terms of characters and not bytes.
2808
Column reflection of character types will also use
2809
ALL_TAB_COLUMNS.CHAR_LENGTH instead of
2810
ALL_TAB_COLUMNS.DATA_LENGTH. Both of these behaviors take
2811
effect when the server version is 9 or higher - for
2812
version 8, the old behaviors are used.<a class="changeset-link reference internal" href="#change-5c94b49a397096685020b6e1e5702ec7">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1744">#1744</a></p>
2817
<div class="section" id="change-0.6beta3-misc">
2818
<h3>misc<a class="headerlink" href="#change-0.6beta3-misc" title="Permalink to this headline">¶</a></h3>
2820
<li><p id="change-0.6beta3-19"><span class="target" id="change-caaf4140d3b5e7c3c34a1234538341e4"><strong>[ext] </strong></span>The sqlalchemy.orm.shard module now becomes an extension,
2821
sqlalchemy.ext.horizontal_shard. The old import
2822
works with a deprecation warning.<a class="changeset-link reference internal" href="#change-caaf4140d3b5e7c3c34a1234538341e4">(link)</a><p></p>
2828
<div class="section" id="change-0.6beta2">
2829
<h2>0.6beta2<a class="headerlink" href="#change-0.6beta2" title="Permalink to this headline">¶</a></h2>
2830
Released: Sat Mar 20 2010<div class="section" id="change-0.6beta2-orm">
2831
<h3>orm<a class="headerlink" href="#change-0.6beta2-orm" title="Permalink to this headline">¶</a></h3>
2833
<li><p id="change-0.6beta2-0"><span class="target" id="change-91f89136c1aa2ba8d36ba9cf940655b3"><strong>[orm] </strong></span>The official name for the relation() function is now
2834
relationship(), to eliminate confusion over the relational
2835
algebra term. relation() however will remain available
2836
in equal capacity for the foreseeable future.<a class="changeset-link reference internal" href="#change-91f89136c1aa2ba8d36ba9cf940655b3">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1740">#1740</a></p>
2839
<li><p id="change-0.6beta2-1"><span class="target" id="change-9037d3b9977b0f3a6fcc6590008b9b44"><strong>[orm] </strong></span>Added “version_id_generator” argument to Mapper, this is a
2840
callable that, given the current value of the “version_id_col”,
2841
returns the next version number. Can be used for alternate
2842
versioning schemes such as uuid, timestamps.<a class="changeset-link reference internal" href="#change-9037d3b9977b0f3a6fcc6590008b9b44">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1692">#1692</a></p>
2845
<li><p id="change-0.6beta2-2"><span class="target" id="change-ac4f20719ab810598a0f3c8590bb9e48"><strong>[orm] </strong></span>added “lockmode” kw argument to Session.refresh(), will
2846
pass through the string value to Query the same as
2847
in with_lockmode(), will also do version check for a
2848
version_id_col-enabled mapping.<a class="changeset-link reference internal" href="#change-ac4f20719ab810598a0f3c8590bb9e48">(link)</a><p></p>
2851
<li><p id="change-0.6beta2-3"><span class="target" id="change-2edc56abe56b8a124e046abb661dc5db"><strong>[orm] </strong></span>Fixed bug whereby calling query(A).join(A.bs).add_entity(B)
2852
in a joined inheritance scenario would double-add B as a
2853
target and produce an invalid query.<a class="changeset-link reference internal" href="#change-2edc56abe56b8a124e046abb661dc5db">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1188">#1188</a></p>
2856
<li><p id="change-0.6beta2-4"><span class="target" id="change-58c0d0b1848c816ae294a332245af234"><strong>[orm] </strong></span>Fixed bug in session.rollback() which involved not removing
2857
formerly “pending” objects from the session before
2858
re-integrating “deleted” objects, typically occured with
2859
natural primary keys. If there was a primary key conflict
2860
between them, the attach of the deleted would fail
2861
internally. The formerly “pending” objects are now expunged
2862
first.<a class="changeset-link reference internal" href="#change-58c0d0b1848c816ae294a332245af234">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1674">#1674</a></p>
2865
<li><p id="change-0.6beta2-5"><span class="target" id="change-1f41c5a5c9f337a6608e0d4f75069739"><strong>[orm] </strong></span>Removed a lot of logging that nobody really cares about,
2866
logging that remains will respond to live changes in the
2867
log level. No significant overhead is added.<a class="changeset-link reference internal" href="#change-1f41c5a5c9f337a6608e0d4f75069739">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1719">#1719</a></p>
2870
<li><p id="change-0.6beta2-6"><span class="target" id="change-a1907a9674f8eb93bed9c80372b1b3b1"><strong>[orm] </strong></span>Fixed bug in session.merge() which prevented dict-like
2871
collections from merging.<a class="changeset-link reference internal" href="#change-a1907a9674f8eb93bed9c80372b1b3b1">(link)</a><p></p>
2874
<li><p id="change-0.6beta2-7"><span class="target" id="change-2388f0254684db431b5a06c72016ec42"><strong>[orm] </strong></span>session.merge() works with relations that specifically
2875
don’t include “merge” in their cascade options - the target
2876
is ignored completely.<a class="changeset-link reference internal" href="#change-2388f0254684db431b5a06c72016ec42">(link)</a><p></p>
2879
<li><p id="change-0.6beta2-8"><span class="target" id="change-c3b6834f3e3153d50e1c2975e838d44c"><strong>[orm] </strong></span>session.merge() will not expire existing scalar attributes
2880
on an existing target if the target has a value for that
2881
attribute, even if the incoming merged doesn’t have
2882
a value for the attribute. This prevents unnecessary loads
2883
on existing items. Will still mark the attr as expired
2884
if the destination doesn’t have the attr, though, which
2885
fulfills some contracts of deferred cols.<a class="changeset-link reference internal" href="#change-c3b6834f3e3153d50e1c2975e838d44c">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1681">#1681</a></p>
2888
<li><p id="change-0.6beta2-9"><span class="target" id="change-666a289821dc312f5ae2b810b4f61a61"><strong>[orm] </strong></span>The “allow_null_pks” flag is now called “allow_partial_pks”,
2889
defaults to True, acts like it did in 0.5 again. Except,
2890
it also is implemented within merge() such that a SELECT
2891
won’t be issued for an incoming instance with partially
2892
NULL primary key if the flag is False.<a class="changeset-link reference internal" href="#change-666a289821dc312f5ae2b810b4f61a61">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1680">#1680</a></p>
2895
<li><p id="change-0.6beta2-10"><span class="target" id="change-340360d984e646cb2c8c8da0d5cc11b8"><strong>[orm] </strong></span>Fixed bug in 0.6-reworked “many-to-one” optimizations
2896
such that a many-to-one that is against a non-primary key
2897
column on the remote table (i.e. foreign key against a
2898
UNIQUE column) will pull the “old” value in from the
2899
database during a change, since if it’s in the session
2900
we will need it for proper history/backref accounting,
2901
and we can’t pull from the local identity map on a
2902
non-primary key column.<a class="changeset-link reference internal" href="#change-340360d984e646cb2c8c8da0d5cc11b8">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1737">#1737</a></p>
2905
<li><p id="change-0.6beta2-11"><span class="target" id="change-2848fed5c8fca096477e50f01a83b6c3"><strong>[orm] </strong></span>fixed internal error which would occur if calling has()
2906
or similar complex expression on a single-table inheritance
2907
relation().<a class="changeset-link reference internal" href="#change-2848fed5c8fca096477e50f01a83b6c3">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1731">#1731</a></p>
2910
<li><p id="change-0.6beta2-12"><span class="target" id="change-5033bb4d60482fdc7e61d81f6412cea4"><strong>[orm] </strong></span>query.one() no longer applies LIMIT to the query, this to
2911
ensure that it fully counts all object identities present
2912
in the result, even in the case where joins may conceal
2913
multiple identities for two or more rows. As a bonus,
2914
one() can now also be called with a query that issued
2915
from_statement() to start with since it no longer modifies
2916
the query.<a class="changeset-link reference internal" href="#change-5033bb4d60482fdc7e61d81f6412cea4">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1688">#1688</a></p>
2919
<li><p id="change-0.6beta2-13"><span class="target" id="change-52b4d6b9d3562cdaf43788184ae1805f"><strong>[orm] </strong></span>query.get() now returns None if queried for an identifier
2920
that is present in the identity map with a different class
2921
than the one requested, i.e. when using polymorphic loading.<a class="changeset-link reference internal" href="#change-52b4d6b9d3562cdaf43788184ae1805f">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1727">#1727</a></p>
2924
<li><p id="change-0.6beta2-14"><span class="target" id="change-655aaf64d072c58ce2e64a5d6dc12323"><strong>[orm] </strong></span>A major fix in query.join(), when the “on” clause is an
2925
attribute of an aliased() construct, but there is already
2926
an existing join made out to a compatible target, query properly
2927
joins to the right aliased() construct instead of sticking
2928
onto the right side of the existing join.<a class="changeset-link reference internal" href="#change-655aaf64d072c58ce2e64a5d6dc12323">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1706">#1706</a></p>
2931
<li><p id="change-0.6beta2-15"><span class="target" id="change-fd6cb3f54f47c27d18ce7c8dd343525d"><strong>[orm] </strong></span>Slight improvement to the fix for to not issue
2932
needless updates of the primary key column during a so-called
2933
“row switch” operation, i.e. add + delete of two objects
2934
with the same PK.<a class="changeset-link reference internal" href="#change-fd6cb3f54f47c27d18ce7c8dd343525d">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1362">#1362</a></p>
2937
<li><p id="change-0.6beta2-16"><span class="target" id="change-149e924d04484755c0a14ec239f22076"><strong>[orm] </strong></span>Now uses sqlalchemy.orm.exc.DetachedInstanceError when an
2938
attribute load or refresh action fails due to object
2939
being detached from any Session. UnboundExecutionError
2940
is specific to engines bound to sessions and statements.<a class="changeset-link reference internal" href="#change-149e924d04484755c0a14ec239f22076">(link)</a><p></p>
2943
<li><p id="change-0.6beta2-17"><span class="target" id="change-7312d2f689d678c6e4d0799defdb8511"><strong>[orm] </strong></span>Query called in the context of an expression will render
2944
disambiguating labels in all cases. Note that this does
2945
not apply to the existing .statement and .subquery()
2946
accessor/method, which still honors the .with_labels()
2947
setting that defaults to False.<a class="changeset-link reference internal" href="#change-7312d2f689d678c6e4d0799defdb8511">(link)</a><p></p>
2950
<li><p id="change-0.6beta2-18"><span class="target" id="change-69ee650c673044a6587e8f1a25fd2e9b"><strong>[orm] </strong></span>Query.union() retains disambiguating labels within the
2951
returned statement, thus avoiding various SQL composition
2952
errors which can result from column name conflicts.<a class="changeset-link reference internal" href="#change-69ee650c673044a6587e8f1a25fd2e9b">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1676">#1676</a></p>
2955
<li><p id="change-0.6beta2-19"><span class="target" id="change-9366c0432f49557b000d6930b7f2b0c8"><strong>[orm] </strong></span>Fixed bug in attribute history that inadvertently invoked
2956
__eq__ on mapped instances.<a class="changeset-link reference internal" href="#change-9366c0432f49557b000d6930b7f2b0c8">(link)</a><p></p>
2959
<li><p id="change-0.6beta2-20"><span class="target" id="change-9b042559ccc515464dca31a9da9e25d6"><strong>[orm] </strong></span>Some internal streamlining of object loading grants a
2960
small speedup for large results, estimates are around
2961
10-15%. Gave the “state” internals a good solid
2962
cleanup with less complexity, datamembers,
2963
method calls, blank dictionary creates.<a class="changeset-link reference internal" href="#change-9b042559ccc515464dca31a9da9e25d6">(link)</a><p></p>
2966
<li><p id="change-0.6beta2-21"><span class="target" id="change-99a73658e5e4c367df4688c45bbda9aa"><strong>[orm] </strong></span>Documentation clarification for query.delete()<a class="changeset-link reference internal" href="#change-99a73658e5e4c367df4688c45bbda9aa">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1689">#1689</a></p>
2969
<li><p id="change-0.6beta2-22"><span class="target" id="change-3b02e92cb9ea00b598b21503acc970d0"><strong>[orm] </strong></span>Fixed cascade bug in many-to-one relation() when attribute
2970
was set to None, introduced in r6711 (cascade deleted
2971
items into session during add()).<a class="changeset-link reference internal" href="#change-3b02e92cb9ea00b598b21503acc970d0">(link)</a><p></p>
2974
<li><p id="change-0.6beta2-23"><span class="target" id="change-931a758f3fb2e353bb842566bd92c153"><strong>[orm] </strong></span>Calling query.order_by() or query.distinct() before calling
2975
query.select_from(), query.with_polymorphic(), or
2976
query.from_statement() raises an exception now instead of
2977
silently dropping those criterion.<a class="changeset-link reference internal" href="#change-931a758f3fb2e353bb842566bd92c153">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1736">#1736</a></p>
2980
<li><p id="change-0.6beta2-24"><span class="target" id="change-c2ae6c50721c4f5bc949b93ea8f29055"><strong>[orm] </strong></span>query.scalar() now raises an exception if more than one
2981
row is returned. All other behavior remains the same.<a class="changeset-link reference internal" href="#change-c2ae6c50721c4f5bc949b93ea8f29055">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1735">#1735</a></p>
2984
<li><p id="change-0.6beta2-25"><span class="target" id="change-714ce6498d2c194488bf5337d8787134"><strong>[orm] </strong></span>Fixed bug which caused “row switch” logic, that is an
2985
INSERT and DELETE replaced by an UPDATE, to fail when
2986
version_id_col was in use.<a class="changeset-link reference internal" href="#change-714ce6498d2c194488bf5337d8787134">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1692">#1692</a></p>
2991
<div class="section" id="change-0.6beta2-orm-declarative">
2992
<h3>orm declarative<a class="headerlink" href="#change-0.6beta2-orm-declarative" title="Permalink to this headline">¶</a></h3>
2994
<li><p id="change-0.6beta2-26"><span class="target" id="change-f03d84f79ae875801309e3cf1d11c2c6"><strong>[declarative] [orm] </strong></span>DeclarativeMeta exclusively uses cls.__dict__ (not <a href="#id17"><span class="problematic" id="id18">dict_</span></a>)
2995
as the source of class information; _as_declarative exclusively
2996
uses the <a href="#id19"><span class="problematic" id="id20">dict_</span></a> passed to it as the source of class information
2997
(which when using DeclarativeMeta is cls.__dict__). This should
2998
in theory make it easier for custom metaclasses to modify
2999
the state passed into _as_declarative.<a class="changeset-link reference internal" href="#change-f03d84f79ae875801309e3cf1d11c2c6">(link)</a><p></p>
3002
<li><p id="change-0.6beta2-27"><span class="target" id="change-a6fb16c5b4efc1b1336ae57e0611eb05"><strong>[declarative] [orm] </strong></span>declarative now accepts mixin classes directly, as a means
3003
to provide common functional and column-based elements on
3004
all subclasses, as well as a means to propagate a fixed
3005
set of __table_args__ or __mapper_args__ to subclasses.
3006
For custom combinations of __table_args__/__mapper_args__ from
3007
an inherited mixin to local, descriptors can now be used.
3008
New details are all up in the Declarative documentation.
3009
Thanks to Chris Withers for putting up with my strife
3010
on this.<a class="changeset-link reference internal" href="#change-a6fb16c5b4efc1b1336ae57e0611eb05">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1707">#1707</a></p>
3013
<li><p id="change-0.6beta2-28"><span class="target" id="change-712b74c929fe77fb05e228b508010508"><strong>[declarative] [orm] </strong></span>the __mapper_args__ dict is copied when propagating to a subclass,
3014
and is taken straight off the class __dict__ to avoid any
3015
propagation from the parent. mapper inheritance already
3016
propagates the things you want from the parent mapper.<a class="changeset-link reference internal" href="#change-712b74c929fe77fb05e228b508010508">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1393">#1393</a></p>
3019
<li><p id="change-0.6beta2-29"><span class="target" id="change-cdbe265dab1874af885c1b8130cb2eee"><strong>[declarative] [orm] </strong></span>An exception is raised when a single-table subclass specifies
3020
a column that is already present on the base class.<a class="changeset-link reference internal" href="#change-cdbe265dab1874af885c1b8130cb2eee">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1732">#1732</a></p>
3025
<div class="section" id="change-0.6beta2-sql">
3026
<h3>sql<a class="headerlink" href="#change-0.6beta2-sql" title="Permalink to this headline">¶</a></h3>
3028
<li><p id="change-0.6beta2-30"><span class="target" id="change-b53712fca734ff4d0164b00e61f53cf1"><strong>[sql] </strong></span>join() will now simulate a NATURAL JOIN by default. Meaning,
3029
if the left side is a join, it will attempt to join the right
3030
side to the rightmost side of the left first, and not raise
3031
any exceptions about ambiguous join conditions if successful
3032
even if there are further join targets across the rest of
3033
the left.<a class="changeset-link reference internal" href="#change-b53712fca734ff4d0164b00e61f53cf1">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1714">#1714</a></p>
3036
<li><p id="change-0.6beta2-31"><span class="target" id="change-e6678947026dc69d573ba7f06fa6dcc0"><strong>[sql] </strong></span>The most common result processors conversion function were
3037
moved to the new “processors” module. Dialect authors are
3038
encouraged to use those functions whenever they correspond
3039
to their needs instead of implementing custom ones.<a class="changeset-link reference internal" href="#change-e6678947026dc69d573ba7f06fa6dcc0">(link)</a><p></p>
3042
<li><p id="change-0.6beta2-32"><span class="target" id="change-787fd3a6677f8ba4f979ea8f6fb383fd"><strong>[sql] </strong></span>SchemaType and subclasses Boolean, Enum are now serializable,
3043
including their ddl listener and other event callables.<a class="changeset-link reference internal" href="#change-787fd3a6677f8ba4f979ea8f6fb383fd">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1694">#1694</a>, <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1698">#1698</a></p>
3046
<li><p id="change-0.6beta2-33"><span class="target" id="change-b8980f5d17caec1e2e5b563b1e15b8b2"><strong>[sql] </strong></span>Some platforms will now interpret certain literal values
3047
as non-bind parameters, rendered literally into the SQL
3048
statement. This to support strict SQL-92 rules that are
3049
enforced by some platforms including MS-SQL and Sybase.
3050
In this model, bind parameters aren’t allowed in the
3051
columns clause of a SELECT, nor are certain ambiguous
3052
expressions like ”?=?”. When this mode is enabled, the base
3053
compiler will render the binds as inline literals, but only across
3054
strings and numeric values. Other types such as dates
3055
will raise an error, unless the dialect subclass defines
3056
a literal rendering function for those. The bind parameter
3057
must have an embedded literal value already or an error
3058
is raised (i.e. won’t work with straight bindparam(‘x’)).
3059
Dialects can also expand upon the areas where binds are not
3060
accepted, such as within argument lists of functions
3061
(which don’t work on MS-SQL when native SQL binding is used).<a class="changeset-link reference internal" href="#change-b8980f5d17caec1e2e5b563b1e15b8b2">(link)</a><p></p>
3064
<li><p id="change-0.6beta2-34"><span class="target" id="change-4add0a3ae9513d98fa991274564b4e51"><strong>[sql] </strong></span>Added “unicode_errors” parameter to String, Unicode, etc.
3065
Behaves like the ‘errors’ keyword argument to
3066
the standard library’s string.decode() functions. This flag
3067
requires that <cite>convert_unicode</cite> is set to <cite>“force”</cite> - otherwise,
3068
SQLAlchemy is not guaranteed to handle the task of unicode
3069
conversion. Note that this flag adds significant performance
3070
overhead to row-fetching operations for backends that already
3071
return unicode objects natively (which most DBAPIs do). This
3072
flag should only be used as an absolute last resort for reading
3073
strings from a column with varied or corrupted encodings,
3074
which only applies to databases that accept invalid encodings
3075
in the first place (i.e. MySQL. <em>not</em> PG, Sqlite, etc.)<a class="changeset-link reference internal" href="#change-4add0a3ae9513d98fa991274564b4e51">(link)</a><p></p>
3078
<li><p id="change-0.6beta2-35"><span class="target" id="change-fd8105345e50a3b6986674cfa2db831c"><strong>[sql] </strong></span>Added math negation operator support, -x.<a class="changeset-link reference internal" href="#change-fd8105345e50a3b6986674cfa2db831c">(link)</a><p></p>
3081
<li><p id="change-0.6beta2-36"><span class="target" id="change-375720ffaaf3679f497e76385994a25c"><strong>[sql] </strong></span>FunctionElement subclasses are now directly executable the
3082
same way any func.foo() construct is, with automatic
3083
SELECT being applied when passed to execute().<a class="changeset-link reference internal" href="#change-375720ffaaf3679f497e76385994a25c">(link)</a><p></p>
3086
<li><p id="change-0.6beta2-37"><span class="target" id="change-a8e7f19cf6b70ec1d6540a17f847c531"><strong>[sql] </strong></span>The “type” and “bind” keyword arguments of a func.foo()
3087
construct are now local to “func.” constructs and are
3088
not part of the FunctionElement base class, allowing
3089
a “type” to be handled in a custom constructor or
3090
class-level variable.<a class="changeset-link reference internal" href="#change-a8e7f19cf6b70ec1d6540a17f847c531">(link)</a><p></p>
3093
<li><p id="change-0.6beta2-38"><span class="target" id="change-4e51f442ae41f22cc4bff3527f97bf33"><strong>[sql] </strong></span>Restored the keys() method to ResultProxy.<a class="changeset-link reference internal" href="#change-4e51f442ae41f22cc4bff3527f97bf33">(link)</a><p></p>
3096
<li><p id="change-0.6beta2-39"><span class="target" id="change-543013779b4c9e5cad66c4531f5053e0"><strong>[sql] </strong></span>The type/expression system now does a more complete job
3097
of determining the return type from an expression
3098
as well as the adaptation of the Python operator into
3099
a SQL operator, based on the full left/right/operator
3100
of the given expression. In particular
3101
the date/time/interval system created for Postgresql
3102
EXTRACT in has now been generalized into
3103
the type system. The previous behavior which often
3104
occured of an expression “column + literal” forcing
3105
the type of “literal” to be the same as that of “column”
3106
will now usually not occur - the type of
3107
“literal” is first derived from the Python type of the
3108
literal, assuming standard native Python types + date
3109
types, before falling back to that of the known type
3110
on the other side of the expression. If the
3111
“fallback” type is compatible (i.e. CHAR from String),
3112
the literal side will use that. TypeDecorator
3113
types override this by default to coerce the “literal”
3114
side unconditionally, which can be changed by implementing
3115
the coerce_compared_value() method. Also part of.<a class="changeset-link reference internal" href="#change-543013779b4c9e5cad66c4531f5053e0">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1647">#1647</a>, <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1683">#1683</a></p>
3118
<li><p id="change-0.6beta2-40"><span class="target" id="change-4b04f7b3b18249863369ddef13e98ada"><strong>[sql] </strong></span>Made sqlalchemy.sql.expressions.Executable part of public
3119
API, used for any expression construct that can be sent to
3120
execute(). FunctionElement now inherits Executable so that
3121
it gains execution_options(), which are also propagated
3122
to the select() that’s generated within execute().
3123
Executable in turn subclasses _Generative which marks
3124
any ClauseElement that supports the @_generative
3125
decorator - these may also become “public” for the benefit
3126
of the compiler extension at some point.<a class="changeset-link reference internal" href="#change-4b04f7b3b18249863369ddef13e98ada">(link)</a><p></p>
3129
<li><p id="change-0.6beta2-41"><span class="target" id="change-e18872438ff47328adbe402a50ef19b8"><strong>[sql] </strong></span>A change to the solution for - an end-user
3130
defined bind parameter name that directly conflicts with
3131
a column-named bind generated directly from the SET or
3132
VALUES clause of an update/insert generates a compile error.
3133
This reduces call counts and eliminates some cases where
3134
undesirable name conflicts could still occur.<a class="changeset-link reference internal" href="#change-e18872438ff47328adbe402a50ef19b8">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1579">#1579</a></p>
3137
<li><p id="change-0.6beta2-42"><span class="target" id="change-25e52b132f46c6da5df9e4d2d1b3629e"><strong>[sql] </strong></span>Column() requires a type if it has no foreign keys (this is
3138
not new). An error is now raised if a Column() has no type
3139
and no foreign keys.<a class="changeset-link reference internal" href="#change-25e52b132f46c6da5df9e4d2d1b3629e">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1705">#1705</a></p>
3142
<li><p id="change-0.6beta2-43"><span class="target" id="change-1bd09db2f45aebf370068907a549222d"><strong>[sql] </strong></span>the “scale” argument of the Numeric() type is honored when
3143
coercing a returned floating point value into a string
3144
on its way to Decimal - this allows accuracy to function
3145
on SQLite, MySQL.<a class="changeset-link reference internal" href="#change-1bd09db2f45aebf370068907a549222d">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1717">#1717</a></p>
3148
<li><p id="change-0.6beta2-44"><span class="target" id="change-d1540ed7293cf73f522c47764b34b8db"><strong>[sql] </strong></span>the copy() method of Column now copies over uninitialized
3149
“on table attach” events. Helps with the new declarative
3150
“mixin” capability.<a class="changeset-link reference internal" href="#change-d1540ed7293cf73f522c47764b34b8db">(link)</a><p></p>
3155
<div class="section" id="change-0.6beta2-mysql">
3156
<h3>mysql<a class="headerlink" href="#change-0.6beta2-mysql" title="Permalink to this headline">¶</a></h3>
3158
<li><p id="change-0.6beta2-45"><span class="target" id="change-a35014255c51338d324794124dabec73"><strong>[mysql] </strong></span>Fixed reflection bug whereby when COLLATE was present,
3159
nullable flag and server defaults would not be reflected.<a class="changeset-link reference internal" href="#change-a35014255c51338d324794124dabec73">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1655">#1655</a></p>
3162
<li><p id="change-0.6beta2-46"><span class="target" id="change-0a377528b158add95b51614355824b86"><strong>[mysql] </strong></span>Fixed reflection of TINYINT(1) “boolean” columns defined with
3163
integer flags like UNSIGNED.<a class="changeset-link reference internal" href="#change-0a377528b158add95b51614355824b86">(link)</a><p></p>
3166
<li><p id="change-0.6beta2-47"><span class="target" id="change-c4476c66267aa9d53e5d3104352f2460"><strong>[mysql] </strong></span>Further fixes for the mysql-connector dialect.<a class="changeset-link reference internal" href="#change-c4476c66267aa9d53e5d3104352f2460">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1668">#1668</a></p>
3169
<li><p id="change-0.6beta2-48"><span class="target" id="change-e5eef98bf3b744b814f45de869fa2400"><strong>[mysql] </strong></span>Composite PK table on InnoDB where the “autoincrement” column
3170
isn’t first will emit an explicit “KEY” phrase within
3171
CREATE TABLE thereby avoiding errors.<a class="changeset-link reference internal" href="#change-e5eef98bf3b744b814f45de869fa2400">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1496">#1496</a></p>
3174
<li><p id="change-0.6beta2-49"><span class="target" id="change-eabba2ee40f19b4f83f4b62f38ac3b3e"><strong>[mysql] </strong></span>Added reflection/create table support for a wide range
3175
of MySQL keywords.<a class="changeset-link reference internal" href="#change-eabba2ee40f19b4f83f4b62f38ac3b3e">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1634">#1634</a></p>
3178
<li><p id="change-0.6beta2-50"><span class="target" id="change-a4024dfc8c4693eea7c02add1a5b72f4"><strong>[mysql] </strong></span>Fixed import error which could occur reflecting tables on
3179
a Windows host<a class="changeset-link reference internal" href="#change-a4024dfc8c4693eea7c02add1a5b72f4">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1580">#1580</a></p>
3184
<div class="section" id="change-0.6beta2-sqlite">
3185
<h3>sqlite<a class="headerlink" href="#change-0.6beta2-sqlite" title="Permalink to this headline">¶</a></h3>
3187
<li><p id="change-0.6beta2-51"><span class="target" id="change-686860a49e344194295bd7ddef459b1a"><strong>[sqlite] </strong></span>Added “native_datetime=True” flag to create_engine().
3188
This will cause the DATE and TIMESTAMP types to skip
3189
all bind parameter and result row processing, under
3190
the assumption that PARSE_DECLTYPES has been enabled
3191
on the connection. Note that this is not entirely
3192
compatible with the “func.current_date()”, which
3193
will be returned as a string.<a class="changeset-link reference internal" href="#change-686860a49e344194295bd7ddef459b1a">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1685">#1685</a></p>
3198
<div class="section" id="change-0.6beta2-mssql">
3199
<h3>mssql<a class="headerlink" href="#change-0.6beta2-mssql" title="Permalink to this headline">¶</a></h3>
3201
<li><p id="change-0.6beta2-52"><span class="target" id="change-c43171d5ad2afdb8be0210f4345e7c3b"><strong>[mssql] </strong></span>Re-established support for the pymssql dialect.<a class="changeset-link reference internal" href="#change-c43171d5ad2afdb8be0210f4345e7c3b">(link)</a><p></p>
3204
<li><p id="change-0.6beta2-53"><span class="target" id="change-afec227c9a875855720b6369b4193326"><strong>[mssql] </strong></span>Various fixes for implicit returning, reflection,
3205
etc. - the MS-SQL dialects aren’t quite complete
3206
in 0.6 yet (but are close)<a class="changeset-link reference internal" href="#change-afec227c9a875855720b6369b4193326">(link)</a><p></p>
3209
<li><p id="change-0.6beta2-54"><span class="target" id="change-0541548f6903480b3a322de8c54929ce"><strong>[mssql] </strong></span>Added basic support for mxODBC.<a class="changeset-link reference internal" href="#change-0541548f6903480b3a322de8c54929ce">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1710">#1710</a></p>
3212
<li><p id="change-0.6beta2-55"><span class="target" id="change-dba80448eeea205b1bbaec327ac1de55"><strong>[mssql] </strong></span>Removed the text_as_varchar option.<a class="changeset-link reference internal" href="#change-dba80448eeea205b1bbaec327ac1de55">(link)</a><p></p>
3217
<div class="section" id="change-0.6beta2-oracle">
3218
<h3>oracle<a class="headerlink" href="#change-0.6beta2-oracle" title="Permalink to this headline">¶</a></h3>
3220
<li><p id="change-0.6beta2-56"><span class="target" id="change-f2a132a1d5c7974e390d588eac834b3b"><strong>[oracle] </strong></span>“out” parameters require a type that is supported by
3221
cx_oracle. An error will be raised if no cx_oracle
3222
type can be found.<a class="changeset-link reference internal" href="#change-f2a132a1d5c7974e390d588eac834b3b">(link)</a><p></p>
3225
<li><p id="change-0.6beta2-57"><span class="target" id="change-ab6e812d286cec34322fb6829527927b"><strong>[oracle] </strong></span>Oracle ‘DATE’ now does not perform any result processing,
3226
as the DATE type in Oracle stores full date+time objects,
3227
that’s what you’ll get. Note that the generic types.Date
3228
type <em>will</em> still call value.date() on incoming values,
3229
however. When reflecting a table, the reflected type
3230
will be ‘DATE’.<a class="changeset-link reference internal" href="#change-ab6e812d286cec34322fb6829527927b">(link)</a><p></p>
3233
<li><p id="change-0.6beta2-58"><span class="target" id="change-62c558744df2f44f9cb4bf1ff987ce86"><strong>[oracle] </strong></span>Added preliminary support for Oracle’s WITH_UNICODE
3234
mode. At the very least this establishes initial
3235
support for cx_Oracle with Python 3. When WITH_UNICODE
3236
mode is used in Python 2.xx, a large and scary warning
3237
is emitted asking that the user seriously consider
3238
the usage of this difficult mode of operation.<a class="changeset-link reference internal" href="#change-62c558744df2f44f9cb4bf1ff987ce86">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1670">#1670</a></p>
3241
<li><p id="change-0.6beta2-59"><span class="target" id="change-774d1f88602325ba20cca6ce5c10734b"><strong>[oracle] </strong></span>The except_() method now renders as MINUS on Oracle,
3242
which is more or less equivalent on that platform.<a class="changeset-link reference internal" href="#change-774d1f88602325ba20cca6ce5c10734b">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1712">#1712</a></p>
3245
<li><p id="change-0.6beta2-60"><span class="target" id="change-0e995c38104f4a4175d2a741f88b12bc"><strong>[oracle] </strong></span>Added support for rendering and reflecting
3246
TIMESTAMP WITH TIME ZONE, i.e. TIMESTAMP(timezone=True).<a class="changeset-link reference internal" href="#change-0e995c38104f4a4175d2a741f88b12bc">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/651">#651</a></p>
3249
<li><p id="change-0.6beta2-61"><span class="target" id="change-21af7340803f01c63bb39084313092b9"><strong>[oracle] </strong></span>Oracle INTERVAL type can now be reflected.<a class="changeset-link reference internal" href="#change-21af7340803f01c63bb39084313092b9">(link)</a><p></p>
3254
<div class="section" id="change-0.6beta2-misc">
3255
<h3>misc<a class="headerlink" href="#change-0.6beta2-misc" title="Permalink to this headline">¶</a></h3>
3257
<li><p id="change-0.6beta2-62"><span class="target" id="change-30f2fc874b9df7b7d141eef33c5d2468"><strong>[py3k] </strong></span>Improved the installation/test setup regarding Python 3,
3258
now that Distribute runs on Py3k. distribute_setup.py
3259
is now included. See README.py3k for Python 3 installation/
3260
testing instructions.<a class="changeset-link reference internal" href="#change-30f2fc874b9df7b7d141eef33c5d2468">(link)</a><p></p>
3263
<li><p id="change-0.6beta2-63"><span class="target" id="change-cdd5ac4118fc526b3b6e424254f9f575"><strong>[engines] </strong></span>Added an optional C extension to speed up the sql layer by
3264
reimplementing RowProxy and the most common result processors.
3265
The actual speedups will depend heavily on your DBAPI and
3266
the mix of datatypes used in your tables, and can vary from
3267
a 30% improvement to more than 200%. It also provides a modest
3268
(~15-20%) indirect improvement to ORM speed for large queries.
3269
Note that it is <em>not</em> built/installed by default.
3270
See README for installation instructions.<a class="changeset-link reference internal" href="#change-cdd5ac4118fc526b3b6e424254f9f575">(link)</a><p></p>
3273
<li><p id="change-0.6beta2-64"><span class="target" id="change-582f4dfd426b3da60af448476c0d9049"><strong>[engines] </strong></span>the execution sequence pulls all rowcount/last inserted ID
3274
info from the cursor before commit() is called on the
3275
DBAPI connection in an “autocommit” scenario. This helps
3276
mxodbc with rowcount and is probably a good idea overall.<a class="changeset-link reference internal" href="#change-582f4dfd426b3da60af448476c0d9049">(link)</a><p></p>
3279
<li><p id="change-0.6beta2-65"><span class="target" id="change-8339a8f6f9f054e9871057ff44eb310b"><strong>[engines] </strong></span>Opened up logging a bit such that isEnabledFor() is called
3280
more often, so that changes to the log level for engine/pool
3281
will be reflected on next connect. This adds a small
3282
amount of method call overhead. It’s negligible and will make
3283
life a lot easier for all those situations when logging
3284
just happens to be configured after create_engine() is called.<a class="changeset-link reference internal" href="#change-8339a8f6f9f054e9871057ff44eb310b">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1719">#1719</a></p>
3287
<li><p id="change-0.6beta2-66"><span class="target" id="change-44b744d4299fe9fd0c15e0b51548c21c"><strong>[engines] </strong></span>The assert_unicode flag is deprecated. SQLAlchemy will raise
3288
a warning in all cases where it is asked to encode a non-unicode
3289
Python string, as well as when a Unicode or UnicodeType type
3290
is explicitly passed a bytestring. The String type will do nothing
3291
for DBAPIs that already accept Python unicode objects.<a class="changeset-link reference internal" href="#change-44b744d4299fe9fd0c15e0b51548c21c">(link)</a><p></p>
3294
<li><p id="change-0.6beta2-67"><span class="target" id="change-e486cdddb6da9fcd5b78a7e384f517e3"><strong>[engines] </strong></span>Bind parameters are sent as a tuple instead of a list. Some
3295
backend drivers will not accept bind parameters as a list.<a class="changeset-link reference internal" href="#change-e486cdddb6da9fcd5b78a7e384f517e3">(link)</a><p></p>
3298
<li><p id="change-0.6beta2-68"><span class="target" id="change-31babb385ad99c9c8dfef800a188b08f"><strong>[engines] </strong></span>threadlocal engine wasn’t properly closing the connection
3299
upon close() - fixed that.<a class="changeset-link reference internal" href="#change-31babb385ad99c9c8dfef800a188b08f">(link)</a><p></p>
3302
<li><p id="change-0.6beta2-69"><span class="target" id="change-6a84cce20a490a05b2ae3aa704d0b11f"><strong>[engines] </strong></span>Transaction object doesn’t rollback or commit if it isn’t
3303
“active”, allows more accurate nesting of begin/rollback/commit.<a class="changeset-link reference internal" href="#change-6a84cce20a490a05b2ae3aa704d0b11f">(link)</a><p></p>
3306
<li><p id="change-0.6beta2-70"><span class="target" id="change-2e55f14274c2191236e3104fac4e24de"><strong>[engines] </strong></span>Python unicode objects as binds result in the Unicode type,
3307
not string, thus eliminating a certain class of unicode errors
3308
on drivers that don’t support unicode binds.<a class="changeset-link reference internal" href="#change-2e55f14274c2191236e3104fac4e24de">(link)</a><p></p>
3311
<li><p id="change-0.6beta2-71"><span class="target" id="change-2a0cef92888b2be98785ecc9a097653c"><strong>[engines] </strong></span>Added “logging_name” argument to create_engine(), Pool() constructor
3312
as well as “pool_logging_name” argument to create_engine() which
3313
filters down to that of Pool. Issues the given string name
3314
within the “name” field of logging messages instead of the default
3315
hex identifier string.<a class="changeset-link reference internal" href="#change-2a0cef92888b2be98785ecc9a097653c">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1555">#1555</a></p>
3318
<li><p id="change-0.6beta2-72"><span class="target" id="change-81eacba0128286c062f03c539e3fb32a"><strong>[engines] </strong></span>The visit_pool() method of Dialect is removed, and replaced with
3319
on_connect(). This method returns a callable which receives
3320
the raw DBAPI connection after each one is created. The callable
3321
is assembled into a first_connect/connect pool listener by the
3322
connection strategy if non-None. Provides a simpler interface
3323
for dialects.<a class="changeset-link reference internal" href="#change-81eacba0128286c062f03c539e3fb32a">(link)</a><p></p>
3326
<li><p id="change-0.6beta2-73"><span class="target" id="change-6fb3ebb61d325e02bee2444d540be282"><strong>[engines] </strong></span>StaticPool now initializes, disposes and recreates without
3327
opening a new connection - the connection is only opened when
3328
first requested. dispose() also works on AssertionPool now.<a class="changeset-link reference internal" href="#change-6fb3ebb61d325e02bee2444d540be282">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1728">#1728</a></p>
3331
<li><p id="change-0.6beta2-74"><span class="target" id="change-19e2f337ca9a7555b3e2cd9f34026221"><strong>[ticket: 1673] [metadata] </strong></span>Added the ability to strip schema information when using
3332
“tometadata” by passing “schema=None” as an argument. If schema
3333
is not specified then the table’s schema is retained.<a class="changeset-link reference internal" href="#change-19e2f337ca9a7555b3e2cd9f34026221">(link)</a><p></p>
3336
<li><p id="change-0.6beta2-75"><span class="target" id="change-59b20e0d794888b5924ddb106a96ce97"><strong>[sybase] </strong></span>Implemented a preliminary working dialect for Sybase,
3337
with sub-implementations for Python-Sybase as well
3338
as Pyodbc. Handles table
3339
creates/drops and basic round trip functionality.
3340
Does not yet include reflection or comprehensive
3341
support of unicode/special expressions/etc.<a class="changeset-link reference internal" href="#change-59b20e0d794888b5924ddb106a96ce97">(link)</a><p></p>
3344
<li><p id="change-0.6beta2-76"><span class="target" id="change-2fba82fbacb3e70a6a774aa1e8e81f74"><strong>[examples] </strong></span>Changed the beaker cache example a bit to have a separate
3345
RelationCache option for lazyload caching. This object
3346
does a lookup among any number of potential attributes
3347
more efficiently by grouping several into a common structure.
3348
Both FromCache and RelationCache are simpler individually.<a class="changeset-link reference internal" href="#change-2fba82fbacb3e70a6a774aa1e8e81f74">(link)</a><p></p>
3351
<li><p id="change-0.6beta2-77"><span class="target" id="change-e7846468739660d7e6ad96f9435b4871"><strong>[documentation] </strong></span>Major cleanup work in the docs to link class, function, and
3352
method names into the API docs.<a class="changeset-link reference internal" href="#change-e7846468739660d7e6ad96f9435b4871">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1700">#1700</a></p>
3358
<div class="section" id="change-0.6beta1">
3359
<h2>0.6beta1<a class="headerlink" href="#change-0.6beta1" title="Permalink to this headline">¶</a></h2>
3360
Released: Wed Feb 03 2010<div class="section" id="change-0.6beta1-orm">
3361
<h3>orm<a class="headerlink" href="#change-0.6beta1-orm" title="Permalink to this headline">¶</a></h3>
3363
<li><p id="change-0.6beta1-0"><span class="target" id="change-dc6ff9eba416b02d740a8dd8fcf216cb"><strong>[orm] </strong></span><dl class="docutils">
3364
<dt>Changes to query.update() and query.delete():</dt>
3365
<dd><ul class="first last">
3366
<li>the ‘expire’ option on query.update() has been renamed to
3367
‘fetch’, thus matching that of query.delete().
3368
‘expire’ is deprecated and issues a warning.</li>
3369
<li>query.update() and query.delete() both default to
3370
‘evaluate’ for the synchronize strategy.</li>
3371
<li>the ‘synchronize’ strategy for update() and delete()
3372
raises an error on failure. There is no implicit fallback
3373
onto “fetch”. Failure of evaluation is based on the
3374
structure of criteria, so success/failure is deterministic
3375
based on code structure.</li>
3379
<a class="changeset-link reference internal" href="#change-dc6ff9eba416b02d740a8dd8fcf216cb">(link)</a><p></p>
3382
<li><p id="change-0.6beta1-1"><span class="target" id="change-b0f39f3d2c314fb24db07687b5d6ce5c"><strong>[orm] </strong></span><dl class="docutils">
3383
<dt>Enhancements on many-to-one relations:</dt>
3384
<dd><ul class="first last">
3385
<li>many-to-one relations now fire off a lazyload in fewer
3386
cases, including in most cases will not fetch the “old”
3387
value when a new one is replaced.</li>
3388
<li>many-to-one relation to a joined-table subclass now uses
3389
get() for a simple load (known as the “use_get”
3390
condition), i.e. Related->Sub(Base), without the need to
3391
redefine the primaryjoin condition in terms of the base
3393
<li>specifying a foreign key with a declarative column, i.e.
3394
ForeignKey(MyRelatedClass.id) doesn’t break the “use_get”
3395
condition from taking place</li>
3396
<li>relation(), eagerload(), and eagerload_all() now feature
3397
an option called “innerjoin”. Specify <cite>True</cite> or <cite>False</cite> to
3398
control whether an eager join is constructed as an INNER
3399
or OUTER join. Default is <cite>False</cite> as always. The mapper
3400
options will override whichever setting is specified on
3401
relation(). Should generally be set for many-to-one, not
3402
nullable foreign key relations to allow improved join
3404
<li>the behavior of eagerloading such that the main query is
3405
wrapped in a subquery when LIMIT/OFFSET are present now
3406
makes an exception for the case when all eager loads are
3407
many-to-one joins. In those cases, the eager joins are
3408
against the parent table directly along with the
3409
limit/offset without the extra overhead of a subquery,
3410
since a many-to-one join does not add rows to the result.</li>
3414
<a class="changeset-link reference internal" href="#change-b0f39f3d2c314fb24db07687b5d6ce5c">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1186">#1186</a>, <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1492">#1492</a>, <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1544">#1544</a></p>
3417
<li><p id="change-0.6beta1-2"><span class="target" id="change-214672957cd89d4ecddac4104c865548"><strong>[orm] </strong></span>Enhancements / Changes on Session.merge():<a class="changeset-link reference internal" href="#change-214672957cd89d4ecddac4104c865548">(link)</a><p></p>
3420
<li><p id="change-0.6beta1-3"><span class="target" id="change-2ec8e6a30ef412d4ca9f79d541de4fd2"><strong>[orm] </strong></span>the “dont_load=True” flag on Session.merge() is deprecated
3421
and is now “load=False”.<a class="changeset-link reference internal" href="#change-2ec8e6a30ef412d4ca9f79d541de4fd2">(link)</a><p></p>
3424
<li><p id="change-0.6beta1-4"><span class="target" id="change-54940eafb98ef2da97a3d986ce185a1a"><strong>[orm] </strong></span>Session.merge() is performance optimized, using half the
3425
call counts for “load=False” mode compared to 0.5 and
3426
significantly fewer SQL queries in the case of collections
3427
for “load=True” mode.<a class="changeset-link reference internal" href="#change-54940eafb98ef2da97a3d986ce185a1a">(link)</a><p></p>
3430
<li><p id="change-0.6beta1-5"><span class="target" id="change-2bed1f32297bbc130f45b4d30b89c291"><strong>[orm] </strong></span>merge() will not issue a needless merge of attributes if the
3431
given instance is the same instance which is already present.<a class="changeset-link reference internal" href="#change-2bed1f32297bbc130f45b4d30b89c291">(link)</a><p></p>
3434
<li><p id="change-0.6beta1-6"><span class="target" id="change-2bbbf3e1665069128942de0c7eef6060"><strong>[orm] </strong></span>merge() now also merges the “options” associated with a given
3435
state, i.e. those passed through query.options() which follow
3436
along with an instance, such as options to eagerly- or
3437
lazyily- load various attributes. This is essential for
3438
the construction of highly integrated caching schemes. This
3439
is a subtle behavioral change vs. 0.5.<a class="changeset-link reference internal" href="#change-2bbbf3e1665069128942de0c7eef6060">(link)</a><p></p>
3442
<li><p id="change-0.6beta1-7"><span class="target" id="change-2a96bff0a75bb240bdfc1fd98a705c7b"><strong>[orm] </strong></span>A bug was fixed regarding the serialization of the “loader
3443
path” present on an instance’s state, which is also necessary
3444
when combining the usage of merge() with serialized state
3445
and associated options that should be preserved.<a class="changeset-link reference internal" href="#change-2a96bff0a75bb240bdfc1fd98a705c7b">(link)</a><p></p>
3448
<li><p id="change-0.6beta1-8"><span class="target" id="change-023079a39b7b68c5ea1d0a6ae57374d8"><strong>[orm] </strong></span>The all new merge() is showcased in a new comprehensive
3449
example of how to integrate Beaker with SQLAlchemy. See
3450
the notes in the “examples” note below.<a class="changeset-link reference internal" href="#change-023079a39b7b68c5ea1d0a6ae57374d8">(link)</a><p></p>
3453
<li><p id="change-0.6beta1-9"><span class="target" id="change-d92b5ce0bd2745798d570f1d7a477427"><strong>[orm] </strong></span>Primary key values can now be changed on a joined-table inheritance
3454
object, and ON UPDATE CASCADE will be taken into account when
3455
the flush happens. Set the new “passive_updates” flag to False
3456
on mapper() when using SQLite or MySQL/MyISAM.<a class="changeset-link reference internal" href="#change-d92b5ce0bd2745798d570f1d7a477427">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1362">#1362</a></p>
3459
<li><p id="change-0.6beta1-10"><span class="target" id="change-acdcc601f3f43f3d50ffd4a7eccab5ee"><strong>[orm] </strong></span>flush() now detects when a primary key column was updated by
3460
an ON UPDATE CASCADE operation from another primary key, and
3461
can then locate the row for a subsequent UPDATE on the new PK
3462
value. This occurs when a relation() is there to establish
3463
the relationship as well as passive_updates=True.<a class="changeset-link reference internal" href="#change-acdcc601f3f43f3d50ffd4a7eccab5ee">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1671">#1671</a></p>
3466
<li><p id="change-0.6beta1-11"><span class="target" id="change-7885463e500d075f4f8777f53615642f"><strong>[orm] </strong></span>the “save-update” cascade will now cascade the pending <em>removed</em>
3467
values from a scalar or collection attribute into the new session
3468
during an add() operation. This so that the flush() operation
3469
will also delete or modify rows of those disconnected items.<a class="changeset-link reference internal" href="#change-7885463e500d075f4f8777f53615642f">(link)</a><p></p>
3472
<li><p id="change-0.6beta1-12"><span class="target" id="change-77148312513d999f0abe3daa49304c4d"><strong>[orm] </strong></span>Using a “dynamic” loader with a “secondary” table now produces
3473
a query where the “secondary” table is <em>not</em> aliased. This
3474
allows the secondary Table object to be used in the “order_by”
3475
attribute of the relation(), and also allows it to be used
3476
in filter criterion against the dynamic relation.<a class="changeset-link reference internal" href="#change-77148312513d999f0abe3daa49304c4d">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1531">#1531</a></p>
3479
<li><p id="change-0.6beta1-13"><span class="target" id="change-5e3ba4eff181a0ee2c6a2fae40497392"><strong>[orm] </strong></span>relation() with uselist=False will emit a warning when
3480
an eager or lazy load locates more than one valid value for
3481
the row. This may be due to primaryjoin/secondaryjoin
3482
conditions which aren’t appropriate for an eager LEFT OUTER
3483
JOIN or for other conditions.<a class="changeset-link reference internal" href="#change-5e3ba4eff181a0ee2c6a2fae40497392">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1643">#1643</a></p>
3486
<li><p id="change-0.6beta1-14"><span class="target" id="change-928ff4154d8bca4127164af262f91d97"><strong>[orm] </strong></span>an explicit check occurs when a synonym() is used with
3487
map_column=True, when a ColumnProperty (deferred or otherwise)
3488
exists separately in the properties dictionary sent to mapper
3489
with the same keyname. Instead of silently replacing
3490
the existing property (and possible options on that property),
3491
an error is raised.<a class="changeset-link reference internal" href="#change-928ff4154d8bca4127164af262f91d97">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1633">#1633</a></p>
3494
<li><p id="change-0.6beta1-15"><span class="target" id="change-07718a8de32eb50efa4fbd07e5184cb6"><strong>[orm] </strong></span>a “dynamic” loader sets up its query criterion at construction
3495
time so that the actual query is returned from non-cloning
3496
accessors like “statement”.<a class="changeset-link reference internal" href="#change-07718a8de32eb50efa4fbd07e5184cb6">(link)</a><p></p>
3499
<li><p id="change-0.6beta1-16"><span class="target" id="change-9dd1e1039ec6832335cf05098fdffa0c"><strong>[orm] </strong></span>the “named tuple” objects returned when iterating a
3500
Query() are now pickleable.<a class="changeset-link reference internal" href="#change-9dd1e1039ec6832335cf05098fdffa0c">(link)</a><p></p>
3503
<li><p id="change-0.6beta1-17"><span class="target" id="change-06b035d8abba0f380e9761dbd450e938"><strong>[orm] </strong></span>mapping to a select() construct now requires that you
3504
make an alias() out of it distinctly. This to eliminate
3505
confusion over such issues as<a class="changeset-link reference internal" href="#change-06b035d8abba0f380e9761dbd450e938">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1542">#1542</a></p>
3508
<li><p id="change-0.6beta1-18"><span class="target" id="change-2f33bb379421251fd948d3fc38923eb1"><strong>[orm] </strong></span>query.join() has been reworked to provide more consistent
3509
behavior and more flexibility (includes)<a class="changeset-link reference internal" href="#change-2f33bb379421251fd948d3fc38923eb1">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1537">#1537</a></p>
3512
<li><p id="change-0.6beta1-19"><span class="target" id="change-6f2e3f51e6cb88f3cc790e88cde5f7c3"><strong>[orm] </strong></span>query.select_from() accepts multiple clauses to produce
3513
multiple comma separated entries within the FROM clause.
3514
Useful when selecting from multiple-homed join() clauses.<a class="changeset-link reference internal" href="#change-6f2e3f51e6cb88f3cc790e88cde5f7c3">(link)</a><p></p>
3517
<li><p id="change-0.6beta1-20"><span class="target" id="change-0b82102fe6a1de325bd22dc40d50c613"><strong>[orm] </strong></span>query.select_from() also accepts mapped classes, aliased()
3518
constructs, and mappers as arguments. In particular this
3519
helps when querying from multiple joined-table classes to ensure
3520
the full join gets rendered.<a class="changeset-link reference internal" href="#change-0b82102fe6a1de325bd22dc40d50c613">(link)</a><p></p>
3523
<li><p id="change-0.6beta1-21"><span class="target" id="change-3d610c09f7696ca04d48bc82efab5c5b"><strong>[orm] </strong></span>query.get() can be used with a mapping to an outer join
3524
where one or more of the primary key values are None.<a class="changeset-link reference internal" href="#change-3d610c09f7696ca04d48bc82efab5c5b">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1135">#1135</a></p>
3527
<li><p id="change-0.6beta1-22"><span class="target" id="change-0138642ce02e6d403c6713a13a4f9802"><strong>[orm] </strong></span>query.from_self(), query.union(), others which do a
3528
“SELECT * from (SELECT...)” type of nesting will do
3529
a better job translating column expressions within the subquery
3530
to the columns clause of the outer query. This is
3531
potentially backwards incompatible with 0.5, in that this
3532
may break queries with literal expressions that do not have labels
3533
applied (i.e. literal(‘foo’), etc.)<a class="changeset-link reference internal" href="#change-0138642ce02e6d403c6713a13a4f9802">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1568">#1568</a></p>
3536
<li><p id="change-0.6beta1-23"><span class="target" id="change-e03cf72a3995480562eafd69ef7d11f0"><strong>[orm] </strong></span>relation primaryjoin and secondaryjoin now check that they
3537
are column-expressions, not just clause elements. this prohibits
3538
things like FROM expressions being placed there directly.<a class="changeset-link reference internal" href="#change-e03cf72a3995480562eafd69ef7d11f0">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1622">#1622</a></p>
3541
<li><p id="change-0.6beta1-24"><span class="target" id="change-0469e777a8df1fc45afc3ecfd6383189"><strong>[orm] </strong></span><cite>expression.null()</cite> is fully understood the same way
3542
None is when comparing an object/collection-referencing
3543
attribute within query.filter(), filter_by(), etc.<a class="changeset-link reference internal" href="#change-0469e777a8df1fc45afc3ecfd6383189">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1415">#1415</a></p>
3546
<li><p id="change-0.6beta1-25"><span class="target" id="change-9d19cad8b2bcb624aa80df1327549f23"><strong>[orm] </strong></span>added “make_transient()” helper function which transforms a
3547
persistent/ detached instance into a transient one (i.e.
3548
deletes the instance_key and removes from any session.)<a class="changeset-link reference internal" href="#change-9d19cad8b2bcb624aa80df1327549f23">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1052">#1052</a></p>
3551
<li><p id="change-0.6beta1-26"><span class="target" id="change-cd19ca85ff6299764da7a16446668186"><strong>[orm] </strong></span>the allow_null_pks flag on mapper() is deprecated, and
3552
the feature is turned “on” by default. This means that
3553
a row which has a non-null value for any of its primary key
3554
columns will be considered an identity. The need for this
3555
scenario typically only occurs when mapping to an outer join.<a class="changeset-link reference internal" href="#change-cd19ca85ff6299764da7a16446668186">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1339">#1339</a></p>
3558
<li><p id="change-0.6beta1-27"><span class="target" id="change-889fc60ec4cd97646ec09e69b067e826"><strong>[orm] </strong></span>the mechanics of “backref” have been fully merged into the
3559
finer grained “back_populates” system, and take place entirely
3560
within the _generate_backref() method of RelationProperty. This
3561
makes the initialization procedure of RelationProperty
3562
simpler and allows easier propagation of settings (such as from
3563
subclasses of RelationProperty) into the reverse reference.
3564
The internal BackRef() is gone and backref() returns a plain
3565
tuple that is understood by RelationProperty.<a class="changeset-link reference internal" href="#change-889fc60ec4cd97646ec09e69b067e826">(link)</a><p></p>
3568
<li><p id="change-0.6beta1-28"><span class="target" id="change-99cae53917a87e88ac70a5d5a153cdf9"><strong>[orm] </strong></span>The version_id_col feature on mapper() will raise a warning when
3569
used with dialects that don’t support “rowcount” adequately.<a class="changeset-link reference internal" href="#change-99cae53917a87e88ac70a5d5a153cdf9">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1569">#1569</a></p>
3572
<li><p id="change-0.6beta1-29"><span class="target" id="change-d516d907637bb775eebd34e7ee58ed13"><strong>[orm] </strong></span>added “execution_options()” to Query, to so options can be
3573
passed to the resulting statement. Currently only
3574
Select-statements have these options, and the only option
3575
used is “stream_results”, and the only dialect which knows
3576
“stream_results” is psycopg2.<a class="changeset-link reference internal" href="#change-d516d907637bb775eebd34e7ee58ed13">(link)</a><p></p>
3579
<li><p id="change-0.6beta1-30"><span class="target" id="change-573842e45f126bdd2938caf4c37f003e"><strong>[orm] </strong></span>Query.yield_per() will set the “stream_results” statement
3580
option automatically.<a class="changeset-link reference internal" href="#change-573842e45f126bdd2938caf4c37f003e">(link)</a><p></p>
3583
<li><p id="change-0.6beta1-31"><span class="target" id="change-d843edca2b75b293e8e6826030ff0227"><strong>[orm] </strong></span><dl class="docutils">
3584
<dt>Deprecated or removed:</dt>
3585
<dd><ul class="first last">
3586
<li>‘allow_null_pks’ flag on mapper() is deprecated. It does
3587
nothing now and the setting is “on” in all cases.</li>
3588
<li>‘transactional’ flag on sessionmaker() and others is
3589
removed. Use ‘autocommit=True’ to indicate ‘transactional=False’.</li>
3590
<li>‘polymorphic_fetch’ argument on mapper() is removed.
3591
Loading can be controlled using the ‘with_polymorphic’
3593
<li>‘select_table’ argument on mapper() is removed. Use
3594
‘with_polymorphic=(“*”, <some selectable>)’ for this
3596
<li>‘proxy’ argument on synonym() is removed. This flag
3597
did nothing throughout 0.5, as the “proxy generation”
3598
behavior is now automatic.</li>
3599
<li>Passing a single list of elements to eagerload(),
3600
eagerload_all(), contains_eager(), lazyload(),
3601
defer(), and undefer() instead of multiple positional
3602
<a href="#id5"><span class="problematic" id="id6">*</span></a>args is deprecated.</li>
3603
<li>Passing a single list of elements to query.order_by(),
3604
query.group_by(), query.join(), or query.outerjoin()
3605
instead of multiple positional <a href="#id7"><span class="problematic" id="id8">*</span></a>args is deprecated.</li>
3606
<li>query.iterate_instances() is removed. Use query.instances().</li>
3607
<li>Query.query_from_parent() is removed. Use the
3608
sqlalchemy.orm.with_parent() function to produce a
3609
“parent” clause, or alternatively query.with_parent().</li>
3610
<li>query._from_self() is removed, use query.from_self()
3612
<li>the “comparator” argument to composite() is removed.
3613
Use “comparator_factory”.</li>
3614
<li>RelationProperty._get_join() is removed.</li>
3615
<li>the ‘echo_uow’ flag on Session is removed. Use
3616
logging on the “sqlalchemy.orm.unitofwork” name.</li>
3617
<li>session.clear() is removed. use session.expunge_all().</li>
3618
<li>session.save(), session.update(), session.save_or_update()
3619
are removed. Use session.add() and session.add_all().</li>
3620
<li>the “objects” flag on session.flush() remains deprecated.</li>
3621
<li>the “dont_load=True” flag on session.merge() is deprecated
3622
in favor of “load=False”.</li>
3623
<li>ScopedSession.mapper remains deprecated. See the
3625
<a class="reference external" href="http://www.sqlalchemy.org/trac/wiki/UsageRecipes/SessionAwareMapper">http://www.sqlalchemy.org/trac/wiki/UsageRecipes/SessionAwareMapper</a></li>
3626
<li>passing an InstanceState (internal SQLAlchemy state object) to
3627
attributes.init_collection() or attributes.get_history() is
3628
deprecated. These functions are public API and normally
3629
expect a regular mapped object instance.</li>
3630
<li>the ‘engine’ parameter to declarative_base() is removed.
3631
Use the ‘bind’ keyword argument.</li>
3635
<a class="changeset-link reference internal" href="#change-d843edca2b75b293e8e6826030ff0227">(link)</a><p></p>
3640
<div class="section" id="change-0.6beta1-sql">
3641
<h3>sql<a class="headerlink" href="#change-0.6beta1-sql" title="Permalink to this headline">¶</a></h3>
3643
<li><p id="change-0.6beta1-32"><span class="target" id="change-fb7c367607c59c771a13ad200c90eff3"><strong>[sql] </strong></span>the “autocommit” flag on select() and text() as well
3644
as select().autocommit() are deprecated - now call
3645
.execution_options(autocommit=True) on either of those
3646
constructs, also available directly on Connection and orm.Query.<a class="changeset-link reference internal" href="#change-fb7c367607c59c771a13ad200c90eff3">(link)</a><p></p>
3649
<li><p id="change-0.6beta1-33"><span class="target" id="change-02d9b147f287fd9766176ef94cdc13cc"><strong>[sql] </strong></span>the autoincrement flag on column now indicates the column
3650
which should be linked to cursor.lastrowid, if that method
3651
is used. See the API docs for details.<a class="changeset-link reference internal" href="#change-02d9b147f287fd9766176ef94cdc13cc">(link)</a><p></p>
3654
<li><p id="change-0.6beta1-34"><span class="target" id="change-44921036aa99c1e3663922170c206e27"><strong>[sql] </strong></span>an executemany() now requires that all bound parameter
3655
sets require that all keys are present which are
3656
present in the first bound parameter set. The structure
3657
and behavior of an insert/update statement is very much
3658
determined by the first parameter set, including which
3659
defaults are going to fire off, and a minimum of
3660
guesswork is performed with all the rest so that performance
3661
is not impacted. For this reason defaults would otherwise
3662
silently “fail” for missing parameters, so this is now guarded
3663
against.<a class="changeset-link reference internal" href="#change-44921036aa99c1e3663922170c206e27">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1566">#1566</a></p>
3666
<li><p id="change-0.6beta1-35"><span class="target" id="change-e095b275cd65347bb96a118ac93a37c4"><strong>[sql] </strong></span>returning() support is native to insert(), update(),
3667
delete(). Implementations of varying levels of
3668
functionality exist for Postgresql, Firebird, MSSQL and
3669
Oracle. returning() can be called explicitly with column
3670
expressions which are then returned in the resultset,
3671
usually via fetchone() or first().<p>insert() constructs will also use RETURNING implicitly to
3672
get newly generated primary key values, if the database
3673
version in use supports it (a version number check is
3674
performed). This occurs if no end-user returning() was
3676
<a class="changeset-link reference internal" href="#change-e095b275cd65347bb96a118ac93a37c4">(link)</a><p></p>
3679
<li><p id="change-0.6beta1-36"><span class="target" id="change-8bc93521d51aa26c8f23a0d45da1f78f"><strong>[sql] </strong></span>union(), intersect(), except() and other “compound” types
3680
of statements have more consistent behavior w.r.t.
3681
parenthesizing. Each compound element embedded within
3682
another will now be grouped with parenthesis - previously,
3683
the first compound element in the list would not be grouped,
3684
as SQLite doesn’t like a statement to start with
3685
parenthesis. However, Postgresql in particular has
3686
precedence rules regarding INTERSECT, and it is
3687
more consistent for parenthesis to be applied equally
3688
to all sub-elements. So now, the workaround for SQLite
3689
is also what the workaround for PG was previously -
3690
when nesting compound elements, the first one usually needs
3691
”.alias().select()” called on it to wrap it inside
3692
of a subquery.<a class="changeset-link reference internal" href="#change-8bc93521d51aa26c8f23a0d45da1f78f">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1665">#1665</a></p>
3695
<li><p id="change-0.6beta1-37"><span class="target" id="change-ddbccf30154057e0b830866c4813ff38"><strong>[sql] </strong></span>insert() and update() constructs can now embed bindparam()
3696
objects using names that match the keys of columns. These
3697
bind parameters will circumvent the usual route to those
3698
keys showing up in the VALUES or SET clause of the generated
3699
SQL.<a class="changeset-link reference internal" href="#change-ddbccf30154057e0b830866c4813ff38">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1579">#1579</a></p>
3702
<li><p id="change-0.6beta1-38"><span class="target" id="change-2234986f2a344f994dd47e033a358adf"><strong>[sql] </strong></span>the Binary type now returns data as a Python string
3703
(or a “bytes” type in Python 3), instead of the built-
3704
in “buffer” type. This allows symmetric round trips
3705
of binary data.<a class="changeset-link reference internal" href="#change-2234986f2a344f994dd47e033a358adf">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1524">#1524</a></p>
3708
<li><p id="change-0.6beta1-39"><span class="target" id="change-d289821e49dd5b365135f2c232b5cf05"><strong>[sql] </strong></span>Added a tuple_() construct, allows sets of expressions
3709
to be compared to another set, typically with IN against
3710
composite primary keys or similar. Also accepts an
3711
IN with multiple columns. The “scalar select can
3712
have only one column” error message is removed - will
3713
rely upon the database to report problems with
3714
col mismatch.<a class="changeset-link reference internal" href="#change-d289821e49dd5b365135f2c232b5cf05">(link)</a><p></p>
3717
<li><p id="change-0.6beta1-40"><span class="target" id="change-d00d40f3ec5206589179af88c62a6276"><strong>[sql] </strong></span>User-defined “default” and “onupdate” callables which
3718
accept a context should now call upon
3719
“context.current_parameters” to get at the dictionary
3720
of bind parameters currently being processed. This
3721
dict is available in the same way regardless of
3722
single-execute or executemany-style statement execution.<a class="changeset-link reference internal" href="#change-d00d40f3ec5206589179af88c62a6276">(link)</a><p></p>
3725
<li><p id="change-0.6beta1-41"><span class="target" id="change-7d51e4139db389357f578e2a93a26383"><strong>[sql] </strong></span>multi-part schema names, i.e. with dots such as
3726
“dbo.master”, are now rendered in select() labels
3727
with underscores for dots, i.e. “dbo_master_table_column”.
3728
This is a “friendly” label that behaves better
3729
in result sets.<a class="changeset-link reference internal" href="#change-7d51e4139db389357f578e2a93a26383">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1428">#1428</a></p>
3732
<li><p id="change-0.6beta1-42"><span class="target" id="change-37c425d83297ecedcb415b054cbfb50d"><strong>[sql] </strong></span>removed needless “counter” behavior with select()
3733
labelnames that match a column name in the table,
3734
i.e. generates “tablename_id” for “id”, instead of
3735
“tablename_id_1” in an attempt to avoid naming
3736
conflicts, when the table has a column actually
3737
named “tablename_id” - this is because
3738
the labeling logic is always applied to all columns
3739
so a naming conflict will never occur.<a class="changeset-link reference internal" href="#change-37c425d83297ecedcb415b054cbfb50d">(link)</a><p></p>
3742
<li><p id="change-0.6beta1-43"><span class="target" id="change-1577657989ab5d5a2f90784ad84ebc9c"><strong>[sql] </strong></span>calling expr.in_([]), i.e. with an empty list, emits a warning
3743
before issuing the usual “expr != expr” clause. The
3744
“expr != expr” can be very expensive, and it’s preferred
3745
that the user not issue in_() if the list is empty,
3746
instead simply not querying, or modifying the criterion<blockquote>
3747
<div>as appropriate for more complex situations.</div></blockquote>
3748
<a class="changeset-link reference internal" href="#change-1577657989ab5d5a2f90784ad84ebc9c">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1628">#1628</a></p>
3751
<li><p id="change-0.6beta1-44"><span class="target" id="change-68e1263644f8e10f85069545aa29651b"><strong>[sql] </strong></span>Added “execution_options()” to select()/text(), which set the
3752
default options for the Connection. See the note in “engines”.<a class="changeset-link reference internal" href="#change-68e1263644f8e10f85069545aa29651b">(link)</a><p></p>
3755
<li><p id="change-0.6beta1-45"><span class="target" id="change-75e0f1cc822ddf23d6706587c9fff333"><strong>[sql] </strong></span><dl class="docutils">
3756
<dt>Deprecated or removed:</dt>
3757
<dd><ul class="first last">
3758
<li>“scalar” flag on select() is removed, use
3759
select.as_scalar().</li>
3760
<li>“shortname” attribute on bindparam() is removed.</li>
3761
<li>postgres_returning, firebird_returning flags on
3762
insert(), update(), delete() are deprecated, use
3763
the new returning() method.</li>
3764
<li>fold_equivalents flag on join is deprecated (will remain
3765
until is implemented)</li>
3769
<a class="changeset-link reference internal" href="#change-75e0f1cc822ddf23d6706587c9fff333">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1131">#1131</a></p>
3774
<div class="section" id="change-0.6beta1-schema">
3775
<h3>schema<a class="headerlink" href="#change-0.6beta1-schema" title="Permalink to this headline">¶</a></h3>
3777
<li><p id="change-0.6beta1-46"><span class="target" id="change-ff302fdf3eae53485eaf643550894fce"><strong>[schema] </strong></span>the <cite>__contains__()</cite> method of <cite>MetaData</cite> now accepts
3778
strings or <cite>Table</cite> objects as arguments. If given
3779
a <cite>Table</cite>, the argument is converted to <cite>table.key</cite> first,
3780
i.e. “[schemaname.]<tablename>”<a class="changeset-link reference internal" href="#change-ff302fdf3eae53485eaf643550894fce">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1541">#1541</a></p>
3783
<li><p id="change-0.6beta1-47"><span class="target" id="change-a9146fbceff794c8fb5012e08c8f2197"><strong>[schema] </strong></span>deprecated MetaData.connect() and
3784
ThreadLocalMetaData.connect() have been removed - send
3785
the “bind” attribute to bind a metadata.<a class="changeset-link reference internal" href="#change-a9146fbceff794c8fb5012e08c8f2197">(link)</a><p></p>
3788
<li><p id="change-0.6beta1-48"><span class="target" id="change-d414bfe8495de9441bb1bf9a225a8196"><strong>[schema] </strong></span>deprecated metadata.table_iterator() method removed (use
3789
sorted_tables)<a class="changeset-link reference internal" href="#change-d414bfe8495de9441bb1bf9a225a8196">(link)</a><p></p>
3792
<li><p id="change-0.6beta1-49"><span class="target" id="change-bc8dd4045ac44c12d17016986c52e8a4"><strong>[schema] </strong></span>deprecated PassiveDefault - use DefaultClause.<a class="changeset-link reference internal" href="#change-bc8dd4045ac44c12d17016986c52e8a4">(link)</a><p></p>
3795
<li><p id="change-0.6beta1-50"><span class="target" id="change-6438f724479e0e0d1cc699f14e1cd25b"><strong>[schema] </strong></span>the “metadata” argument is removed from DefaultGenerator
3796
and subclasses, but remains locally present on Sequence,
3797
which is a standalone construct in DDL.<a class="changeset-link reference internal" href="#change-6438f724479e0e0d1cc699f14e1cd25b">(link)</a><p></p>
3800
<li><p id="change-0.6beta1-51"><span class="target" id="change-1289d6e528c69ff4828bd5851baaeb61"><strong>[schema] </strong></span>Removed public mutability from Index and Constraint
3801
objects:<blockquote>
3803
<li>ForeignKeyConstraint.append_element()</li>
3804
<li>Index.append_column()</li>
3805
<li>UniqueConstraint.append_column()</li>
3806
<li>PrimaryKeyConstraint.add()</li>
3807
<li>PrimaryKeyConstraint.remove()</li>
3810
<p>These should be constructed declaratively (i.e. in one
3812
<a class="changeset-link reference internal" href="#change-1289d6e528c69ff4828bd5851baaeb61">(link)</a><p></p>
3815
<li><p id="change-0.6beta1-52"><span class="target" id="change-ffb3a65d9b8484533b1fb233f819985e"><strong>[schema] </strong></span>The “start” and “increment” attributes on Sequence now
3816
generate “START WITH” and “INCREMENT BY” by default,
3817
on Oracle and Postgresql. Firebird doesn’t support
3818
these keywords right now.<a class="changeset-link reference internal" href="#change-ffb3a65d9b8484533b1fb233f819985e">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1545">#1545</a></p>
3821
<li><p id="change-0.6beta1-53"><span class="target" id="change-a8942fa6a4323b73e46a368c718b08e8"><strong>[schema] </strong></span>UniqueConstraint, Index, PrimaryKeyConstraint all accept
3822
lists of column names or column objects as arguments.<a class="changeset-link reference internal" href="#change-a8942fa6a4323b73e46a368c718b08e8">(link)</a><p></p>
3825
<li><p id="change-0.6beta1-54"><span class="target" id="change-9888d956fff0bd32aa9a418e14e7df29"><strong>[schema] </strong></span><dl class="docutils">
3826
<dt>Other removed things:</dt>
3827
<dd><ul class="first last">
3828
<li>Table.key (no idea what this was for)</li>
3829
<li>Table.primary_key is not assignable - use
3830
table.append_constraint(PrimaryKeyConstraint(...))</li>
3831
<li>Column.bind (get via column.table.bind)</li>
3832
<li>Column.metadata (get via column.table.metadata)</li>
3833
<li>Column.sequence (use column.default)</li>
3834
<li>ForeignKey(constraint=some_parent) (is now private _constraint)</li>
3838
<a class="changeset-link reference internal" href="#change-9888d956fff0bd32aa9a418e14e7df29">(link)</a><p></p>
3841
<li><p id="change-0.6beta1-55"><span class="target" id="change-45384a58304926e78dbc93a8bc4bdbea"><strong>[schema] </strong></span>The use_alter flag on ForeignKey is now a shortcut option
3842
for operations that can be hand-constructed using the
3843
DDL() event system. A side effect of this refactor is
3844
that ForeignKeyConstraint objects with use_alter=True
3845
will <em>not</em> be emitted on SQLite, which does not support
3846
ALTER for foreign keys.<a class="changeset-link reference internal" href="#change-45384a58304926e78dbc93a8bc4bdbea">(link)</a><p></p>
3849
<li><p id="change-0.6beta1-56"><span class="target" id="change-39be51b87c7530f3281ae5dc05fc5294"><strong>[schema] </strong></span>ForeignKey and ForeignKeyConstraint objects now correctly
3850
copy() all their public keyword arguments.<a class="changeset-link reference internal" href="#change-39be51b87c7530f3281ae5dc05fc5294">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1605">#1605</a></p>
3855
<div class="section" id="change-0.6beta1-postgresql">
3856
<h3>postgresql<a class="headerlink" href="#change-0.6beta1-postgresql" title="Permalink to this headline">¶</a></h3>
3858
<li><p id="change-0.6beta1-57"><span class="target" id="change-8e276ba771e1923acab769effd7fdebf"><strong>[postgresql] </strong></span>New dialects: pg8000, zxjdbc, and pypostgresql
3859
on py3k.<a class="changeset-link reference internal" href="#change-8e276ba771e1923acab769effd7fdebf">(link)</a><p></p>
3862
<li><p id="change-0.6beta1-58"><span class="target" id="change-0ce9ee480a5a66cb9f77e0207f6dfc70"><strong>[postgresql] </strong></span>The “postgres” dialect is now named “postgresql” !
3863
Connection strings look like:<blockquote>
3865
<div>postgresql://scott:tiger@localhost/test
3866
postgresql+pg8000://scott:tiger@localhost/test</div></blockquote>
3867
<p>The “postgres” name remains for backwards compatiblity
3868
in the following ways:</p>
3871
<li>There is a “postgres.py” dummy dialect which
3872
allows old URLs to work, i.e.
3873
postgres://scott:tiger@localhost/test</li>
3874
<li>The “postgres” name can be imported from the old
3875
“databases” module, i.e. “from
3876
sqlalchemy.databases import postgres” as well as
3877
“dialects”, “from sqlalchemy.dialects.postgres
3878
import base as pg”, will send a deprecation
3880
<li>Special expression arguments are now named
3881
“postgresql_returning” and “postgresql_where”, but
3882
the older “postgres_returning” and
3883
“postgres_where” names still work with a
3884
deprecation warning.</li>
3888
<a class="changeset-link reference internal" href="#change-0ce9ee480a5a66cb9f77e0207f6dfc70">(link)</a><p></p>
3891
<li><p id="change-0.6beta1-59"><span class="target" id="change-32e87704d92335d84d218fb1a739484d"><strong>[postgresql] </strong></span>“postgresql_where” now accepts SQL expressions which
3892
can also include literals, which will be quoted as needed.<a class="changeset-link reference internal" href="#change-32e87704d92335d84d218fb1a739484d">(link)</a><p></p>
3895
<li><p id="change-0.6beta1-60"><span class="target" id="change-eb44c66b3b7d732aeac35e9d8ea81bdc"><strong>[postgresql] </strong></span>The psycopg2 dialect now uses psycopg2’s “unicode extension”
3896
on all new connections, which allows all String/Text/etc.
3897
types to skip the need to post-process bytestrings into
3898
unicode (an expensive step due to its volume). Other
3899
dialects which return unicode natively (pg8000, zxjdbc)
3900
also skip unicode post-processing.<a class="changeset-link reference internal" href="#change-eb44c66b3b7d732aeac35e9d8ea81bdc">(link)</a><p></p>
3903
<li><p id="change-0.6beta1-61"><span class="target" id="change-38d3d336ce046ae00fc5d2a0a17fae47"><strong>[postgresql] </strong></span>Added new ENUM type, which exists as a schema-level
3904
construct and extends the generic Enum type. Automatically
3905
associates itself with tables and their parent metadata
3906
to issue the appropriate CREATE TYPE/DROP TYPE
3907
commands as needed, supports unicode labels, supports
3908
reflection.<a class="changeset-link reference internal" href="#change-38d3d336ce046ae00fc5d2a0a17fae47">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1511">#1511</a></p>
3911
<li><p id="change-0.6beta1-62"><span class="target" id="change-0efdc52b41c7cbb4edde516d0cf35ebd"><strong>[postgresql] </strong></span>INTERVAL supports an optional “precision” argument
3912
corresponding to the argument that PG accepts.<a class="changeset-link reference internal" href="#change-0efdc52b41c7cbb4edde516d0cf35ebd">(link)</a><p></p>
3915
<li><p id="change-0.6beta1-63"><span class="target" id="change-ce8ff886d9ea060a749895bb38ba108c"><strong>[postgresql] </strong></span>using new dialect.initialize() feature to set up
3916
version-dependent behavior.<a class="changeset-link reference internal" href="#change-ce8ff886d9ea060a749895bb38ba108c">(link)</a><p></p>
3919
<li><p id="change-0.6beta1-64"><span class="target" id="change-525b22121367b91b5ed308272c08ce24"><strong>[postgresql] </strong></span>somewhat better support for % signs in table/column names;
3920
psycopg2 can’t handle a bind parameter name of
3921
%(foobar)s however and SQLA doesn’t want to add overhead
3922
just to treat that one non-existent use case.<a class="changeset-link reference internal" href="#change-525b22121367b91b5ed308272c08ce24">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1279">#1279</a></p>
3925
<li><p id="change-0.6beta1-65"><span class="target" id="change-4fe9c121af9d9045fdae2cb23d04a9bd"><strong>[postgresql] </strong></span>Inserting NULL into a primary key + foreign key column
3926
will allow the “not null constraint” error to raise,
3927
not an attempt to execute a nonexistent “col_id_seq”
3928
sequence.<a class="changeset-link reference internal" href="#change-4fe9c121af9d9045fdae2cb23d04a9bd">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1516">#1516</a></p>
3931
<li><p id="change-0.6beta1-66"><span class="target" id="change-cf8ec160ec789b23afbd8a5fffd65a67"><strong>[postgresql] </strong></span>autoincrement SELECT statements, i.e. those which
3932
select from a procedure that modifies rows, now work
3933
with server-side cursor mode (the named cursor isn’t
3934
used for such statements.)<a class="changeset-link reference internal" href="#change-cf8ec160ec789b23afbd8a5fffd65a67">(link)</a><p></p>
3937
<li><p id="change-0.6beta1-67"><span class="target" id="change-b98cc90c64cb3bba3ab1bda67c0d1dbd"><strong>[postgresql] </strong></span>postgresql dialect can properly detect pg “devel” version
3938
strings, i.e. “8.5devel”<a class="changeset-link reference internal" href="#change-b98cc90c64cb3bba3ab1bda67c0d1dbd">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1636">#1636</a></p>
3941
<li><p id="change-0.6beta1-68"><span class="target" id="change-df47fe2890dbf80af0c731002686995e"><strong>[postgresql] </strong></span>The psycopg2 now respects the statement option
3942
“stream_results”. This option overrides the connection setting
3943
“server_side_cursors”. If true, server side cursors will be
3944
used for the statement. If false, they will not be used, even
3945
if “server_side_cursors” is true on the
3946
connection.<a class="changeset-link reference internal" href="#change-df47fe2890dbf80af0c731002686995e">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1619">#1619</a></p>
3951
<div class="section" id="change-0.6beta1-mysql">
3952
<h3>mysql<a class="headerlink" href="#change-0.6beta1-mysql" title="Permalink to this headline">¶</a></h3>
3954
<li><p id="change-0.6beta1-69"><span class="target" id="change-7a47739bb4cdfd029d2ad396df7e6bd3"><strong>[mysql] </strong></span>New dialects: oursql, a new native dialect,
3955
MySQL Connector/Python, a native Python port of MySQLdb,
3956
and of course zxjdbc on Jython.<a class="changeset-link reference internal" href="#change-7a47739bb4cdfd029d2ad396df7e6bd3">(link)</a><p></p>
3959
<li><p id="change-0.6beta1-70"><span class="target" id="change-7f170bebdb4d3fbbf03679e858799239"><strong>[mysql] </strong></span>VARCHAR/NVARCHAR will not render without a length, raises
3960
an error before passing to MySQL. Doesn’t impact
3961
CAST since VARCHAR is not allowed in MySQL CAST anyway,
3962
the dialect renders CHAR/NCHAR in those cases.<a class="changeset-link reference internal" href="#change-7f170bebdb4d3fbbf03679e858799239">(link)</a><p></p>
3965
<li><p id="change-0.6beta1-71"><span class="target" id="change-5a1277f6fa3da9da056c0b6ab7278415"><strong>[mysql] </strong></span>all the _detect_XXX() functions now run once underneath
3966
dialect.initialize()<a class="changeset-link reference internal" href="#change-5a1277f6fa3da9da056c0b6ab7278415">(link)</a><p></p>
3969
<li><p id="change-0.6beta1-72"><span class="target" id="change-3392dd5483c5d3b9c1d83017e78bf58e"><strong>[mysql] </strong></span>somewhat better support for % signs in table/column names;
3970
MySQLdb can’t handle % signs in SQL when executemany() is used,
3971
and SQLA doesn’t want to add overhead just to treat that one
3972
non-existent use case.<a class="changeset-link reference internal" href="#change-3392dd5483c5d3b9c1d83017e78bf58e">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1279">#1279</a></p>
3975
<li><p id="change-0.6beta1-73"><span class="target" id="change-5ecc352d1de84aa90c39746ab807efe1"><strong>[mysql] </strong></span>the BINARY and MSBinary types now generate “BINARY” in all
3976
cases. Omitting the “length” parameter will generate
3977
“BINARY” with no length. Use BLOB to generate an unlengthed
3978
binary column.<a class="changeset-link reference internal" href="#change-5ecc352d1de84aa90c39746ab807efe1">(link)</a><p></p>
3981
<li><p id="change-0.6beta1-74"><span class="target" id="change-188cc3f410c74dcfcbee1067d88343f8"><strong>[mysql] </strong></span>the “quoting=’quoted’” argument to MSEnum/ENUM is deprecated.
3982
It’s best to rely upon the automatic quoting.<a class="changeset-link reference internal" href="#change-188cc3f410c74dcfcbee1067d88343f8">(link)</a><p></p>
3985
<li><p id="change-0.6beta1-75"><span class="target" id="change-9857837ab57118c270956f183581049e"><strong>[mysql] </strong></span>ENUM now subclasses the new generic Enum type, and also handles
3986
unicode values implicitly, if the given labelnames are unicode
3987
objects.<a class="changeset-link reference internal" href="#change-9857837ab57118c270956f183581049e">(link)</a><p></p>
3990
<li><p id="change-0.6beta1-76"><span class="target" id="change-3a5af57ac623dd1f8cfef840898452b2"><strong>[mysql] </strong></span>a column of type TIMESTAMP now defaults to NULL if
3991
“nullable=False” is not passed to Column(), and no default
3992
is present. This is now consistent with all other types,
3993
and in the case of TIMESTAMP explictly renders “NULL”
3994
due to MySQL’s “switching” of default nullability
3995
for TIMESTAMP columns.<a class="changeset-link reference internal" href="#change-3a5af57ac623dd1f8cfef840898452b2">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1539">#1539</a></p>
4000
<div class="section" id="change-0.6beta1-sqlite">
4001
<h3>sqlite<a class="headerlink" href="#change-0.6beta1-sqlite" title="Permalink to this headline">¶</a></h3>
4003
<li><p id="change-0.6beta1-77"><span class="target" id="change-cdd833e10180536b712d6cf4e72992c4"><strong>[sqlite] </strong></span>DATE, TIME and DATETIME types can now take optional storage_format
4004
and regexp argument. storage_format can be used to store those types
4005
using a custom string format. regexp allows to use a custom regular
4006
expression to match string values from the database.<a class="changeset-link reference internal" href="#change-cdd833e10180536b712d6cf4e72992c4">(link)</a><p></p>
4009
<li><p id="change-0.6beta1-78"><span class="target" id="change-f1b7d03a6b936597bce7908effb557cc"><strong>[sqlite] </strong></span>Time and DateTime types now use by a default a stricter regular
4010
expression to match strings from the database. Use the regexp
4011
argument if you are using data stored in a legacy format.<a class="changeset-link reference internal" href="#change-f1b7d03a6b936597bce7908effb557cc">(link)</a><p></p>
4014
<li><p id="change-0.6beta1-79"><span class="target" id="change-c35f7a555ea6c9d52e60250e368f50dc"><strong>[sqlite] </strong></span>__legacy_microseconds__ on SQLite Time and DateTime types is not
4015
supported anymore. You should use the storage_format argument
4016
instead.<a class="changeset-link reference internal" href="#change-c35f7a555ea6c9d52e60250e368f50dc">(link)</a><p></p>
4019
<li><p id="change-0.6beta1-80"><span class="target" id="change-7158af5ebe6bfe2924688710bf9d16c4"><strong>[sqlite] </strong></span>Date, Time and DateTime types are now stricter in what they accept as
4020
bind parameters: Date type only accepts date objects (and datetime
4021
ones, because they inherit from date), Time only accepts time
4022
objects, and DateTime only accepts date and datetime objects.<a class="changeset-link reference internal" href="#change-7158af5ebe6bfe2924688710bf9d16c4">(link)</a><p></p>
4025
<li><p id="change-0.6beta1-81"><span class="target" id="change-24b4b7e7be9ca2ec058e2bb450f0cde1"><strong>[sqlite] </strong></span>Table() supports a keyword argument “sqlite_autoincrement”, which
4026
applies the SQLite keyword “AUTOINCREMENT” to the single integer
4027
primary key column when generating DDL. Will prevent generation of
4028
a separate PRIMARY KEY constraint.<a class="changeset-link reference internal" href="#change-24b4b7e7be9ca2ec058e2bb450f0cde1">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1016">#1016</a></p>
4033
<div class="section" id="change-0.6beta1-mssql">
4034
<h3>mssql<a class="headerlink" href="#change-0.6beta1-mssql" title="Permalink to this headline">¶</a></h3>
4036
<li><p id="change-0.6beta1-82"><span class="target" id="change-57d985c44bc4a8846cafda5cde966ab5"><strong>[mssql] </strong></span>MSSQL + Pyodbc + FreeTDS now works for the most part,
4037
with possible exceptions regarding binary data as well as
4038
unicode schema identifiers.<a class="changeset-link reference internal" href="#change-57d985c44bc4a8846cafda5cde966ab5">(link)</a><p></p>
4041
<li><p id="change-0.6beta1-83"><span class="target" id="change-870c7f02908eaf9dd76a606a56561da7"><strong>[mssql] </strong></span>the “has_window_funcs” flag is removed. LIMIT/OFFSET
4042
usage will use ROW NUMBER as always, and if on an older
4043
version of SQL Server, the operation fails. The behavior
4044
is exactly the same except the error is raised by SQL
4045
server instead of the dialect, and no flag setting is
4046
required to enable it.<a class="changeset-link reference internal" href="#change-870c7f02908eaf9dd76a606a56561da7">(link)</a><p></p>
4049
<li><p id="change-0.6beta1-84"><span class="target" id="change-83e8899feb9e875a26f54ec93b6d891e"><strong>[mssql] </strong></span>the “auto_identity_insert” flag is removed. This feature
4050
always takes effect when an INSERT statement overrides a
4051
column that is known to have a sequence on it. As with
4052
“has_window_funcs”, if the underlying driver doesn’t
4053
support this, then you can’t do this operation in any
4054
case, so there’s no point in having a flag.<a class="changeset-link reference internal" href="#change-83e8899feb9e875a26f54ec93b6d891e">(link)</a><p></p>
4057
<li><p id="change-0.6beta1-85"><span class="target" id="change-ce8ff886d9ea060a749895bb38ba108c"><strong>[mssql] </strong></span>using new dialect.initialize() feature to set up
4058
version-dependent behavior.<a class="changeset-link reference internal" href="#change-ce8ff886d9ea060a749895bb38ba108c">(link)</a><p></p>
4061
<li><p id="change-0.6beta1-86"><span class="target" id="change-23bb79f6af16be836727eca4716407b3"><strong>[mssql] </strong></span>removed references to sequence which is no longer used.
4062
implicit identities in mssql work the same as implicit
4063
sequences on any other dialects. Explicit sequences are
4064
enabled through the use of “default=Sequence()”. See
4065
the MSSQL dialect documentation for more information.<a class="changeset-link reference internal" href="#change-23bb79f6af16be836727eca4716407b3">(link)</a><p></p>
4070
<div class="section" id="change-0.6beta1-oracle">
4071
<h3>oracle<a class="headerlink" href="#change-0.6beta1-oracle" title="Permalink to this headline">¶</a></h3>
4073
<li><p id="change-0.6beta1-87"><span class="target" id="change-113b8b0993a9fa2dc0b7edd4704fbb42"><strong>[oracle] </strong></span>unit tests pass 100% with cx_oracle !<a class="changeset-link reference internal" href="#change-113b8b0993a9fa2dc0b7edd4704fbb42">(link)</a><p></p>
4076
<li><p id="change-0.6beta1-88"><span class="target" id="change-ab3ce587a20ea73535ae07213b287bd2"><strong>[oracle] </strong></span>support for cx_Oracle’s “native unicode” mode which does
4077
not require NLS_LANG to be set. Use the latest 5.0.2 or
4078
later of cx_oracle.<a class="changeset-link reference internal" href="#change-ab3ce587a20ea73535ae07213b287bd2">(link)</a><p></p>
4081
<li><p id="change-0.6beta1-89"><span class="target" id="change-b2948a9f95dde029f129261698424123"><strong>[oracle] </strong></span>an NCLOB type is added to the base types.<a class="changeset-link reference internal" href="#change-b2948a9f95dde029f129261698424123">(link)</a><p></p>
4084
<li><p id="change-0.6beta1-90"><span class="target" id="change-7ca8af81feacfd6b9f2ce42f5828e1a4"><strong>[oracle] </strong></span>use_ansi=False won’t leak into the FROM/WHERE clause of
4085
a statement that’s selecting from a subquery that also
4086
uses JOIN/OUTERJOIN.<a class="changeset-link reference internal" href="#change-7ca8af81feacfd6b9f2ce42f5828e1a4">(link)</a><p></p>
4089
<li><p id="change-0.6beta1-91"><span class="target" id="change-393f3fb1ddbce4735e553646ae6233f1"><strong>[oracle] </strong></span>added native INTERVAL type to the dialect. This supports
4090
only the DAY TO SECOND interval type so far due to lack
4091
of support in cx_oracle for YEAR TO MONTH.<a class="changeset-link reference internal" href="#change-393f3fb1ddbce4735e553646ae6233f1">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1467">#1467</a></p>
4094
<li><p id="change-0.6beta1-92"><span class="target" id="change-0991def0de5a17cae52ca7d4d7bc71fe"><strong>[oracle] </strong></span>usage of the CHAR type results in cx_oracle’s
4095
FIXED_CHAR dbapi type being bound to statements.<a class="changeset-link reference internal" href="#change-0991def0de5a17cae52ca7d4d7bc71fe">(link)</a><p></p>
4098
<li><p id="change-0.6beta1-93"><span class="target" id="change-17dc85d30f2488fe7b6895a6e18faf2d"><strong>[oracle] </strong></span>the Oracle dialect now features NUMBER which intends
4099
to act justlike Oracle’s NUMBER type. It is the primary
4100
numeric type returned by table reflection and attempts
4101
to return Decimal()/float/int based on the precision/scale
4102
parameters.<a class="changeset-link reference internal" href="#change-17dc85d30f2488fe7b6895a6e18faf2d">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/885">#885</a></p>
4105
<li><p id="change-0.6beta1-94"><span class="target" id="change-96d06864792feffb4a6a52695b5756ef"><strong>[oracle] </strong></span>func.char_length is a generic function for LENGTH<a class="changeset-link reference internal" href="#change-96d06864792feffb4a6a52695b5756ef">(link)</a><p></p>
4108
<li><p id="change-0.6beta1-95"><span class="target" id="change-8736cc2e4e76ced8e037e0353686bc90"><strong>[oracle] </strong></span>ForeignKey() which includes onupdate=<value> will emit a
4109
warning, not emit ON UPDATE CASCADE which is unsupported
4110
by oracle<a class="changeset-link reference internal" href="#change-8736cc2e4e76ced8e037e0353686bc90">(link)</a><p></p>
4113
<li><p id="change-0.6beta1-96"><span class="target" id="change-f427ca1185fb9a016f0a48f421816d0d"><strong>[oracle] </strong></span>the keys() method of RowProxy() now returns the result
4114
column names <em>normalized</em> to be SQLAlchemy case
4115
insensitive names. This means they will be lower case for
4116
case insensitive names, whereas the DBAPI would normally
4117
return them as UPPERCASE names. This allows row keys() to
4118
be compatible with further SQLAlchemy operations.<a class="changeset-link reference internal" href="#change-f427ca1185fb9a016f0a48f421816d0d">(link)</a><p></p>
4121
<li><p id="change-0.6beta1-97"><span class="target" id="change-ce8ff886d9ea060a749895bb38ba108c"><strong>[oracle] </strong></span>using new dialect.initialize() feature to set up
4122
version-dependent behavior.<a class="changeset-link reference internal" href="#change-ce8ff886d9ea060a749895bb38ba108c">(link)</a><p></p>
4125
<li><p id="change-0.6beta1-98"><span class="target" id="change-695adf4c5253eb83c2d4d5bd3288f373"><strong>[oracle] </strong></span>using types.BigInteger with Oracle will generate
4126
NUMBER(19)<a class="changeset-link reference internal" href="#change-695adf4c5253eb83c2d4d5bd3288f373">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1125">#1125</a></p>
4129
<li><p id="change-0.6beta1-99"><span class="target" id="change-10e463fe98ba913938ae4afeb008d31f"><strong>[oracle] </strong></span>“case sensitivity” feature will detect an all-lowercase
4130
case-sensitive column name during reflect and add
4131
“quote=True” to the generated Column, so that proper
4132
quoting is maintained.<a class="changeset-link reference internal" href="#change-10e463fe98ba913938ae4afeb008d31f">(link)</a><p></p>
4137
<div class="section" id="change-0.6beta1-firebird">
4138
<h3>firebird<a class="headerlink" href="#change-0.6beta1-firebird" title="Permalink to this headline">¶</a></h3>
4140
<li><p id="change-0.6beta1-100"><span class="target" id="change-f427ca1185fb9a016f0a48f421816d0d"><strong>[firebird] </strong></span>the keys() method of RowProxy() now returns the result
4141
column names <em>normalized</em> to be SQLAlchemy case
4142
insensitive names. This means they will be lower case for
4143
case insensitive names, whereas the DBAPI would normally
4144
return them as UPPERCASE names. This allows row keys() to
4145
be compatible with further SQLAlchemy operations.<a class="changeset-link reference internal" href="#change-f427ca1185fb9a016f0a48f421816d0d">(link)</a><p></p>
4148
<li><p id="change-0.6beta1-101"><span class="target" id="change-ce8ff886d9ea060a749895bb38ba108c"><strong>[firebird] </strong></span>using new dialect.initialize() feature to set up
4149
version-dependent behavior.<a class="changeset-link reference internal" href="#change-ce8ff886d9ea060a749895bb38ba108c">(link)</a><p></p>
4152
<li><p id="change-0.6beta1-102"><span class="target" id="change-10e463fe98ba913938ae4afeb008d31f"><strong>[firebird] </strong></span>“case sensitivity” feature will detect an all-lowercase
4153
case-sensitive column name during reflect and add
4154
“quote=True” to the generated Column, so that proper
4155
quoting is maintained.<a class="changeset-link reference internal" href="#change-10e463fe98ba913938ae4afeb008d31f">(link)</a><p></p>
4160
<div class="section" id="change-0.6beta1-misc">
4161
<h3>misc<a class="headerlink" href="#change-0.6beta1-misc" title="Permalink to this headline">¶</a></h3>
4163
<li><p id="change-0.6beta1-103"><span class="target" id="change-c9d5768f02fc70a1c4200ea76ae3d312"><strong>[release] [major] </strong></span>For the full set of feature descriptions, see
4164
<a class="reference external" href="http://www.sqlalchemy.org/trac/wiki/06Migration">http://www.sqlalchemy.org/trac/wiki/06Migration</a> .
4165
This document is a work in progress.<a class="changeset-link reference internal" href="#change-c9d5768f02fc70a1c4200ea76ae3d312">(link)</a><p></p>
4168
<li><p id="change-0.6beta1-104"><span class="target" id="change-dca0b8a1f7cb8e1b45d9da364f11087f"><strong>[release] [major] </strong></span>All bug fixes and feature enhancements from the most
4169
recent 0.5 version and below are also included within 0.6.<a class="changeset-link reference internal" href="#change-dca0b8a1f7cb8e1b45d9da364f11087f">(link)</a><p></p>
4172
<li><p id="change-0.6beta1-105"><span class="target" id="change-7001ff18ae62ae8b4d16f9e25afcedbc"><strong>[release] [major] </strong></span>Platforms targeted now include Python 2.4/2.5/2.6, Python
4173
3.1, Jython2.5.<a class="changeset-link reference internal" href="#change-7001ff18ae62ae8b4d16f9e25afcedbc">(link)</a><p></p>
4176
<li><p id="change-0.6beta1-106"><span class="target" id="change-58e8499ff9cfdf3231dcf8c076a480fb"><strong>[engines] </strong></span>transaction isolation level may be specified with
4177
create_engine(... isolation_level=”...”); available on
4178
postgresql and sqlite.<a class="changeset-link reference internal" href="#change-58e8499ff9cfdf3231dcf8c076a480fb">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/443">#443</a></p>
4181
<li><p id="change-0.6beta1-107"><span class="target" id="change-ff2e47b0d631ce1a4cf0a598c8f24df2"><strong>[engines] </strong></span>Connection has execution_options(), generative method
4182
which accepts keywords that affect how the statement
4183
is executed w.r.t. the DBAPI. Currently supports
4184
“stream_results”, causes psycopg2 to use a server
4185
side cursor for that statement, as well as
4186
“autocommit”, which is the new location for the “autocommit”
4187
option from select() and text(). select() and
4188
text() also have .execution_options() as well as
4189
ORM Query().<a class="changeset-link reference internal" href="#change-ff2e47b0d631ce1a4cf0a598c8f24df2">(link)</a><p></p>
4192
<li><p id="change-0.6beta1-108"><span class="target" id="change-e139a9a5cd97f4d218b570024523f623"><strong>[engines] </strong></span>fixed the import for entrypoint-driven dialects to
4193
not rely upon silly tb_info trick to determine import
4194
error status.<a class="changeset-link reference internal" href="#change-e139a9a5cd97f4d218b570024523f623">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1630">#1630</a></p>
4197
<li><p id="change-0.6beta1-109"><span class="target" id="change-90c8f734ee1abef927dbda0035beb0a0"><strong>[engines] </strong></span>added first() method to ResultProxy, returns first row and
4198
closes result set immediately.<a class="changeset-link reference internal" href="#change-90c8f734ee1abef927dbda0035beb0a0">(link)</a><p></p>
4201
<li><p id="change-0.6beta1-110"><span class="target" id="change-9dbc573a39f6fcf29d1f3dd9858ce826"><strong>[engines] </strong></span>RowProxy objects are now pickleable, i.e. the object returned
4202
by result.fetchone(), result.fetchall() etc.<a class="changeset-link reference internal" href="#change-9dbc573a39f6fcf29d1f3dd9858ce826">(link)</a><p></p>
4205
<li><p id="change-0.6beta1-111"><span class="target" id="change-558e9b15b66e5afa84cb889e23f27300"><strong>[engines] </strong></span>RowProxy no longer has a close() method, as the row no longer
4206
maintains a reference to the parent. Call close() on
4207
the parent ResultProxy instead, or use autoclose.<a class="changeset-link reference internal" href="#change-558e9b15b66e5afa84cb889e23f27300">(link)</a><p></p>
4210
<li><p id="change-0.6beta1-112"><span class="target" id="change-ec1f0e67ce08a7a3f706dce2d3fbfae6"><strong>[engines] </strong></span>ResultProxy internals have been overhauled to greatly reduce
4211
method call counts when fetching columns. Can provide a large
4212
speed improvement (up to more than 100%) when fetching large
4213
result sets. The improvement is larger when fetching columns
4214
that have no type-level processing applied and when using
4215
results as tuples (instead of as dictionaries). Many
4216
thanks to Elixir’s Gaëtan de Menten for this dramatic
4217
improvement !<a class="changeset-link reference internal" href="#change-ec1f0e67ce08a7a3f706dce2d3fbfae6">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1586">#1586</a></p>
4220
<li><p id="change-0.6beta1-113"><span class="target" id="change-647fd2ee66339752a6882b790cad9b87"><strong>[engines] </strong></span>Databases which rely upon postfetch of “last inserted id”
4221
to get at a generated sequence value (i.e. MySQL, MS-SQL)
4222
now work correctly when there is a composite primary key
4223
where the “autoincrement” column is not the first primary
4224
key column in the table.<a class="changeset-link reference internal" href="#change-647fd2ee66339752a6882b790cad9b87">(link)</a><p></p>
4227
<li><p id="change-0.6beta1-114"><span class="target" id="change-ab905cc7be5146eb11d1c1de8bd07df9"><strong>[engines] </strong></span>the last_inserted_ids() method has been renamed to the
4228
descriptor “inserted_primary_key”.<a class="changeset-link reference internal" href="#change-ab905cc7be5146eb11d1c1de8bd07df9">(link)</a><p></p>
4231
<li><p id="change-0.6beta1-115"><span class="target" id="change-2687369260aafbe26535c7f07241f7df"><strong>[engines] </strong></span>setting echo=False on create_engine() now sets the loglevel
4232
to WARN instead of NOTSET. This so that logging can be
4233
disabled for a particular engine even if logging
4234
for “sqlalchemy.engine” is enabled overall. Note that the
4235
default setting of “echo” is <cite>None</cite>.<a class="changeset-link reference internal" href="#change-2687369260aafbe26535c7f07241f7df">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1554">#1554</a></p>
4238
<li><p id="change-0.6beta1-116"><span class="target" id="change-17f0cb7bf2b9ebfb365311e17d0bd7f4"><strong>[engines] </strong></span>ConnectionProxy now has wrapper methods for all transaction
4239
lifecycle events, including begin(), rollback(), commit()
4240
begin_nested(), begin_prepared(), prepare(), release_savepoint(),
4241
etc.<a class="changeset-link reference internal" href="#change-17f0cb7bf2b9ebfb365311e17d0bd7f4">(link)</a><p></p>
4244
<li><p id="change-0.6beta1-117"><span class="target" id="change-1fe7fc3f57be368cd7f20fa804fa9056"><strong>[engines] </strong></span>Connection pool logging now uses both INFO and DEBUG
4245
log levels for logging. INFO is for major events such
4246
as invalidated connections, DEBUG for all the acquire/return
4247
logging. <cite>echo_pool</cite> can be False, None, True or “debug”
4248
the same way as <cite>echo</cite> works.<a class="changeset-link reference internal" href="#change-1fe7fc3f57be368cd7f20fa804fa9056">(link)</a><p></p>
4251
<li><p id="change-0.6beta1-118"><span class="target" id="change-76cd53cd2b1cfd0a85a475a50a5f2ea3"><strong>[engines] </strong></span>All pyodbc-dialects now support extra pyodbc-specific
4252
kw arguments ‘ansi’, ‘unicode_results’, ‘autocommit’.<a class="changeset-link reference internal" href="#change-76cd53cd2b1cfd0a85a475a50a5f2ea3">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1621">#1621</a></p>
4255
<li><p id="change-0.6beta1-119"><span class="target" id="change-9b7a4ecd72a4dc2579674f3e678873ff"><strong>[engines] </strong></span>the “threadlocal” engine has been rewritten and simplified
4256
and now supports SAVEPOINT operations.<a class="changeset-link reference internal" href="#change-9b7a4ecd72a4dc2579674f3e678873ff">(link)</a><p></p>
4259
<li><p id="change-0.6beta1-120"><span class="target" id="change-1adc08ecf95db03925768081293804a4"><strong>[engines] </strong></span><dl class="docutils">
4260
<dt>deprecated or removed</dt>
4261
<dd><ul class="first last">
4262
<li>result.last_inserted_ids() is deprecated. Use
4263
result.inserted_primary_key</li>
4264
<li>dialect.get_default_schema_name(connection) is now
4265
public via dialect.default_schema_name.</li>
4266
<li>the “connection” argument from engine.transaction() and
4267
engine.run_callable() is removed - Connection itself
4268
now has those methods. All four methods accept
4269
<a href="#id9"><span class="problematic" id="id10">*</span></a>args and <a href="#id11"><span class="problematic" id="id12">**</span></a>kwargs which are passed to the given callable,
4270
as well as the operating connection.</li>
4274
<a class="changeset-link reference internal" href="#change-1adc08ecf95db03925768081293804a4">(link)</a><p></p>
4277
<li><p id="change-0.6beta1-121"><span class="target" id="change-fe9d3b373816dc2ba59fe43fa591d219"><strong>[reflection/inspection] </strong></span>Table reflection has been expanded and generalized into
4278
a new API called “sqlalchemy.engine.reflection.Inspector”.
4279
The Inspector object provides fine-grained information about
4280
a wide variety of schema information, with room for expansion,
4281
including table names, column names, view definitions, sequences,
4282
indexes, etc.<a class="changeset-link reference internal" href="#change-fe9d3b373816dc2ba59fe43fa591d219">(link)</a><p></p>
4285
<li><p id="change-0.6beta1-122"><span class="target" id="change-66a10b68814b0d202a3f73d3abaad4c7"><strong>[reflection/inspection] </strong></span>Views are now reflectable as ordinary Table objects. The same
4286
Table constructor is used, with the caveat that “effective”
4287
primary and foreign key constraints aren’t part of the reflection
4288
results; these have to be specified explicitly if desired.<a class="changeset-link reference internal" href="#change-66a10b68814b0d202a3f73d3abaad4c7">(link)</a><p></p>
4291
<li><p id="change-0.6beta1-123"><span class="target" id="change-7d9c40c47ab45cde78a91ac3f513b242"><strong>[reflection/inspection] </strong></span>The existing autoload=True system now uses Inspector underneath
4292
so that each dialect need only return “raw” data about tables
4293
and other objects - Inspector is the single place that information
4294
is compiled into Table objects so that consistency is at a maximum.<a class="changeset-link reference internal" href="#change-7d9c40c47ab45cde78a91ac3f513b242">(link)</a><p></p>
4297
<li><p id="change-0.6beta1-124"><span class="target" id="change-a6a9a63e0053aafa663dea40ade905f0"><strong>[ddl] </strong></span>the DDL system has been greatly expanded. the DDL() class
4298
now extends the more generic DDLElement(), which forms the basis
4299
of many new constructs:<blockquote>
4302
<li>CreateTable()</li>
4303
<li>DropTable()</li>
4304
<li>AddConstraint()</li>
4305
<li>DropConstraint()</li>
4306
<li>CreateIndex()</li>
4307
<li>DropIndex()</li>
4308
<li>CreateSequence()</li>
4309
<li>DropSequence()</li>
4312
<p>These support “on” and “execute-at()” just like plain DDL()
4313
does. User-defined DDLElement subclasses can be created and
4314
linked to a compiler using the sqlalchemy.ext.compiler extension.</p>
4316
<a class="changeset-link reference internal" href="#change-a6a9a63e0053aafa663dea40ade905f0">(link)</a><p></p>
4319
<li><p id="change-0.6beta1-125"><span class="target" id="change-63a49f0fdf1563dacaaa9a23d4c73d3a"><strong>[ddl] </strong></span>The signature of the “on” callable passed to DDL() and
4320
DDLElement() is revised as follows:<blockquote>
4321
<div>“ddl” - the DDLElement object itself.
4322
“event” - the string event name.
4323
“target” - previously “schema_item”, the Table or
4324
MetaData object triggering the event.
4325
“connection” - the Connection object in use for the operation.
4326
<a href="#id13"><span class="problematic" id="id14">**</span></a>kw - keyword arguments. In the case of MetaData before/after<blockquote>
4327
<div>create/drop, the list of Table objects for which
4328
CREATE/DROP DDL is to be issued is passed as the kw
4329
argument “tables”. This is necessary for metadata-level
4330
DDL that is dependent on the presence of specific tables.</div></blockquote>
4333
<li>the “schema_item” attribute of DDL has been renamed to
4334
“target”.</li>
4336
<a class="changeset-link reference internal" href="#change-63a49f0fdf1563dacaaa9a23d4c73d3a">(link)</a><p></p>
4339
<li><p id="change-0.6beta1-126"><span class="target" id="change-309ea6a05094c41ff3447b7aeb64cd22"><strong>[dialect] [refactor] </strong></span>Dialect modules are now broken into database dialects
4340
plus DBAPI implementations. Connect URLs are now
4341
preferred to be specified using dialect+driver://...,
4342
i.e. “mysql+mysqldb://scott:tiger@localhost/test”. See
4343
the 0.6 documentation for examples.<a class="changeset-link reference internal" href="#change-309ea6a05094c41ff3447b7aeb64cd22">(link)</a><p></p>
4346
<li><p id="change-0.6beta1-127"><span class="target" id="change-c50c8d68a80a22e1cace4b16d0b405e1"><strong>[dialect] [refactor] </strong></span>the setuptools entrypoint for external dialects is now
4347
called “sqlalchemy.dialects”.<a class="changeset-link reference internal" href="#change-c50c8d68a80a22e1cace4b16d0b405e1">(link)</a><p></p>
4350
<li><p id="change-0.6beta1-128"><span class="target" id="change-4dda1aa78046eb29914b005241fb0eb6"><strong>[dialect] [refactor] </strong></span>the “owner” keyword argument is removed from Table. Use
4351
“schema” to represent any namespaces to be prepended to
4352
the table name.<a class="changeset-link reference internal" href="#change-4dda1aa78046eb29914b005241fb0eb6">(link)</a><p></p>
4355
<li><p id="change-0.6beta1-129"><span class="target" id="change-20dfe96a61f245f370f47bd3d9e28791"><strong>[dialect] [refactor] </strong></span>server_version_info becomes a static attribute.<a class="changeset-link reference internal" href="#change-20dfe96a61f245f370f47bd3d9e28791">(link)</a><p></p>
4358
<li><p id="change-0.6beta1-130"><span class="target" id="change-d886ab16ae25f489620c28fd52a6a00a"><strong>[dialect] [refactor] </strong></span>dialects receive an initialize() event on initial
4359
connection to determine connection properties.<a class="changeset-link reference internal" href="#change-d886ab16ae25f489620c28fd52a6a00a">(link)</a><p></p>
4362
<li><p id="change-0.6beta1-131"><span class="target" id="change-4861423f4ff36544dc83545d48d8523d"><strong>[dialect] [refactor] </strong></span>dialects receive a visit_pool event have an opportunity
4363
to establish pool listeners.<a class="changeset-link reference internal" href="#change-4861423f4ff36544dc83545d48d8523d">(link)</a><p></p>
4366
<li><p id="change-0.6beta1-132"><span class="target" id="change-77a8bc1484dc353cc24fd4772244f757"><strong>[dialect] [refactor] </strong></span>cached TypeEngine classes are cached per-dialect class
4367
instead of per-dialect.<a class="changeset-link reference internal" href="#change-77a8bc1484dc353cc24fd4772244f757">(link)</a><p></p>
4370
<li><p id="change-0.6beta1-133"><span class="target" id="change-4ad2b7d81680c7f34705e3613b7e36fb"><strong>[dialect] [refactor] </strong></span>new UserDefinedType should be used as a base class for
4371
new types, which preserves the 0.5 behavior of
4372
get_col_spec().<a class="changeset-link reference internal" href="#change-4ad2b7d81680c7f34705e3613b7e36fb">(link)</a><p></p>
4375
<li><p id="change-0.6beta1-134"><span class="target" id="change-461c903cb377ff8681ec08be16613ab4"><strong>[dialect] [refactor] </strong></span>The result_processor() method of all type classes now
4376
accepts a second argument “coltype”, which is the DBAPI
4377
type argument from cursor.description. This argument
4378
can help some types decide on the most efficient processing
4379
of result values.<a class="changeset-link reference internal" href="#change-461c903cb377ff8681ec08be16613ab4">(link)</a><p></p>
4382
<li><p id="change-0.6beta1-135"><span class="target" id="change-99c23fa8c33e3f526d98bf39d26e3f0f"><strong>[dialect] [refactor] </strong></span>Deprecated Dialect.get_params() removed.<a class="changeset-link reference internal" href="#change-99c23fa8c33e3f526d98bf39d26e3f0f">(link)</a><p></p>
4385
<li><p id="change-0.6beta1-136"><span class="target" id="change-6ada9c457b2d323fc3c2bd369bf4e07b"><strong>[dialect] [refactor] </strong></span>Dialect.get_rowcount() has been renamed to a descriptor
4386
“rowcount”, and calls cursor.rowcount directly. Dialects
4387
which need to hardwire a rowcount in for certain calls
4388
should override the method to provide different behavior.<a class="changeset-link reference internal" href="#change-6ada9c457b2d323fc3c2bd369bf4e07b">(link)</a><p></p>
4391
<li><p id="change-0.6beta1-137"><span class="target" id="change-c02c74322d7c1ece9af8ad1704c033e1"><strong>[dialect] [refactor] </strong></span>DefaultRunner and subclasses have been removed. The job
4392
of this object has been simplified and moved into
4393
ExecutionContext. Dialects which support sequences should
4394
add a <cite>fire_sequence()</cite> method to their execution context
4395
implementation.<a class="changeset-link reference internal" href="#change-c02c74322d7c1ece9af8ad1704c033e1">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1566">#1566</a></p>
4398
<li><p id="change-0.6beta1-138"><span class="target" id="change-e3eaf58468be38fd781277edac3a7140"><strong>[dialect] [refactor] </strong></span>Functions and operators generated by the compiler now use
4399
(almost) regular dispatch functions of the form
4400
“visit_<opname>” and “visit_<funcname>_fn” to provide
4401
customed processing. This replaces the need to copy the
4402
“functions” and “operators” dictionaries in compiler
4403
subclasses with straightforward visitor methods, and also
4404
allows compiler subclasses complete control over
4405
rendering, as the full _Function or _BinaryExpression
4406
object is passed in.<a class="changeset-link reference internal" href="#change-e3eaf58468be38fd781277edac3a7140">(link)</a><p></p>
4409
<li><p id="change-0.6beta1-139"><span class="target" id="change-3bbeb8422b9fa129668159a5fbbccd13"><strong>[types] </strong></span>The construction of types within dialects has been totally
4410
overhauled. Dialects now define publically available types
4411
as UPPERCASE names exclusively, and internal implementation
4412
types using underscore identifiers (i.e. are private).
4413
The system by which types are expressed in SQL and DDL
4414
has been moved to the compiler system. This has the
4415
effect that there are much fewer type objects within
4416
most dialects. A detailed document on this architecture
4417
for dialect authors is in
4418
lib/sqlalchemy/dialects/type_migration_guidelines.txt .<a class="changeset-link reference internal" href="#change-3bbeb8422b9fa129668159a5fbbccd13">(link)</a><p></p>
4421
<li><p id="change-0.6beta1-140"><span class="target" id="change-a1738683c3d87b598a5a039c7faed0e0"><strong>[types] </strong></span>Types no longer make any guesses as to default
4422
parameters. In particular, Numeric, Float, NUMERIC,
4423
FLOAT, DECIMAL don’t generate any length or scale unless
4424
specified.<a class="changeset-link reference internal" href="#change-a1738683c3d87b598a5a039c7faed0e0">(link)</a><p></p>
4427
<li><p id="change-0.6beta1-141"><span class="target" id="change-0e50f446360f471e031c78a9fef201a3"><strong>[types] </strong></span>types.Binary is renamed to types.LargeBinary, it only
4428
produces BLOB, BYTEA, or a similar “long binary” type.
4429
New base BINARY and VARBINARY
4430
types have been added to access these MySQL/MS-SQL specific
4431
types in an agnostic way.<a class="changeset-link reference internal" href="#change-0e50f446360f471e031c78a9fef201a3">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1664">#1664</a></p>
4434
<li><p id="change-0.6beta1-142"><span class="target" id="change-236aba55b2dc30a153e666c8d4fc745f"><strong>[types] </strong></span>String/Text/Unicode types now skip the unicode() check
4435
on each result column value if the dialect has
4436
detected the DBAPI as returning Python unicode objects
4437
natively. This check is issued on first connect
4438
using “SELECT CAST ‘some text’ AS VARCHAR(10)” or
4439
equivalent, then checking if the returned object
4440
is a Python unicode. This allows vast performance
4441
increases for native-unicode DBAPIs, including
4442
pysqlite/sqlite3, psycopg2, and pg8000.<a class="changeset-link reference internal" href="#change-236aba55b2dc30a153e666c8d4fc745f">(link)</a><p></p>
4445
<li><p id="change-0.6beta1-143"><span class="target" id="change-48d0f246a76fcd18e2d43a473beab4ba"><strong>[types] </strong></span>Most types result processors have been checked for possible speed
4446
improvements. Specifically, the following generic types have been
4447
optimized, resulting in varying speed improvements:
4448
Unicode, PickleType, Interval, TypeDecorator, Binary.
4449
Also the following dbapi-specific implementations have been improved:
4450
Time, Date and DateTime on Sqlite, ARRAY on Postgresql,
4451
Time on MySQL, Numeric(as_decimal=False) on MySQL, oursql and
4452
pypostgresql, DateTime on cx_oracle and LOB-based types on cx_oracle.<a class="changeset-link reference internal" href="#change-48d0f246a76fcd18e2d43a473beab4ba">(link)</a><p></p>
4455
<li><p id="change-0.6beta1-144"><span class="target" id="change-9d4508b066c6e6fd68af58a2488b24a6"><strong>[types] </strong></span>Reflection of types now returns the exact UPPERCASE
4456
type within types.py, or the UPPERCASE type within
4457
the dialect itself if the type is not a standard SQL
4458
type. This means reflection now returns more accurate
4459
information about reflected types.<a class="changeset-link reference internal" href="#change-9d4508b066c6e6fd68af58a2488b24a6">(link)</a><p></p>
4462
<li><p id="change-0.6beta1-145"><span class="target" id="change-7ac9dceee42e42dc8a5c9472df0e1d2a"><strong>[types] </strong></span>Added a new Enum generic type. Enum is a schema-aware object
4463
to support databases which require specific DDL in order to
4464
use enum or equivalent; in the case of PG it handles the
4465
details of <cite>CREATE TYPE</cite>, and on other databases without
4466
native enum support will by generate VARCHAR + an inline CHECK
4467
constraint to enforce the enum.<a class="changeset-link reference internal" href="#change-7ac9dceee42e42dc8a5c9472df0e1d2a">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1511">#1511</a>, <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1109">#1109</a></p>
4470
<li><p id="change-0.6beta1-146"><span class="target" id="change-ab51cd0f5146920fb998f5c5a93cabdd"><strong>[types] </strong></span>The Interval type includes a “native” flag which controls
4471
if native INTERVAL types (postgresql + oracle) are selected
4472
if available, or not. “day_precision” and “second_precision”
4473
arguments are also added which propagate as appropriately
4474
to these native types. Related to.<a class="changeset-link reference internal" href="#change-ab51cd0f5146920fb998f5c5a93cabdd">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1467">#1467</a></p>
4477
<li><p id="change-0.6beta1-147"><span class="target" id="change-26f9fec07b187541c0098597a7197ff8"><strong>[types] </strong></span>The Boolean type, when used on a backend that doesn’t
4478
have native boolean support, will generate a CHECK
4479
constraint “col IN (0, 1)” along with the int/smallint-
4480
based column type. This can be switched off if
4481
desired with create_constraint=False.
4482
Note that MySQL has no native boolean <em>or</em> CHECK constraint
4483
support so this feature isn’t available on that platform.<a class="changeset-link reference internal" href="#change-26f9fec07b187541c0098597a7197ff8">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1589">#1589</a></p>
4486
<li><p id="change-0.6beta1-148"><span class="target" id="change-bbd25c78a1c3340579717367777509bc"><strong>[types] </strong></span>PickleType now uses == for comparison of values when
4487
mutable=True, unless the “comparator” argument with a
4488
comparsion function is specified to the type. Objects
4489
being pickled will be compared based on identity (which
4490
defeats the purpose of mutable=True) if __eq__() is not
4491
overridden or a comparison function is not provided.<a class="changeset-link reference internal" href="#change-bbd25c78a1c3340579717367777509bc">(link)</a><p></p>
4494
<li><p id="change-0.6beta1-149"><span class="target" id="change-23a61cc6adace380c1a9e342d1174c32"><strong>[types] </strong></span>The default “precision” and “scale” arguments of Numeric
4495
and Float have been removed and now default to None.
4496
NUMERIC and FLOAT will be rendered with no numeric
4497
arguments by default unless these values are provided.<a class="changeset-link reference internal" href="#change-23a61cc6adace380c1a9e342d1174c32">(link)</a><p></p>
4500
<li><p id="change-0.6beta1-150"><span class="target" id="change-d18a18e76aea7383243090429523e54c"><strong>[types] </strong></span>AbstractType.get_search_list() is removed - the games
4501
that was used for are no longer necessary.<a class="changeset-link reference internal" href="#change-d18a18e76aea7383243090429523e54c">(link)</a><p></p>
4504
<li><p id="change-0.6beta1-151"><span class="target" id="change-d76a27861917c6bf030a837acf9ce8fe"><strong>[types] </strong></span>Added a generic BigInteger type, compiles to
4505
BIGINT or NUMBER(19).<a class="changeset-link reference internal" href="#change-d76a27861917c6bf030a837acf9ce8fe">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1125">#1125</a></p>
4508
<li><p id="change-0.6beta1-152"><span class="target" id="change-05b2ce683e77d35a420cda187f7222ab"><strong>[types] </strong></span>sqlsoup has been overhauled to explicitly support an 0.5 style
4509
session, using autocommit=False, autoflush=True. Default
4510
behavior of SQLSoup now requires the usual usage of commit()
4511
and rollback(), which have been added to its interface. An
4512
explcit Session or scoped_session can be passed to the
4513
constructor, allowing these arguments to be overridden.<a class="changeset-link reference internal" href="#change-05b2ce683e77d35a420cda187f7222ab">(link)</a><p></p>
4516
<li><p id="change-0.6beta1-153"><span class="target" id="change-55a1682d2cbda5fbf6dd2d58744f5dbe"><strong>[types] </strong></span>sqlsoup db.<sometable>.update() and delete() now call
4517
query(cls).update() and delete(), respectively.<a class="changeset-link reference internal" href="#change-55a1682d2cbda5fbf6dd2d58744f5dbe">(link)</a><p></p>
4520
<li><p id="change-0.6beta1-154"><span class="target" id="change-a22079daeb20e98393c35a74d11c0259"><strong>[types] </strong></span>sqlsoup now has execute() and connection(), which call upon
4521
the Session methods of those names, ensuring that the bind is
4522
in terms of the SqlSoup object’s bind.<a class="changeset-link reference internal" href="#change-a22079daeb20e98393c35a74d11c0259">(link)</a><p></p>
4525
<li><p id="change-0.6beta1-155"><span class="target" id="change-99c1ecd3203ef2d370b542d1b605ca61"><strong>[types] </strong></span>sqlsoup objects no longer have the ‘query’ attribute - it’s
4526
not needed for sqlsoup’s usage paradigm and it gets in the
4527
way of a column that is actually named ‘query’.<a class="changeset-link reference internal" href="#change-99c1ecd3203ef2d370b542d1b605ca61">(link)</a><p></p>
4530
<li><p id="change-0.6beta1-156"><span class="target" id="change-351b0756ad5ba1266508d1dea1de559e"><strong>[types] </strong></span>The signature of the proxy_factory callable passed to
4531
association_proxy is now (lazy_collection, creator,
4532
value_attr, association_proxy), adding a fourth argument
4533
that is the parent AssociationProxy argument. Allows
4534
serializability and subclassing of the built in collections.<a class="changeset-link reference internal" href="#change-351b0756ad5ba1266508d1dea1de559e">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1259">#1259</a></p>
4537
<li><p id="change-0.6beta1-157"><span class="target" id="change-c0b751885f79648b1e07bd4f1d5aa0c8"><strong>[types] </strong></span>association_proxy now has basic comparator methods .any(),
4538
.has(), .contains(), ==, !=, thanks to Scott Torborg.<a class="changeset-link reference internal" href="#change-c0b751885f79648b1e07bd4f1d5aa0c8">(link)</a><p> <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1372">#1372</a></p>
4550
<div id="docs-bottom-navigation" class="docs-navigation-links">
4552
<a href="changelog_07.html" title="previous chapter">0.7 Changelog</a>
4554
<a href="changelog_05.html" title="next chapter">0.5 Changelog</a>
4556
<div id="docs-copyright">
4557
© <a href="../copyright.html">Copyright</a> 2007-2013, the SQLAlchemy authors and contributors.
4558
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.