1
2=============
30.3 Changelog
4=============
5
6
7.. changelog::
8    :version: 0.3.11
9    :released: Sun Oct 14 2007
10
11    .. change::
12        :tags: sql
13        :tickets:
14
15      tweak DISTINCT precedence for clauses like
16      `func.count(t.c.col.distinct())`
17
18    .. change::
19        :tags: sql
20        :tickets: 719
21
22      Fixed detection of internal '$' characters in :bind$params
23
24    .. change::
25        :tags: sql
26        :tickets: 768
27
28      don't assume join criterion consists only of column objects
29
30    .. change::
31        :tags: sql
32        :tickets: 764
33
34      adjusted operator precedence of NOT to match '==' and others, so that
35      ~(x==y) produces NOT (x=y), which is compatible with MySQL < 5.0
36      (doesn't like "NOT x=y")
37
38    .. change::
39        :tags: orm
40        :tickets: 687
41
42      added a check for joining from A->B using join(), along two
43      different m2m tables.  this raises an error in 0.3 but is
44      possible in 0.4 when aliases are used.
45
46    .. change::
47        :tags: orm
48        :tickets:
49
50      fixed small exception throw bug in Session.merge()
51
52    .. change::
53        :tags: orm
54        :tickets:
55
56      fixed bug where mapper, being linked to a join where one table had
57      no PK columns, would not detect that the joined table had no PK.
58
59    .. change::
60        :tags: orm
61        :tickets: 769
62
63      fixed bugs in determining proper sync clauses from custom inherit
64      conditions
65
66    .. change::
67        :tags: orm
68        :tickets: 813
69
70      backref remove object operation doesn't fail if the other-side
71      collection doesn't contain the item, supports noload collections
72
73    .. change::
74        :tags: engine
75        :tickets:
76
77      fixed another occasional race condition which could occur
78      when using pool with threadlocal setting
79
80    .. change::
81        :tags: mysql
82        :tickets:
83
84      fixed specification of YEAR columns when generating schema
85
86    .. change::
87        :tags: mssql
88        :tickets: 679
89
90      added support for TIME columns (simulated using DATETIME)
91
92    .. change::
93        :tags: mssql
94        :tickets: 721
95
96      added support for BIGINT, MONEY, SMALLMONEY, UNIQUEIDENTIFIER and
97      SQL_VARIANT
98
99    .. change::
100        :tags: mssql
101        :tickets: 684
102
103      index names are now quoted when dropping from reflected tables
104
105    .. change::
106        :tags: mssql
107        :tickets:
108
109      can now specify a DSN for PyODBC, using a URI like mssql:///?dsn=bob
110
111    .. change::
112        :tags: postgres
113        :tickets:
114
115      when reflecting tables from alternate schemas, the "default" placed upon
116      the primary key, i.e. usually a sequence name, has the "schema" name
117      unconditionally quoted, so that schema names which need quoting are fine.
118      its slightly unnecessary for schema names which don't need quoting
119      but not harmful.
120
121    .. change::
122        :tags: sqlite
123        :tickets:
124
125      passthrough for stringified dates
126
127    .. change::
128        :tags: firebird
129        :tickets:
130
131      supports_sane_rowcount() set to False due to ticket #370 (right way).
132
133    .. change::
134        :tags: firebird
135        :tickets:
136
137      fixed reflection of Column's nullable property.
138
139    .. change::
140        :tags: oracle
141        :tickets: 622, 751
142
143      removed LONG_STRING, LONG_BINARY from "binary" types, so type objects
144      don't try to read their values as LOB.
145
146.. changelog::
147    :version: 0.3.10
148    :released: Fri Jul 20 2007
149
150    .. change::
151        :tags: general
152        :tickets:
153
154      a new mutex that was added in 0.3.9 causes the pool_timeout
155      feature to fail during a race condition; threads would
156      raise TimeoutError immediately with no delay if many threads
157      push the pool into overflow at the same time.  this issue has been
158      fixed.
159
160    .. change::
161        :tags: sql
162        :tickets:
163
164      got connection-bound metadata to work with implicit execution
165
166    .. change::
167        :tags: sql
168        :tickets: 667
169
170      foreign key specs can have any chararcter in their identifiers
171
172    .. change::
173        :tags: sql
174        :tickets: 664
175
176      added commutativity-awareness to binary clause comparisons to
177      each other, improves ORM lazy load optimization
178
179    .. change::
180        :tags: orm
181        :tickets:
182
183      cleanup to connection-bound sessions, SessionTransaction
184
185    .. change::
186        :tags: postgres
187        :tickets: 571
188
189      fixed max identifier length (63)
190
191.. changelog::
192    :version: 0.3.9
193    :released: Sun Jul 15 2007
194
195    .. change::
196        :tags: general
197        :tickets: 607
198
199      better error message for NoSuchColumnError
200
201    .. change::
202        :tags: general
203        :tickets: 428
204
205      finally figured out how to get setuptools version in, available
206      as sqlalchemy.__version__
207
208    .. change::
209        :tags: general
210        :tickets:
211
212      the various "engine" arguments, such as "engine", "connectable",
213      "engine_or_url", "bind_to", etc. are all present, but deprecated.
214      they all get replaced by the single term "bind".  you also
215      set the "bind" of MetaData using
216      metadata.bind = <engine or connection>
217
218    .. change::
219        :tags: ext
220        :tickets:
221
222      iteration over dict association proxies is now dict-like, not
223      InstrumentedList-like (e.g. over keys instead of values)
224
225    .. change::
226        :tags: ext
227        :tickets: 597
228
229      association proxies no longer bind tightly to source collections, and are constructed with a thunk instead
230
231    .. change::
232        :tags: ext
233        :tickets:
234
235      added selectone_by() to assignmapper
236
237    .. change::
238        :tags: orm
239        :tickets:
240
241      forwards-compatibility with 0.4: added one(), first(), and
242      all() to Query.  almost all Query functionality from 0.4 is
243      present in 0.3.9 for forwards-compat purposes.
244
245    .. change::
246        :tags: orm
247        :tickets:
248
249      reset_joinpoint() really really works this time, promise ! lets
250      you re-join from the root:
251      query.join(['a', 'b']).filter(<crit>).reset_joinpoint().\
252      join(['a', 'c']).filter(<some other crit>).all()
253      in 0.4 all join() calls start from the "root"
254
255    .. change::
256        :tags: orm
257        :tickets: 613
258
259      added synchronization to the mapper() construction step, to avoid
260      thread collisions when pre-existing mappers are compiling in a
261      different thread
262
263    .. change::
264        :tags: orm
265        :tickets:
266
267      a warning is issued by Mapper when two primary key columns of the
268      same name are munged into a single attribute.  this happens frequently
269      when mapping to joins (or inheritance).
270
271    .. change::
272        :tags: orm
273        :tickets: 598
274
275      synonym() properties are fully supported by all Query joining/
276      with_parent operations
277
278    .. change::
279        :tags: orm
280        :tickets:
281
282      fixed very stupid bug when deleting items with many-to-many
283      uselist=False relations
284
285    .. change::
286        :tags: orm
287        :tickets:
288
289      remember all that stuff about polymorphic_union ?  for
290      joined table inheritance ?  Funny thing...
291      You sort of don't need it for joined table inheritance, you
292      can just string all the tables together via outerjoin().
293      The UNION still applies if concrete tables are involved,
294      though (since nothing to join them on).
295
296    .. change::
297        :tags: orm
298        :tickets:
299
300      small fix to eager loading to better work with eager loads
301      to polymorphic mappers that are using a straight "outerjoin"
302      clause
303
304    .. change::
305        :tags: sql
306        :tickets:
307
308      ForeignKey to a table in a schema that's not the default schema
309      requires the schema to be explicit; i.e. ForeignKey('alt_schema.users.id')
310
311    .. change::
312        :tags: sql
313        :tickets:
314
315      MetaData can now be constructed with an engine or url as the first
316      argument, just like BoundMetaData
317
318    .. change::
319        :tags: sql
320        :tickets:
321
322      BoundMetaData is now deprecated, and MetaData is a direct substitute.
323
324    .. change::
325        :tags: sql
326        :tickets:
327
328      DynamicMetaData has been renamed to ThreadLocalMetaData.  the
329      DynamicMetaData name is deprecated and is an alias for ThreadLocalMetaData
330      or a regular MetaData if threadlocal=False
331
332    .. change::
333        :tags: sql
334        :tickets:
335
336      composite primary key is represented as a non-keyed set to allow for
337      composite keys consisting of cols with the same name; occurs within a
338      Join.  helps inheritance scenarios formulate correct PK.
339
340    .. change::
341        :tags: sql
342        :tickets: 185
343
344      improved ability to get the "correct" and most minimal set of primary key
345      columns from a join, equating foreign keys and otherwise equated columns.
346      this is also mostly to help inheritance scenarios formulate the best
347      choice of primary key columns.
348
349    .. change::
350        :tags: sql
351        :tickets:
352
353      added 'bind' argument to Sequence.create()/drop(), ColumnDefault.execute()
354
355    .. change::
356        :tags: sql
357        :tickets: 650
358
359      columns can be overridden in a reflected table with a "key"
360      attribute different than the column's name, including for primary key
361      columns
362
363    .. change::
364        :tags: sql
365        :tickets: 657
366
367      fixed "ambiguous column" result detection, when dupe col names exist
368      in a result
369
370    .. change::
371        :tags: sql
372        :tickets:
373
374      some enhancements to "column targeting", the ability to match a column
375      to a "corresponding" column in another selectable.  this affects mostly
376      ORM ability to map to complex joins
377
378    .. change::
379        :tags: sql
380        :tickets: 619
381
382      MetaData and all SchemaItems are safe to use with pickle.  slow
383      table reflections can be dumped into a pickled file to be reused later.
384      Just reconnect the engine to the metadata after unpickling.
385
386    .. change::
387        :tags: sql
388        :tickets:
389
390      added a mutex to QueuePool's "overflow" calculation to prevent a race
391      condition that can bypass max_overflow
392
393    .. change::
394        :tags: sql
395        :tickets: 623
396
397      fixed grouping of compound selects to give correct results. will break
398      on sqlite in some cases, but those cases were producing incorrect
399      results anyway, sqlite doesn't support grouped compound selects
400
401    .. change::
402        :tags: sql
403        :tickets: 620
404
405      fixed precedence of operators so that parenthesis are correctly applied
406
407    .. change::
408        :tags: sql
409        :tickets: 545
410
411      calling <column>.in_() (i.e. with no arguments) will return
412      "CASE WHEN (<column> IS NULL) THEN NULL ELSE 0 END = 1)", so that
413      NULL or False is returned in all cases, rather than throwing an error
414
415    .. change::
416        :tags: sql
417        :tickets:
418
419      fixed "where"/"from" criterion of select() to accept a unicode string
420      in addition to regular string - both convert to text()
421
422    .. change::
423        :tags: sql
424        :tickets: 558
425
426      added standalone distinct() function in addition to column.distinct()
427
428    .. change::
429        :tags: sql
430        :tickets:
431
432      result.last_inserted_ids() should return a list that is identically
433      sized to the primary key constraint of the table.  values that were
434      "passively" created and not available via cursor.lastrowid will be None.
435
436    .. change::
437        :tags: sql
438        :tickets: 589
439
440      long-identifier detection fixed to use > rather than >= for
441      max ident length
442
443    .. change::
444        :tags: sql
445        :tickets: 593
446
447      fixed bug where selectable.corresponding_column(selectable.c.col)
448      would not return selectable.c.col, if the selectable is a join
449      of a table and another join involving the same table.  messed
450      up ORM decision making
451
452    .. change::
453        :tags: sql
454        :tickets: 595
455
456      added Interval type to types.py
457
458    .. change::
459        :tags: mysql
460        :tickets: 625
461
462      fixed catching of some errors that imply a dropped connection
463
464    .. change::
465        :tags: mysql
466        :tickets: 624
467
468      fixed escaping of the modulo operator
469
470    .. change::
471        :tags: mysql
472        :tickets: 590
473
474      added 'fields' to reserved words
475
476    .. change::
477        :tags: mysql
478        :tickets:
479
480      various reflection enhancement/fixes
481
482    .. change::
483        :tags: oracle
484        :tickets: 604
485
486      datetime fixes: got subsecond TIMESTAMP to work,
487      added OracleDate which supports types.Date with only year/month/day
488
489    .. change::
490        :tags: oracle
491        :tickets:
492
493      added dialect flag "auto_convert_lobs", defaults to True; will cause any
494      LOB objects detected in a result set to be forced into OracleBinary
495      so that the LOB is read() automatically, if no typemap was present
496      (i.e., if a textual execute() was issued).
497
498    .. change::
499        :tags: oracle
500        :tickets: 624
501
502      mod operator '%' produces MOD
503
504    .. change::
505        :tags: oracle
506        :tickets: 542
507
508      converts cx_oracle datetime objects to Python datetime.datetime when
509      Python 2.3 used
510
511    .. change::
512        :tags: oracle
513        :tickets:
514
515      fixed unicode conversion in Oracle TEXT type
516
517    .. change::
518        :tags: postgres
519        :tickets: 624
520
521      fixed escaping of the modulo operator
522
523    .. change::
524        :tags: postgres
525        :tickets: 570
526
527      added support for reflection of domains
528
529    .. change::
530        :tags: postgres
531        :tickets:
532
533      types which are missing during reflection resolve to Null type
534      instead of raising an error
535
536    .. change::
537        :tags: postgres
538        :tickets:
539
540      the fix in "schema" above fixes reflection of foreign keys from an
541      alt-schema table to a public schema table
542
543    .. change::
544        :tags: sqlite
545        :tickets:
546
547      rearranged dialect initialization so it has time to warn about pysqlite1
548      being too old.
549
550    .. change::
551        :tags: sqlite
552        :tickets:
553
554      sqlite better handles datetime/date/time objects mixed and matched
555      with various Date/Time/DateTime columns
556
557    .. change::
558        :tags: sqlite
559        :tickets: 603
560
561      string PK column inserts don't get overwritten with OID
562
563    .. change::
564        :tags: mssql
565        :tickets: 634
566
567      fix port option handling for pyodbc
568
569    .. change::
570        :tags: mssql
571        :tickets:
572
573      now able to reflect start and increment values for identity columns
574
575    .. change::
576        :tags: mssql
577        :tickets:
578
579      preliminary support for using scope_identity() with pyodbc
580
581.. changelog::
582    :version: 0.3.8
583    :released: Sat Jun 02 2007
584
585    .. change::
586        :tags: engines
587        :tickets:
588
589      added detach() to Connection, allows underlying DBAPI connection
590      to be detached from its pool, closing on dereference/close()
591      instead of being reused by the pool.
592
593    .. change::
594        :tags: engines
595        :tickets:
596
597      added invalidate() to Connection, immediately invalidates the
598      Connection and its underlying DBAPI connection.
599
600    .. change::
601        :tags: sql
602        :tickets:
603
604      _Label class overrides compare_self to return its ultimate
605      object. meaning, if you say someexpr.label('foo') == 5, it
606      produces the correct "someexpr == 5".
607
608    .. change::
609        :tags: sql
610        :tickets:
611
612      _Label propagates "_hide_froms()" so that scalar selects
613      behave more properly with regards to FROM clause #574
614
615    .. change::
616        :tags: sql
617        :tickets:
618
619      fix to long name generation when using oid_column as an order by
620      (oids used heavily in mapper queries)
621
622    .. change::
623        :tags: sql
624        :tickets:
625
626      significant speed improvement to ResultProxy, pre-caches
627      TypeEngine dialect implementations and saves on function calls
628      per column
629
630    .. change::
631        :tags: sql
632        :tickets:
633
634      parenthesis are applied to clauses via a new _Grouping
635      construct. uses operator precedence to more intelligently apply
636      parenthesis to clauses, provides cleaner nesting of clauses
637      (doesn't mutate clauses placed in other clauses, i.e. no 'parens'
638      flag)
639
640    .. change::
641        :tags: sql
642        :tickets:
643
644      added 'modifier' keyword, works like func.<foo> except does not
645      add parenthesis.  e.g. select([modifier.DISTINCT(...)]) etc.
646
647    .. change::
648        :tags: sql
649        :tickets: 578
650
651      removed "no group by's in a select that's part of a UNION"
652      restriction
653
654    .. change::
655        :tags: orm
656        :tickets:
657
658      added reset_joinpoint() method to Query, moves the "join point"
659      back to the starting mapper. 0.4 will change the behavior of
660      join() to reset the "join point" in all cases so this is an
661      interim method. for forwards compatibility, ensure joins across
662      multiple relations are specified using a single join(), i.e.
663      join(['a', 'b', 'c']).
664
665    .. change::
666        :tags: orm
667        :tickets:
668
669      fixed bug in query.instances() that wouldn't handle more than
670      on additional mapper or one additional column.
671
672    .. change::
673        :tags: orm
674        :tickets:
675
676      "delete-orphan" no longer implies "delete". ongoing effort to
677      separate the behavior of these two operations.
678
679    .. change::
680        :tags: orm
681        :tickets:
682
683      many-to-many relationships properly set the type of bind params
684      for delete operations on the association table
685
686    .. change::
687        :tags: orm
688        :tickets:
689
690      many-to-many relationships check that the number of rows deleted
691      from the association table by a delete operation matches the
692      expected results
693
694    .. change::
695        :tags: orm
696        :tickets:
697
698      session.get() and session.load() propagate \**kwargs through to
699      query
700
701    .. change::
702        :tags: orm
703        :tickets: 577
704
705      fix to polymorphic query which allows the original
706      polymorphic_union to be embedded into a correlated subquery
707
708    .. change::
709        :tags: orm
710        :tickets:
711
712      fix to select_by(<propname>=<object instance>) -style joins in
713      conjunction with many-to-many relationships, bug introduced in
714      r2556
715
716    .. change::
717        :tags: orm
718        :tickets:
719
720      the "primary_key" argument to mapper() is propagated to the
721      "polymorphic" mapper. primary key columns in this list get
722      normalized to that of the mapper's local table.
723
724    .. change::
725        :tags: orm
726        :tickets:
727
728      restored logging of "lazy loading clause" under
729      sa.orm.strategies logger, got removed in 0.3.7
730
731    .. change::
732        :tags: orm
733        :tickets:
734
735      improved support for eagerloading of properties off of mappers
736      that are mapped to select() statements; i.e. eagerloader is
737      better at locating the correct selectable with which to attach
738      its LEFT OUTER JOIN.
739
740    .. change::
741        :tags: mysql
742        :tickets:
743
744      Nearly all MySQL column types are now supported for declaration
745      and reflection. Added NCHAR, NVARCHAR, VARBINARY, TINYBLOB,
746      LONGBLOB, YEAR
747
748    .. change::
749        :tags: mysql
750        :tickets:
751
752      The sqltypes.Binary passthrough now always builds a BLOB,
753      avoiding problems with very old database versions
754
755    .. change::
756        :tags: mysql
757        :tickets:
758
759      support for column-level CHARACTER SET and COLLATE declarations,
760      as well as ASCII, UNICODE, NATIONAL and BINARY shorthand.
761
762    .. change::
763        :tags: firebird
764        :tickets:
765
766      set max identifier length to 31
767
768    .. change::
769        :tags: firebird
770        :tickets:
771
772      supports_sane_rowcount() set to False due to ticket #370.
773      versioned_id_col feature wont work in FB.
774
775    .. change::
776        :tags: firebird
777        :tickets:
778
779      some execution fixes
780
781    .. change::
782        :tags: firebird
783        :tickets:
784
785      new association proxy implementation, implementing complete
786      proxies to list, dict and set-based relation collections
787
788    .. change::
789        :tags: firebird
790        :tickets:
791
792      added orderinglist, a custom list class that synchronizes an
793      object attribute with that object's position in the list
794
795    .. change::
796        :tags: firebird
797        :tickets:
798
799      small fix to SelectResultsExt to not bypass itself during
800      select().
801
802    .. change::
803        :tags: firebird
804        :tickets:
805
806      added filter(), filter_by() to assignmapper
807
808.. changelog::
809    :version: 0.3.7
810    :released: Sun Apr 29 2007
811
812    .. change::
813        :tags: engines
814        :tickets:
815
816      warnings module used for issuing warnings (instead of logging)
817
818    .. change::
819        :tags: engines
820        :tickets: 480
821
822      cleanup of DBAPI import strategies across all engines
823
824    .. change::
825        :tags: engines
826        :tickets:
827
828      refactoring of engine internals which reduces complexity,
829      number of codepaths; places more state inside of ExecutionContext
830      to allow more dialect control of cursor handling, result sets.
831      ResultProxy totally refactored and also has two versions of
832      "buffered" result sets used for different purposes.
833
834    .. change::
835        :tags: engines
836        :tickets: 514
837
838      server side cursor support fully functional in postgres.
839
840    .. change::
841        :tags: engines
842        :tickets:
843
844      improved framework for auto-invalidation of connections that have
845      lost their underlying database, via dialect-specific detection
846      of exceptions corresponding to that database's disconnect
847      related error messages.  Additionally, when a "connection no
848      longer open" condition is detected, the entire connection pool
849      is discarded and replaced with a new instance.  #516
850
851    .. change::
852        :tags: engines
853        :tickets: 521
854
855      the dialects within sqlalchemy.databases become a setuptools
856      entry points. loading the built-in database dialects works the
857      same as always, but if none found will fall back to trying
858      pkg_resources to load an external module
859
860    .. change::
861        :tags: engines
862        :tickets:
863
864      Engine contains a "url" attribute referencing the url.URL object
865      used by create_engine().
866
867    .. change::
868        :tags: sql
869        :tickets:
870
871      keys() of result set columns are not lowercased, come back
872      exactly as they're expressed in cursor.description.  note this
873      causes colnames to be all caps in oracle.
874
875    .. change::
876        :tags: sql
877        :tickets:
878
879      preliminary support for unicode table names, column names and
880      SQL statements added, for databases which can support them.
881      Works with sqlite and postgres so far.  MySQL *mostly* works
882      except the has_table() function does not work.  Reflection
883      works too.
884
885    .. change::
886        :tags: sql
887        :tickets: 522
888
889      the Unicode type is now a direct subclass of String, which now
890      contains all the "convert_unicode" logic.  This helps the variety
891      of unicode situations that occur in db's such as MS-SQL to be
892      better handled and allows subclassing of the Unicode datatype.
893
894    .. change::
895        :tags: sql
896        :tickets:
897
898      ClauseElements can be used in in_() clauses now, such as bind
899      parameters, etc. #476
900
901    .. change::
902        :tags: sql
903        :tickets:
904
905      reverse operators implemented for `CompareMixin` elements,
906      allows expressions like "5 + somecolumn" etc. #474
907
908    .. change::
909        :tags: sql
910        :tickets:
911
912      the "where" criterion of an update() and delete() now correlates
913      embedded select() statements against the table being updated or
914      deleted.  this works the same as nested select() statement
915      correlation, and can be disabled via the correlate=False flag on
916      the embedded select().
917
918    .. change::
919        :tags: sql
920        :tickets: 512
921
922      column labels are now generated in the compilation phase, which
923      means their lengths are dialect-dependent.  So on oracle a label
924      that gets truncated to 30 chars will go out to 63 characters
925      on postgres.  Also, the true labelname is always attached as the
926      accessor on the parent Selectable so there's no need to be aware
927      of the "truncated" label names.
928
929    .. change::
930        :tags: sql
931        :tickets:
932
933      column label and bind param "truncation" also generate
934      deterministic names now, based on their ordering within the
935      full statement being compiled.  this means the same statement
936      will produce the same string across application restarts and
937      allowing DB query plan caching to work better.
938
939    .. change::
940        :tags: sql
941        :tickets: 513
942
943      the "mini" column labels generated when using subqueries, which
944      are to work around glitchy SQLite behavior that doesn't understand
945      "foo.id" as equivalent to "id", are now only generated in the case
946      that those named columns are selected from (part of)
947
948    .. change::
949        :tags: sql
950        :tickets:
951
952      the label() method on ColumnElement will properly propagate the
953      TypeEngine of the base element out to the label, including a label()
954      created from a scalar=True select() statement.
955
956    .. change::
957        :tags: sql
958        :tickets: 513
959
960      MS-SQL better detects when a query is a subquery and knows not to
961      generate ORDER BY phrases for those
962
963    .. change::
964        :tags: sql
965        :tickets: 505
966
967      fix for fetchmany() "size" argument being positional in most
968      dbapis
969
970    .. change::
971        :tags: sql
972        :tickets:
973
974      sending None as an argument to func.<something> will produce
975      an argument of NULL
976
977    .. change::
978        :tags: sql
979        :tickets:
980
981      query strings in unicode URLs get keys encoded to ascii
982      for \**kwargs compat
983
984    .. change::
985        :tags: sql
986        :tickets: 523
987
988      slight tweak to raw execute() change to also support tuples
989      for positional parameters, not just lists
990
991    .. change::
992        :tags: sql
993        :tickets:
994
995      fix to case() construct to propagate the type of the first
996      WHEN condition as the return type of the case statement
997
998    .. change::
999        :tags: orm
1000        :tickets:
1001
1002      fixed critical issue when, after options(eagerload()) is used,
1003      the mapper would then always apply query "wrapping" behavior
1004      for all subsequent LIMIT/OFFSET/DISTINCT queries, even if no
1005      eager loading was applied on those subsequent queries.
1006
1007    .. change::
1008        :tags: orm
1009        :tickets: 541
1010
1011      added query.with_parent(someinstance) method.  searches for
1012      target instance using lazy join criterion from parent instance.
1013      takes optional string "property" to isolate the desired relation.
1014      also adds static Query.query_from_parent(instance, property)
1015      version.
1016
1017    .. change::
1018        :tags: orm
1019        :tickets: 554
1020
1021      improved query.XXX_by(someprop=someinstance) querying to use
1022      similar methodology to with_parent, i.e. using the "lazy" clause
1023      which prevents adding the remote instance's table to the SQL,
1024      thereby making more complex conditions possible
1025
1026    .. change::
1027        :tags: orm
1028        :tickets:
1029
1030      added generative versions of aggregates, i.e. sum(), avg(), etc.
1031      to query. used via query.apply_max(), apply_sum(), etc.
1032      #552
1033
1034    .. change::
1035        :tags: orm
1036        :tickets:
1037
1038      fix to using distinct() or distinct=True in combination with
1039      join() and similar
1040
1041    .. change::
1042        :tags: orm
1043        :tickets:
1044
1045      corresponding to label/bindparam name generation, eager loaders
1046      generate deterministic names for the aliases they create using
1047      md5 hashes.
1048
1049    .. change::
1050        :tags: orm
1051        :tickets:
1052
1053      improved/fixed custom collection classes when giving it "set"/
1054      "sets.Set" classes or subclasses (was still looking for append()
1055      methods on them during lazy loads)
1056
1057    .. change::
1058        :tags: orm
1059        :tickets:
1060
1061      restored old "column_property()" ORM function (used to be called
1062      "column()") to force any column expression to be added as a property
1063      on a mapper, particularly those that aren't present in the mapped
1064      selectable.  this allows "scalar expressions" of any kind to be
1065      added as relations (though they have issues with eager loads).
1066
1067    .. change::
1068        :tags: orm
1069        :tickets: 533
1070
1071      fix to many-to-many relationships targeting polymorphic mappers
1072
1073    .. change::
1074        :tags: orm
1075        :tickets: 543
1076
1077      making progress with session.merge() as well as combining its
1078      usage with entity_name
1079
1080    .. change::
1081        :tags: orm
1082        :tickets:
1083
1084      the usual adjustments to relationships between inheriting mappers,
1085      in this case establishing relation()s to subclass mappers where
1086      the join conditions come from the superclass' table
1087
1088    .. change::
1089        :tags: informix
1090        :tickets:
1091
1092      informix support added !  courtesy James Zhang, who put a ton
1093      of effort in.
1094
1095    .. change::
1096        :tags: sqlite
1097        :tickets:
1098
1099      removed silly behavior where sqlite would reflect UNIQUE indexes
1100      as part of the primary key (?!)
1101
1102    .. change::
1103        :tags: oracle
1104        :tickets:
1105
1106      small fix to allow successive compiles of the same SELECT object
1107      which features LIMIT/OFFSET.  oracle dialect needs to modify
1108      the object to have ROW_NUMBER OVER and wasn't performing
1109      the full series of steps on successive compiles.
1110
1111    .. change::
1112        :tags: mysql
1113        :tickets:
1114
1115      support for SSL arguments given as inline within URL query string,
1116      prefixed with "ssl\_", courtesy terjeros@gmail.com.
1117
1118    .. change::
1119        :tags: <schemaname>, mysql
1120        :tickets:
1121
1122      mysql uses "DESCRIBE.<tablename>", catching exceptions
1123      if table doesn't exist, in order to determine if a table exists.
1124      this supports unicode table names as well as schema names. tested
1125      with MySQL5 but should work with 4.1 series as well. (#557)
1126
1127    .. change::
1128        :tags: extensions
1129        :tickets:
1130
1131      big fix to AssociationProxy so that multiple AssociationProxy
1132      objects can be associated with a single association collection.
1133
1134    .. change::
1135        :tags: extensions
1136        :tickets:
1137
1138      assign_mapper names methods according to their keys (i.e. __name__)
1139      #551
1140
1141    .. change::
1142        :tags: mssql
1143        :tickets:
1144
1145      pyodbc is now the preferred DB-API for MSSQL, and if no module is
1146      specifically requested, will be loaded first on a module probe.
1147
1148    .. change::
1149        :tags: mssql
1150        :tickets:
1151
1152      The @@SCOPE_IDENTITY is now used instead of @@IDENTITY. This
1153      behavior may be overridden with the engine_connect
1154      "use_scope_identity" keyword parameter, which may also be specified
1155      in the dburi.
1156
1157.. changelog::
1158    :version: 0.3.6
1159    :released: Fri Mar 23 2007
1160
1161    .. change::
1162        :tags: sql
1163        :tickets:
1164
1165      bindparam() names are now repeatable!  specify two
1166      distinct bindparam()s with the same name in a single statement,
1167      and the key will be shared.  proper positional/named args translate
1168      at compile time.  for the old behavior of "aliasing" bind parameters
1169      with conflicting names, specify "unique=True" - this option is
1170      still used internally for all the auto-genererated (value-based)
1171      bind parameters.
1172
1173    .. change::
1174        :tags: sql
1175        :tickets:
1176
1177      slightly better support for bind params as column clauses, either
1178      via bindparam() or via literal(), i.e. select([literal('foo')])
1179
1180    .. change::
1181        :tags: sql
1182        :tickets:
1183
1184      MetaData can bind to an engine either via "url" or "engine" kwargs
1185      to constructor, or by using connect() method. BoundMetaData is
1186      identical to MetaData except engine_or_url param is required.
1187      DynamicMetaData is the same and provides thread-local connections be
1188      default.
1189
1190    .. change::
1191        :tags: sql
1192        :tickets:
1193
1194      exists() becomes useable as a standalone selectable, not just in a
1195      WHERE clause, i.e. exists([columns], criterion).select()
1196
1197    .. change::
1198        :tags: sql
1199        :tickets:
1200
1201      correlated subqueries work inside of ORDER BY, GROUP BY
1202
1203    .. change::
1204        :tags: sql
1205        :tickets:
1206
1207      fixed function execution with explicit connections, i.e.
1208      conn.execute(func.dosomething())
1209
1210    .. change::
1211        :tags: sql
1212        :tickets:
1213
1214      use_labels flag on select() wont auto-create labels for literal text
1215      column elements, since we can make no assumptions about the text. to
1216      create labels for literal columns, you can say "somecol AS
1217      somelabel", or use literal_column("somecol").label("somelabel")
1218
1219    .. change::
1220        :tags: sql
1221        :tickets:
1222
1223      quoting wont occur for literal columns when they are "proxied" into
1224      the column collection for their selectable (is_literal flag is
1225      propagated). literal columns are specified via
1226      literal_column("somestring").
1227
1228    .. change::
1229        :tags: sql
1230        :tickets:
1231
1232      added "fold_equivalents" boolean argument to Join.select(), which
1233      removes 'duplicate' columns from the resulting column clause that
1234      are known to be equivalent based on the join condition. this is of
1235      great usage when constructing subqueries of joins which Postgres
1236      complains about if duplicate column names are present.
1237
1238    .. change::
1239        :tags: sql
1240        :tickets: 503
1241
1242      fixed use_alter flag on ForeignKeyConstraint
1243
1244    .. change::
1245        :tags: sql
1246        :tickets: 506
1247
1248      fixed usage of 2.4-only "reversed" in topological.py
1249
1250    .. change::
1251        :tags: sql
1252        :tickets: 501
1253
1254      for hackers, refactored the "visitor" system of ClauseElement and
1255      SchemaItem so that the traversal of items is controlled by the
1256      ClauseVisitor itself, using the method visitor.traverse(item).
1257      accept_visitor() methods can still be called directly but will not
1258      do any traversal of child items. ClauseElement/SchemaItem now have a
1259      configurable get_children() method to return the collection of child
1260      elements for each parent object. This allows the full traversal of
1261      items to be clear and unambiguous (as well as loggable), with an
1262      easy method of limiting a traversal (just pass flags which are
1263      picked up by appropriate get_children() methods).
1264
1265    .. change::
1266        :tags: sql
1267        :tickets:
1268
1269      the "else\_" parameter to the case statement now properly works when
1270      set to zero.
1271
1272    .. change::
1273        :tags: orm
1274        :tickets:
1275
1276      the full featureset of the SelectResults extension has been merged
1277      into a new set of methods available off of Query.  These methods
1278      all provide "generative" behavior, whereby the Query is copied
1279      and a new one returned with additional criterion added.
1280      The new methods include:
1281
1282          * filter() - applies select criterion to the query
1283          * filter_by() - applies "by"-style criterion to the query
1284          * avg() - return the avg() function on the given column
1285          * join() - join to a property (or across a list of properties)
1286          * outerjoin() - like join() but uses LEFT OUTER JOIN
1287          * limit()/offset() - apply LIMIT/OFFSET range-based access
1288            which applies limit/offset: session.query(Foo)[3:5]
1289          * distinct() - apply DISTINCT
1290          * list() - evaluate the criterion and return results
1291
1292      no incompatible changes have been made to Query's API and no methods
1293      have been deprecated.  Existing methods like select(), select_by(),
1294      get(), get_by() all execute the query at once and return results
1295      like they always did.  join_to()/join_via() are still there although
1296      the generative join()/outerjoin() methods are easier to use.
1297
1298    .. change::
1299        :tags: orm
1300        :tickets:
1301
1302      the return value for multiple mappers used with instances() now
1303      returns a cartesian product of the requested list of mappers,
1304      represented as a list of tuples. this corresponds to the documented
1305      behavior. So that instances match up properly, the "uniquing" is
1306      disabled when this feature is used.
1307
1308    .. change::
1309        :tags: orm
1310        :tickets:
1311
1312      Query has add_entity() and add_column() generative methods. these
1313      will add the given mapper/class or ColumnElement to the query at
1314      compile time, and apply them to the instances() method. the user is
1315      responsible for constructing reasonable join conditions (otherwise
1316      you can get full cartesian products). result set is the list of
1317      tuples, non-uniqued.
1318
1319    .. change::
1320        :tags: orm
1321        :tickets:
1322
1323      strings and columns can also be sent to the \*args of instances()
1324      where those exact result columns will be part of the result tuples.
1325
1326    .. change::
1327        :tags: orm
1328        :tickets:
1329
1330      a full select() construct can be passed to query.select() (which
1331      worked anyway), but also query.selectfirst(), query.selectone()
1332      which will be used as is (i.e. no query is compiled). works
1333      similarly to sending the results to instances().
1334
1335    .. change::
1336        :tags: orm
1337        :tickets: 495
1338
1339      eager loading will not "aliasize" "order by" clauses that were
1340      placed in the select statement by something other than the eager
1341      loader itself, to fix possibility of dupe columns as illustrated in. however, this means you have to be more careful with
1342      the columns placed in the "order by" of Query.select(), that you
1343      have explicitly named them in your criterion (i.e. you cant rely on
1344      the eager loader adding them in for you)
1345
1346    .. change::
1347        :tags: orm
1348        :tickets:
1349
1350      added a handy multi-use "identity_key()" method to Session, allowing
1351      the generation of identity keys for primary key values, instances,
1352      and rows, courtesy Daniel Miller
1353
1354    .. change::
1355        :tags: orm
1356        :tickets: 249
1357
1358      many-to-many table will be properly handled even for operations that
1359      occur on the "backref" side of the operation
1360
1361    .. change::
1362        :tags: orm
1363        :tickets: 492
1364
1365      added "refresh-expire" cascade.  allows refresh() and
1366      expire() calls to propagate along relationships.
1367
1368    .. change::
1369        :tags: orm
1370        :tickets: 493
1371
1372      more fixes to polymorphic relations, involving proper lazy-clause
1373      generation on many-to-one relationships to polymorphic mappers. also fixes to detection of "direction", more specific
1374      targeting of columns that belong to the polymorphic union vs. those
1375      that don't.
1376
1377    .. change::
1378        :tags: orm
1379        :tickets:
1380
1381      some fixes to relationship calcs when using "viewonly=True" to pull
1382      in other tables into the join condition which arent parent of the
1383      relationship's parent/child mappings
1384
1385    .. change::
1386        :tags: orm
1387        :tickets:
1388
1389      flush fixes on cyclical-referential relationships that contain
1390      references to other instances outside of the cyclical chain, when
1391      some of the objects in the cycle are not actually part of the flush
1392
1393    .. change::
1394        :tags: orm
1395        :tickets: 500
1396
1397      put an aggressive check for "flushing object A with a collection of
1398      B's, but you put a C in the collection" error condition - **even if
1399      C is a subclass of B**, unless B's mapper loads polymorphically.
1400      Otherwise, the collection will later load a "B" which should be a
1401      "C" (since its not polymorphic) which breaks in bi-directional
1402      relationships (i.e. C has its A, but A's backref will lazyload it as
1403      a different instance of type "B") This check is going
1404      to bite some of you who do this without issues, so the error message
1405      will also document a flag "enable_typechecks=False" to disable this
1406      checking. But be aware that bi-directional relationships in
1407      particular become fragile without this check.
1408
1409    .. change::
1410        :tags: extensions
1411        :tickets: 472
1412
1413      options() method on SelectResults now implemented "generatively"
1414      like the rest of the SelectResults methods.  But
1415      you're going to just use Query now anyway.
1416
1417    .. change::
1418        :tags: extensions
1419        :tickets:
1420
1421      query() method is added by assignmapper.  this helps with
1422      navigating to all the new generative methods on Query.
1423
1424    .. change::
1425        :tags: ms-sql
1426        :tickets:
1427
1428      removed seconds input on DATE column types (probably
1429        should remove the time altogether)
1430
1431    .. change::
1432        :tags: ms-sql
1433        :tickets:
1434
1435      null values in float fields no longer raise errors
1436
1437    .. change::
1438        :tags: ms-sql
1439        :tickets:
1440
1441      LIMIT with OFFSET now raises an error (MS-SQL has no OFFSET support)
1442
1443    .. change::
1444        :tags: ms-sql
1445        :tickets: 509
1446
1447      added an facility to use the MSSQL type VARCHAR(max) instead of TEXT
1448      for large unsized string fields. Use the new "text_as_varchar" to
1449      turn it on.
1450
1451    .. change::
1452        :tags: ms-sql
1453        :tickets:
1454
1455      ORDER BY clauses without a LIMIT are now stripped in subqueries, as
1456      MS-SQL forbids this usage
1457
1458    .. change::
1459        :tags: ms-sql
1460        :tickets: 480
1461
1462      cleanup of module importing code; specifiable DB-API module; more
1463      explicit ordering of module preferences.
1464
1465    .. change::
1466        :tags: oracle
1467        :tickets:
1468
1469      got binary working for any size input !  cx_oracle works fine,
1470      it was my fault as BINARY was being passed and not BLOB for
1471      setinputsizes (also unit tests weren't even setting input sizes).
1472
1473    .. change::
1474        :tags: oracle
1475        :tickets:
1476
1477      also fixed CLOB read/write on a separate changeset.
1478
1479    .. change::
1480        :tags: oracle
1481        :tickets:
1482
1483      auto_setinputsizes defaults to True for Oracle, fixed cases where
1484      it improperly propagated bad types.
1485
1486    .. change::
1487        :tags: mysql
1488        :tickets:
1489
1490      added a catchall \**kwargs to MSString, to help reflection of
1491      obscure types (like "varchar() binary" in MS 4.0)
1492
1493    .. change::
1494        :tags: mysql
1495        :tickets:
1496
1497      added explicit MSTimeStamp type which takes effect when using
1498      types.TIMESTAMP.
1499
1500.. changelog::
1501    :version: 0.3.5
1502    :released: Thu Feb 22 2007
1503
1504    .. change::
1505        :tags: sql
1506        :tickets:
1507
1508      the value of "case_sensitive" defaults to True now, regardless of the
1509      casing of the identifier, unless specifically set to False. this is
1510      because the object might be label'ed as something else which does
1511      contain mixed case, and propigating "case_sensitive=False" breaks that.
1512      Other fixes to quoting when using labels and "fake" column objects
1513
1514    .. change::
1515        :tags: sql
1516        :tickets:
1517
1518      added a "supports_execution()" method to ClauseElement, so that
1519      individual kinds of clauses can express if they are appropriate for
1520      executing...such as, you can execute a "select", but not a "Table" or a
1521      "Join".
1522
1523    .. change::
1524        :tags: sql
1525        :tickets:
1526
1527      fixed argument passing to straight textual execute() on engine,
1528      connection. can handle \*args or a list instance for positional, \**kwargs
1529      or a dict instance for named args, or a list of list or dicts to invoke
1530      executemany()
1531
1532    .. change::
1533        :tags: sql
1534        :tickets:
1535
1536      small fix to BoundMetaData to accept unicode or string URLs
1537
1538    .. change::
1539        :tags: sql
1540        :tickets: 466
1541
1542      fixed named PrimaryKeyConstraint generation courtesy
1543      andrija at gmail
1544
1545    .. change::
1546        :tags: sql
1547        :tickets: 464
1548
1549      fixed generation of CHECK constraints on columns
1550
1551    .. change::
1552        :tags: sql
1553        :tickets:
1554
1555      fixes to tometadata() operation to propagate Constraints at column and
1556      table level
1557
1558    .. change::
1559        :tags: oracle
1560        :tickets: 436
1561
1562      when returning "rowid" as the ORDER BY column or in use with ROW_NUMBER
1563      OVER, oracle dialect checks the selectable its being applied to and will
1564      switch to table PK if not applicable, i.e. for a UNION. checking for
1565      DISTINCT, GROUP BY (other places that rowid is invalid) still a TODO.
1566      allows polymorphic mappings to function.
1567
1568    .. change::
1569        :tags: oracle
1570        :tickets:
1571
1572      sequences on a non-pk column will properly fire off on INSERT
1573
1574    .. change::
1575        :tags: oracle
1576        :tickets: 435
1577
1578      added PrefetchingResultProxy support to pre-fetch LOB columns when they
1579      are known to be present, fixes
1580
1581    .. change::
1582        :tags: oracle
1583        :tickets: 379
1584
1585      implemented reflection of tables based on synonyms, including across
1586      dblinks
1587
1588    .. change::
1589        :tags: oracle
1590        :tickets: 363
1591
1592      issues a log warning when a related table cant be reflected due to
1593      certain permission errors
1594
1595    .. change::
1596        :tags: mysql
1597        :tickets:
1598
1599      fix to reflection on older DB's that might return array() type for
1600      "show variables like" statements
1601
1602    .. change::
1603        :tags: postgres
1604        :tickets: 442
1605
1606      better reflection of sequences for alternate-schema Tables
1607
1608    .. change::
1609        :tags: postgres
1610        :tickets:
1611
1612      sequences on a non-pk column will properly fire off on INSERT
1613
1614    .. change::
1615        :tags: postgres
1616        :tickets: 460, 444
1617
1618      added PGInterval type, PGInet type
1619
1620    .. change::
1621        :tags: mssql
1622        :tickets: 419
1623
1624      preliminary support for pyodbc (Yay!)
1625
1626    .. change::
1627        :tags: mssql
1628        :tickets: 298
1629
1630      better support for NVARCHAR types added
1631
1632    .. change::
1633        :tags: mssql
1634        :tickets:
1635
1636      fix for commit logic on pymssql
1637
1638    .. change::
1639        :tags: mssql
1640        :tickets: 456
1641
1642      fix for query.get() with schema
1643
1644    .. change::
1645        :tags: mssql
1646        :tickets: 473
1647
1648      fix for non-integer relationships
1649
1650    .. change::
1651        :tags: mssql
1652        :tickets: 419
1653
1654      DB-API module now selectable at run-time
1655
1656    .. change::
1657        :tags: tickets:422, 481, 415, mssql
1658        :tickets:
1659
1660      now passes many more unit tests
1661
1662    .. change::
1663        :tags: mssql
1664        :tickets: 479
1665
1666      better unittest compatibility with ANSI functions
1667
1668    .. change::
1669        :tags: mssql
1670        :tickets: 415
1671
1672      improved support for implicit sequence PK columns with auto-insert
1673
1674    .. change::
1675        :tags: mssql
1676        :tickets: 371
1677
1678      fix for blank password in adodbapi
1679
1680    .. change::
1681        :tags: mssql
1682        :tickets: 481
1683
1684      fixes to get unit tests working with pyodbc
1685
1686    .. change::
1687        :tags: mssql
1688        :tickets:
1689
1690      fix to auto_identity_insert on db-url query
1691
1692    .. change::
1693        :tags: mssql
1694        :tickets:
1695
1696      added query_timeout to db-url query parms. currently works only for
1697      pymssql
1698
1699    .. change::
1700        :tags: mssql
1701        :tickets:
1702
1703      tested with pymssql 0.8.0 (which is now LGPL)
1704
1705    .. change::
1706        :tags: orm, bugs
1707        :tickets: 441, 448, 439
1708
1709      another refactoring to relationship calculation. Allows more accurate
1710      ORM behavior with relationships from/to/between mappers, particularly
1711      polymorphic mappers, also their usage with Query, SelectResults. tickets
1712      include,,.
1713
1714    .. change::
1715        :tags: orm, bugs
1716        :tickets:
1717
1718      removed deprecated method of specifying custom collections on classes;
1719      you must now use the "collection_class" option. the old way was
1720      beginning to produce conflicts when people used assign_mapper(), which
1721      now patches an "options" method, in conjunction with a relationship
1722      named "options". (relationships take precedence over monkeypatched
1723      assign_mapper methods).
1724
1725    .. change::
1726        :tags: orm, bugs
1727        :tickets: 454
1728
1729      extension() query option propagates to Mapper._instance() method so that
1730      all loading-related methods get called
1731
1732    .. change::
1733        :tags: orm, bugs
1734        :tickets:
1735
1736      eager relation to an inheriting mapper wont fail if no rows returned for
1737      the relationship.
1738
1739    .. change::
1740        :tags: orm, bugs
1741        :tickets: 486
1742
1743      eager relation loading bug fixed for eager relation on multiple
1744      descendant classes
1745
1746    .. change::
1747        :tags: orm, bugs
1748        :tickets: 423
1749
1750      fix for very large topological sorts, courtesy ants.aasma at gmail
1751
1752    .. change::
1753        :tags: orm, bugs
1754        :tickets:
1755
1756      eager loading is slightly more strict about detecting "self-referential"
1757      relationships, specifically between polymorphic mappers. this results in
1758      an "eager degrade" to lazy loading.
1759
1760    .. change::
1761        :tags: orm, bugs
1762        :tickets: 449
1763
1764      improved support for complex queries embedded into "where" criterion for
1765      query.select()
1766
1767    .. change::
1768        :tags: orm, bugs
1769        :tickets: 485
1770
1771      mapper options like eagerload(), lazyload(), deferred(), will work for
1772      "synonym()" relationships
1773
1774    .. change::
1775        :tags: orm, bugs
1776        :tickets: 445
1777
1778      fixed bug where cascade operations incorrectly included deleted
1779      collection items in the cascade
1780
1781    .. change::
1782        :tags: orm, bugs
1783        :tickets: 478
1784
1785      fixed relationship deletion error when one-to-many child item is moved
1786      to a new parent in a single unit of work
1787
1788    .. change::
1789        :tags: orm, bugs
1790        :tickets:
1791
1792      fixed relationship deletion error where parent/child with a single
1793      column as PK/FK on the child would raise a "blank out the primary key"
1794      error, if manually deleted or "delete" cascade without "delete-orphan"
1795      was used
1796
1797    .. change::
1798        :tags: orm, bugs
1799        :tickets:
1800
1801      fix to deferred so that load operation doesn't mistakenly occur when only
1802      PK col attributes are set
1803
1804    .. change::
1805        :tags: orm, enhancements
1806        :tickets: 385
1807
1808      implemented foreign_keys argument to mapper. use in
1809      conjunction with primaryjoin/secondaryjoin arguments to specify/override
1810      foreign keys defined on the Table instance.
1811
1812    .. change::
1813        :tags: orm, enhancements
1814        :tickets:
1815
1816      contains_eager('foo') automatically implies eagerload('foo')
1817
1818    .. change::
1819        :tags: orm, enhancements
1820        :tickets:
1821
1822      added "alias" argument to contains_eager(). use it to specify the string
1823      name or Alias instance of an alias used in the query for the eagerly
1824      loaded child items. easier to use than "decorator"
1825
1826    .. change::
1827        :tags: orm, enhancements
1828        :tickets:
1829
1830      added "contains_alias()" option for result set mapping to an alias of
1831      the mapped table
1832
1833    .. change::
1834        :tags: orm, enhancements
1835        :tickets: 468
1836
1837      added support for py2.5 "with" statement with SessionTransaction
1838
1839    .. change::
1840        :tags: extensions
1841        :tickets:
1842
1843      added distinct() method to SelectResults. generally should only make a
1844      difference when using count().
1845
1846    .. change::
1847        :tags: extensions
1848        :tickets: 472
1849
1850      added options() method to SelectResults, equivalent to query.options()
1851
1852    .. change::
1853        :tags: extensions
1854        :tickets: 462
1855
1856      added optional __table_opts__ dictionary to ActiveMapper, will send kw
1857      options to Table objects
1858
1859    .. change::
1860        :tags: extensions
1861        :tickets: 467
1862
1863      added selectfirst(), selectfirst_by() to assign_mapper
1864
1865.. changelog::
1866    :version: 0.3.4
1867    :released: Tue Jan 23 2007
1868
1869    .. change::
1870        :tags: general
1871        :tickets:
1872
1873      global "insure"->"ensure" change. in US english "insure" is actually
1874      largely interchangeable with "ensure" (so says the dictionary), so I'm not
1875      completely illiterate, but its definitely sub-optimal to "ensure" which is
1876      non-ambiguous.
1877
1878    .. change::
1879        :tags: sql
1880        :tickets:
1881
1882      added "fetchmany()" support to ResultProxy
1883
1884    .. change::
1885        :tags: sql
1886        :tickets:
1887
1888      added support for column "key" attribute to be useable in
1889      row[<key>]/row.<key>
1890
1891    .. change::
1892        :tags: sql
1893        :tickets:
1894
1895      changed "BooleanExpression" to subclass from "BinaryExpression", so that
1896      boolean expressions can also follow column-clause behaviors (i.e. label(),
1897      etc).
1898
1899    .. change::
1900        :tags: sql
1901        :tickets:
1902
1903      trailing underscores are trimmed from func.<xxx> calls, such as func.if_()
1904
1905    .. change::
1906        :tags: sql
1907        :tickets:
1908
1909      fix to correlation of subqueries when the column list of the select
1910      statement is constructed with individual calls to append_column(); this
1911      fixes an ORM bug whereby nested select statements were not getting
1912      correlated with the main select generated by the Query object.
1913
1914    .. change::
1915        :tags: sql
1916        :tickets:
1917
1918      another fix to subquery correlation so that a subquery which has only one
1919      FROM element will *not* correlate that single element, since at least one
1920      FROM element is required in a query.
1921
1922    .. change::
1923        :tags: sql
1924        :tickets: 414
1925
1926      default "timezone" setting is now False. this corresponds to Python's
1927      datetime behavior as well as Postgres' timestamp/time types (which is the
1928      only timezone-sensitive dialect at the moment)
1929
1930    .. change::
1931        :tags: sql
1932        :tickets:
1933
1934      the "op()" function is now treated as an "operation", rather than a
1935      "comparison". the difference is, an operation produces a BinaryExpression
1936      from which further operations can occur whereas comparison produces the
1937      more restrictive BooleanExpression
1938
1939    .. change::
1940        :tags: sql
1941        :tickets:
1942
1943      trying to redefine a reflected primary key column as non-primary key raises
1944      an error
1945
1946    .. change::
1947        :tags: sql
1948        :tickets:
1949
1950      type system slightly modified to support TypeDecorators that can be
1951      overridden by the dialect (ok, that's not very clear, it allows the mssql
1952      tweak below to be possible)
1953
1954    .. change::
1955        :tags: mssql
1956        :tickets:
1957
1958      added an NVarchar type (produces NVARCHAR), also MSUnicode which provides
1959      Unicode-translation for the NVarchar regardless of dialect convert_unicode
1960      setting.
1961
1962    .. change::
1963        :tags: postgres
1964        :tickets: 424
1965
1966      fix to the initial checkfirst for tables to take current schema into
1967      account
1968
1969    .. change::
1970        :tags: postgres
1971        :tickets:
1972
1973      postgres has an optional "server_side_cursors=True" flag which will utilize
1974      server side cursors. these are appropriate for fetching only partial
1975      results and are necessary for working with very large unbounded result
1976      sets. While we'd like this to be the default behavior, different
1977      environments seem to have different results and the causes have not been
1978      isolated so we are leaving the feature off by default for now. Uses an
1979      apparently undocumented psycopg2 behavior recently discovered on the
1980      psycopg mailing list.
1981
1982    .. change::
1983        :tags: postgres
1984        :tickets:
1985
1986      added "BIGSERIAL" support for postgres table with
1987      PGBigInteger/autoincrement
1988
1989    .. change::
1990        :tags: postgres
1991        :tickets: 402
1992
1993      fixes to postgres reflection to better handle when schema names are
1994      present; thanks to jason (at) ncsmags.com
1995
1996    .. change::
1997        :tags: mysql
1998        :tickets: 420
1999
2000      mysql is inconsistent with what kinds of quotes it uses in foreign keys
2001      during a SHOW CREATE TABLE, reflection updated to accommodate for all three
2002      styles
2003
2004    .. change::
2005        :tags: mysql
2006        :tickets: 418
2007
2008      mysql table create options work on a generic passthru now, i.e. Table(...,
2009      mysql_engine='InnoDB', mysql_collate="latin1_german2_ci",
2010      mysql_auto_increment="5", mysql_<somearg>...), helps
2011
2012    .. change::
2013        :tags: firebird
2014        :tickets: 408
2015
2016      order of constraint creation puts primary key first before all other
2017      constraints; required for firebird, not a bad idea for others
2018
2019    .. change::
2020        :tags: firebird
2021        :tickets: 409
2022
2023      Firebird fix to autoload multifield foreign keys
2024
2025    .. change::
2026        :tags: firebird
2027        :tickets: 409
2028
2029      Firebird NUMERIC type properly handles a type without precision
2030
2031    .. change::
2032        :tags: oracle
2033        :tickets:
2034
2035      *slight* support for binary, but still need to figure out how to insert
2036      reasonably large values (over 4K). requires auto_setinputsizes=True sent to
2037      create_engine(), rows must be fully fetched individually, etc.
2038
2039    .. change::
2040        :tags: orm
2041        :tickets:
2042
2043      poked the first hole in the can of worms: saying
2044      query.select_by(somerelationname=someinstance) will create the join of the
2045      primary key columns represented by "somerelationname"'s mapper to the
2046      actual primary key in "someinstance".
2047
2048    .. change::
2049        :tags: orm
2050        :tickets:
2051
2052      reworked how relations interact with "polymorphic" mappers, i.e. mappers
2053      that have a select_table as well as polymorphic flags. better determination
2054      of proper join conditions, interaction with user- defined join conditions,
2055      and support for self-referential polymorphic mappers.
2056
2057    .. change::
2058        :tags: orm
2059        :tickets:
2060
2061      related to polymorphic mapping relations, some deeper error checking when
2062      compiling relations, to detect an ambiguous "primaryjoin" in the case that
2063      both sides of the relationship have foreign key references in the primary
2064      join condition. also tightened down conditions used to locate "relation
2065      direction", associating the "foreignkey" of the relationship with the
2066      "primaryjoin"
2067
2068    .. change::
2069        :tags: orm
2070        :tickets:
2071
2072      a little bit of improvement to the concept of a "concrete" inheritance
2073      mapping, though that concept is not well fleshed out yet (added test case
2074      to support concrete mappers on top of a polymorphic base).
2075
2076    .. change::
2077        :tags: orm
2078        :tickets:
2079
2080      fix to "proxy=True" behavior on synonym()
2081
2082    .. change::
2083        :tags: orm
2084        :tickets: 427
2085
2086      fixed bug where delete-orphan basically didn't work with many-to-many
2087      relationships, backref presence generally hid the symptom
2088
2089    .. change::
2090        :tags: orm
2091        :tickets:
2092
2093      added a mutex to the mapper compilation step. ive been reluctant to add any
2094      kind of threading anything to SA but this is one spot that its really
2095      needed since mappers are typically "global", and while their state does not
2096      change during normal operation, the initial compilation step does modify
2097      internal state significantly, and this step usually occurs not at
2098      module-level initialization time (unless you call compile()) but at
2099      first-request time
2100
2101    .. change::
2102        :tags: orm
2103        :tickets:
2104
2105      basic idea of "session.merge()" actually implemented.  needs more testing.
2106
2107    .. change::
2108        :tags: orm
2109        :tickets:
2110
2111      added "compile_mappers()" function as a shortcut to compiling all mappers
2112
2113    .. change::
2114        :tags: orm
2115        :tickets:
2116
2117      fix to MapperExtension create_instance so that entity_name properly
2118      associated with new instance
2119
2120    .. change::
2121        :tags: orm
2122        :tickets:
2123
2124      speed enhancements to ORM object instantiation, eager loading of rows
2125
2126    .. change::
2127        :tags: orm
2128        :tickets: 406
2129
2130      invalid options sent to 'cascade' string will raise an exception
2131
2132    .. change::
2133        :tags: orm
2134        :tickets: 407
2135
2136      fixed bug in mapper refresh/expire whereby eager loaders didn't properly
2137      re-populate item lists
2138
2139    .. change::
2140        :tags: orm
2141        :tickets: 413
2142
2143      fix to post_update to ensure rows are updated even for non insert/delete
2144      scenarios
2145
2146    .. change::
2147        :tags: orm
2148        :tickets: 412
2149
2150      added an error message if you actually try to modify primary key values on
2151      an entity and then flush it
2152
2153    .. change::
2154        :tags: extensions
2155        :tickets: 426
2156
2157      added "validate=False" argument to assign_mapper, if True will ensure that
2158      only mapped attributes are named
2159
2160    .. change::
2161        :tags: extensions
2162        :tickets:
2163
2164      assign_mapper gets "options", "instances" functions added (i.e.
2165      MyClass.instances())
2166
2167.. changelog::
2168    :version: 0.3.3
2169    :released: Fri Dec 15 2006
2170
2171    .. change::
2172        :tags:
2173        :tickets:
2174
2175      string-based FROM clauses fixed, i.e. select(..., from_obj=["sometext"])
2176
2177    .. change::
2178        :tags:
2179        :tickets:
2180
2181      fixes to passive_deletes flag, lazy=None (noload) flag
2182
2183    .. change::
2184        :tags:
2185        :tickets:
2186
2187      added example/docs for dealing with large collections
2188
2189    .. change::
2190        :tags:
2191        :tickets:
2192
2193      added object_session() method to sqlalchemy namespace
2194
2195    .. change::
2196        :tags:
2197        :tickets:
2198
2199      fixed QueuePool bug whereby its better able to reconnect to a database
2200      that was not reachable (thanks to Sébastien Lelong), also fixed dispose()
2201      method
2202
2203    .. change::
2204        :tags:
2205        :tickets: 396
2206
2207      patch that makes MySQL rowcount work correctly!
2208
2209    .. change::
2210        :tags:
2211        :tickets:
2212
2213      fix to MySQL catch of 2006/2014 errors to properly re-raise OperationalError
2214      exception
2215
2216.. changelog::
2217    :version: 0.3.2
2218    :released: Sun Dec 10 2006
2219
2220    .. change::
2221        :tags:
2222        :tickets: 387
2223
2224      major connection pool bug fixed.  fixes MySQL out of sync
2225      errors, will also prevent transactions getting rolled back
2226      accidentally in all DBs
2227
2228    .. change::
2229        :tags:
2230        :tickets:
2231
2232      major speed enhancements vs. 0.3.1, to bring speed
2233      back to 0.2.8 levels
2234
2235    .. change::
2236        :tags:
2237        :tickets:
2238
2239      made conditional dozens of debug log calls that were
2240      time-intensive to generate log messages
2241
2242    .. change::
2243        :tags:
2244        :tickets:
2245
2246      fixed bug in cascade rules whereby the entire object graph
2247      could be unnecessarily cascaded on the save/update cascade
2248
2249    .. change::
2250        :tags:
2251        :tickets:
2252
2253      various speedups in attributes module
2254
2255    .. change::
2256        :tags:
2257        :tickets: 388
2258
2259      identity map in Session is by default *no longer weak referencing*.
2260      to have it be weak referencing, use create_session(weak_identity_map=True)
2261      fixes
2262
2263    .. change::
2264        :tags:
2265        :tickets:
2266
2267      MySQL detects errors 2006 (server has gone away) and 2014
2268      (commands out of sync) and invalidates the connection on which it occurred.
2269
2270    .. change::
2271        :tags:
2272        :tickets: 307
2273
2274      MySQL bool type fix:
2275
2276    .. change::
2277        :tags:
2278        :tickets: 382, 349
2279
2280      postgres reflection fixes:
2281
2282    .. change::
2283        :tags:
2284        :tickets: 247
2285
2286      added keywords for EXCEPT, INTERSECT, EXCEPT ALL, INTERSECT ALL
2287
2288    .. change::
2289        :tags:
2290        :tickets: 2110
2291
2292      assign_mapper in assignmapper extension returns the created mapper
2293
2294    .. change::
2295        :tags:
2296        :tickets:
2297
2298      added label() function to Select class, when scalar=True is used
2299      to create a scalar subquery
2300      i.e. "select x, y, (select max(foo) from table) AS foomax from table"
2301
2302    .. change::
2303        :tags:
2304        :tickets:
2305
2306      added onupdate and ondelete keyword arguments to ForeignKey; propagate
2307      to underlying ForeignKeyConstraint if present.  (don't propagate in the
2308      other direction, however)
2309
2310    .. change::
2311        :tags:
2312        :tickets:
2313
2314      fix to session.update() to preserve "dirty" status of incoming object
2315
2316    .. change::
2317        :tags:
2318        :tickets:
2319
2320      sending a selectable to an IN via the in_() function no longer creates
2321      a "union" out of multiple selects; only one selectable to a the in_() function
2322      is allowed now (make a union yourself if union is needed)
2323
2324    .. change::
2325        :tags:
2326        :tickets:
2327
2328      improved support for disabling save-update cascade via cascade="none" etc.
2329
2330    .. change::
2331        :tags:
2332        :tickets:
2333
2334      added "remote_side" argument to relation(), used only with self-referential
2335      mappers to force the direction of the parent/child relationship.  replaces
2336      the usage of the "foreignkey" parameter for "switching" the direction.
2337      "foreignkey" argument is deprecated for all uses and will eventually
2338      be replaced by an argument dedicated to ForeignKey specification on mappers.
2339
2340.. changelog::
2341    :version: 0.3.1
2342    :released: Mon Nov 13 2006
2343
2344    .. change::
2345        :tags: engine/pool
2346        :tickets:
2347
2348      some new Pool utility classes, updated docs
2349
2350    .. change::
2351        :tags: engine/pool
2352        :tickets:
2353
2354      "use_threadlocal" on Pool defaults to False (same as create_engine)
2355
2356    .. change::
2357        :tags: engine/pool
2358        :tickets:
2359
2360      fixed direct execution of Compiled objects
2361
2362    .. change::
2363        :tags: engine/pool
2364        :tickets:
2365
2366      create_engine() reworked to be strict about incoming \**kwargs.  all keyword
2367      arguments must be consumed by one of the dialect, connection pool, and engine
2368      constructors, else a TypeError is thrown which describes the full set of
2369      invalid kwargs in relation to the selected dialect/pool/engine configuration.
2370
2371    .. change::
2372        :tags: databases/types
2373        :tickets:
2374
2375      MySQL catches exception on "describe" and reports as NoSuchTableError
2376
2377    .. change::
2378        :tags: databases/types
2379        :tickets:
2380
2381      further fixes to sqlite booleans, weren't working as defaults
2382
2383    .. change::
2384        :tags: databases/types
2385        :tickets:
2386
2387      fix to postgres sequence quoting when using schemas
2388
2389    .. change::
2390        :tags: orm
2391        :tickets:
2392
2393      the "delete" cascade will load in all child objects, if they were not
2394      loaded already.  this can be turned off (i.e. the old behavior) by setting
2395      passive_deletes=True on a relation().
2396
2397    .. change::
2398        :tags: orm
2399        :tickets:
2400
2401      adjustments to reworked eager query generation to not fail on circular
2402      eager-loaded relationships (like backrefs)
2403
2404    .. change::
2405        :tags: orm
2406        :tickets:
2407
2408      fixed bug where eagerload() (nor lazyload()) option didn't properly
2409      instruct the Query whether or not to use "nesting" when producing a
2410      LIMIT query.
2411
2412    .. change::
2413        :tags: orm
2414        :tickets: 360
2415
2416      fixed bug in circular dependency sorting at flush time; if object A
2417      contained a cyclical many-to-one relationship to object B, and object B
2418      was just attached to object A, *but* object B itself wasn't changed,
2419      the many-to-one synchronize of B's primary key attribute to A's foreign key
2420      attribute wouldn't occur.
2421
2422    .. change::
2423        :tags: orm
2424        :tickets: 325
2425
2426      implemented from_obj argument for query.count, improves count function
2427      on selectresults
2428
2429    .. change::
2430        :tags: orm
2431        :tickets:
2432
2433      added an assertion within the "cascade" step of ORM relationships to check
2434      that the class of object attached to a parent object is appropriate
2435      (i.e. if A.items stores B objects, raise an error if a C is appended to A.items)
2436
2437    .. change::
2438        :tags: orm
2439        :tickets:
2440
2441      new extension sqlalchemy.ext.associationproxy, provides transparent
2442      "association object" mappings.  new example
2443      examples/association/proxied_association.py illustrates.
2444
2445    .. change::
2446        :tags: orm
2447        :tickets:
2448
2449      improvement to single table inheritance to load full hierarchies beneath
2450      the target class
2451
2452    .. change::
2453        :tags: orm
2454        :tickets: 362
2455
2456      fix to subtle condition in topological sort where a node could appear twice,
2457      for
2458
2459    .. change::
2460        :tags: orm
2461        :tickets: 365
2462
2463      additional rework to topological sort, refactoring, for
2464
2465    .. change::
2466        :tags: orm
2467        :tickets:
2468
2469      "delete-orphan" for a certain type can be set on more than one parent class;
2470      the instance is an "orphan" only if its not attached to *any* of those parents
2471
2472.. changelog::
2473    :version: 0.3.0
2474    :released: Sun Oct 22 2006
2475
2476    .. change::
2477        :tags: general
2478        :tickets:
2479
2480      logging is now implemented via standard python "logging" module.
2481      "echo" keyword parameters are still functional but set/unset
2482      log levels for their respective classes/instances.  all logging
2483      can be controlled directly through the Python API by setting
2484      INFO and DEBUG levels for loggers in the "sqlalchemy" namespace.
2485      class-level logging is under "sqlalchemy.<module>.<classname>",
2486      instance-level logging under "sqlalchemy.<module>.<classname>.0x..<00-FF>".
2487      Test suite includes "--log-info" and "--log-debug" arguments
2488      which work independently of --verbose/--quiet.  Logging added
2489      to orm to allow tracking of mapper configurations, row iteration.
2490
2491    .. change::
2492        :tags: general
2493        :tickets:
2494
2495      the documentation-generation system has been overhauled to be
2496      much simpler in design and more integrated with Markdown
2497
2498    .. change::
2499        :tags: sqlite
2500        :tickets:
2501
2502      sqlite boolean datatype converts False/True to 0/1 by default
2503
2504    .. change::
2505        :tags: sqlite
2506        :tickets: 335
2507
2508      fixes to Date/Time (SLDate/SLTime) types; works as good as postgres
2509      now
2510
2511    .. change::
2512        :tags: ms-sql
2513        :tickets:
2514
2515      fixes bug 261 (table reflection broken for MS-SQL case-sensitive
2516      databases)
2517
2518    .. change::
2519        :tags: ms-sql
2520        :tickets:
2521
2522      can now specify port for pymssql
2523
2524    .. change::
2525        :tags: ms-sql
2526        :tickets:
2527
2528      introduces new "auto_identity_insert" option for auto-switching
2529      between "SET IDENTITY_INSERT" mode when values specified for IDENTITY columns
2530
2531    .. change::
2532        :tags: ms-sql
2533        :tickets:
2534
2535      now supports multi-column foreign keys
2536
2537    .. change::
2538        :tags: ms-sql
2539        :tickets:
2540
2541      fix to reflecting date/datetime columns
2542
2543    .. change::
2544        :tags: ms-sql
2545        :tickets:
2546
2547      NCHAR and NVARCHAR type support added
2548
2549    .. change::
2550        :tags: oracle
2551        :tickets:
2552
2553      Oracle has experimental support for cx_Oracle.TIMESTAMP, which requires
2554      a setinputsizes() call on the cursor that is now enabled via the
2555      'auto_setinputsizes' flag to the oracle dialect.
2556
2557    .. change::
2558        :tags: firebird
2559        :tickets:
2560
2561      aliases do not use "AS"
2562
2563    .. change::
2564        :tags: firebird
2565        :tickets:
2566
2567      correctly raises NoSuchTableError when reflecting non-existent table
2568
2569    .. change::
2570        :tags: schema
2571        :tickets:
2572
2573      a fair amount of cleanup to the schema package, removal of ambiguous
2574      methods, methods that are no longer needed.  slightly more constrained
2575      usage, greater emphasis on explicitness
2576
2577    .. change::
2578        :tags: schema
2579        :tickets:
2580
2581      the "primary_key" attribute of Table and other selectables becomes
2582      a setlike ColumnCollection object; is ordered but not numerically
2583      indexed.  a comparison clause between two pks that are derived from the
2584      same underlying tables (i.e. such as two Alias objects) can be generated
2585      via table1.primary_key==table2.primary_key
2586
2587    .. change::
2588        :tags: schema
2589        :tickets:
2590
2591      ForeignKey(Constraint) supports "use_alter=True", to create/drop a foreign key
2592      via ALTER.  this allows circular foreign key relationships to be set up.
2593
2594    .. change::
2595        :tags: schema
2596        :tickets:
2597
2598      append_item() methods removed from Table and Column; preferably
2599      construct Table/Column/related objects inline, but if needed use
2600      append_column(), append_foreign_key(), append_constraint(), etc.
2601
2602    .. change::
2603        :tags: schema
2604        :tickets:
2605
2606      table.create() no longer returns the Table object, instead has no
2607      return value.  the usual case is that tables are created via metadata,
2608      which is preferable since it will handle table dependencies.
2609
2610    .. change::
2611        :tags: schema
2612        :tickets:
2613
2614      added UniqueConstraint (goes at Table level), CheckConstraint
2615      (goes at Table or Column level).
2616
2617    .. change::
2618        :tags: schema
2619        :tickets:
2620
2621      index=False/unique=True on Column now creates a UniqueConstraint,
2622      index=True/unique=False creates a plain Index,
2623      index=True/unique=True on Column creates a unique Index.  'index'
2624      and 'unique' keyword arguments to column are now boolean only; for
2625      explcit names and groupings of indexes or unique constraints, use the
2626      UniqueConstraint/Index constructs explicitly.
2627
2628    .. change::
2629        :tags: schema
2630        :tickets:
2631
2632      added autoincrement=True to Column; will disable schema generation
2633      of SERIAL/AUTO_INCREMENT/identity seq for postgres/mysql/mssql if
2634      explicitly set to False
2635
2636    .. change::
2637        :tags: schema
2638        :tickets:
2639
2640      TypeEngine objects now have methods to deal with copying and comparing
2641      values of their specific type.  Currently used by the ORM, see below.
2642
2643    .. change::
2644        :tags: schema
2645        :tickets:
2646
2647      fixed condition that occurred during reflection when a primary key
2648      column was explciitly overridden, where the PrimaryKeyConstraint would
2649      get both the reflected and the programmatic column doubled up
2650
2651    .. change::
2652        :tags: schema
2653        :tickets:
2654
2655      the "foreign_key" attribute on Column and ColumnElement in general
2656      is deprecated, in favor of the "foreign_keys" list/set-based attribute,
2657      which takes into account multiple foreign keys on one column.
2658      "foreign_key" will return the first element in the "foreign_keys" list/set
2659      or None if the list is empty.
2660
2661    .. change::
2662        :tags: connections/pooling/execution
2663        :tickets:
2664
2665      connection pool tracks open cursors and automatically closes them
2666      if connection is returned to pool with cursors still opened.  Can be
2667      affected by options which cause it to raise an error instead, or to
2668      do nothing.  fixes issues with MySQL, others
2669
2670    .. change::
2671        :tags: connections/pooling/execution
2672        :tickets:
2673
2674      fixed bug where Connection wouldn't lose its Transaction
2675      after commit/rollback
2676
2677    .. change::
2678        :tags: connections/pooling/execution
2679        :tickets:
2680
2681      added scalar() method to ComposedSQLEngine, ResultProxy
2682
2683    .. change::
2684        :tags: connections/pooling/execution
2685        :tickets:
2686
2687      ResultProxy will close() the underlying cursor when the ResultProxy
2688      itself is closed.  this will auto-close cursors for ResultProxy objects
2689      that have had all their rows fetched (or had scalar() called).
2690
2691    .. change::
2692        :tags: connections/pooling/execution
2693        :tickets:
2694
2695      ResultProxy.fetchall() internally uses DBAPI fetchall() for better efficiency,
2696      added to mapper iteration as well (courtesy Michael Twomey)
2697
2698    .. change::
2699        :tags: construction, sql
2700        :tickets: 292
2701
2702      changed "for_update" parameter to accept False/True/"nowait"
2703      and "read", the latter two of which are interpreted only by
2704      Oracle and MySQL
2705
2706    .. change::
2707        :tags: construction, sql
2708        :tickets:
2709
2710      added extract() function to sql dialect
2711      (SELECT extract(field FROM expr))
2712
2713    .. change::
2714        :tags: construction, sql
2715        :tickets:
2716
2717      BooleanExpression includes new "negate" argument to specify
2718      the appropriate negation operator if one is available.
2719
2720    .. change::
2721        :tags: construction, sql
2722        :tickets:
2723
2724      calling a negation on an "IN" or "IS" clause will result in
2725      "NOT IN", "IS NOT" (as opposed to NOT (x IN y)).
2726
2727    .. change::
2728        :tags: construction, sql
2729        :tickets: 172
2730
2731      Function objects know what to do in a FROM clause now.  their
2732      behavior should be the same, except now you can also do things like
2733      select(['*'], from_obj=[func.my_function()]) to get multiple
2734      columns from the result, or even use sql.column() constructs to name the
2735      return columns
2736
2737    .. change::
2738        :tags: orm
2739        :tickets:
2740
2741      attribute tracking modified to be more intelligent about detecting
2742      changes, particularly with mutable types.  TypeEngine objects now
2743      take a greater role in defining how to compare two scalar instances,
2744      including the addition of a MutableType mixin which is implemented by
2745      PickleType.  unit-of-work now tracks the "dirty" list as an expression
2746      of all persistent objects where the attribute manager detects changes.
2747      The basic issue that's fixed is detecting changes on PickleType
2748      objects, but also generalizes type handling and "modified" object
2749      checking to be more complete and extensible.
2750
2751    .. change::
2752        :tags: orm
2753        :tickets:
2754
2755      a wide refactoring to "attribute loader" and "options" architectures.
2756      ColumnProperty and PropertyLoader define their loading behavior via switchable
2757      "strategies", and MapperOptions no longer use mapper/property copying
2758      in order to function; they are instead propagated via QueryContext
2759      and SelectionContext objects at query/instances time.
2760      All of the internal copying of mappers and properties that was used to handle
2761      inheritance as well as options() has been removed; the structure
2762      of mappers and properties is much simpler than before and is clearly laid out
2763      in the new 'interfaces' module.
2764
2765    .. change::
2766        :tags: orm
2767        :tickets:
2768
2769      related to the mapper/property overhaul, internal refactoring to
2770      mapper instances() method to use a SelectionContext object to track
2771      state during the operation.
2772      SLIGHT API BREAKAGE: the append_result() and populate_instances()
2773      methods on MapperExtension have a slightly different method signature
2774      now as a result of the change; hoping that these methods are not
2775      in widespread use as of yet.
2776
2777    .. change::
2778        :tags: orm
2779        :tickets:
2780
2781      instances() method moved to Query now, backwards-compatible
2782      version remains on Mapper.
2783
2784    .. change::
2785        :tags: orm
2786        :tickets:
2787
2788      added contains_eager() MapperOption, used in conjunction with
2789      instances() to specify properties that should be eagerly loaded
2790      from the result set, using their plain column names by default, or translated
2791      given an custom row-translation function.
2792
2793    .. change::
2794        :tags: orm
2795        :tickets:
2796
2797      more rearrangements of unit-of-work commit scheme to better allow
2798      dependencies within circular flushes to work properly...updated
2799      task traversal/logging implementation
2800
2801    .. change::
2802        :tags: orm
2803        :tickets: 321
2804
2805      polymorphic mappers (i.e. using inheritance) now produces INSERT
2806      statements in order of tables across all inherited classes
2807
2808    .. change::
2809        :tags: orm
2810        :tickets:
2811
2812      added an automatic "row switch" feature to mapping, which will
2813      detect a pending instance/deleted instance pair with the same
2814      identity key and convert the INSERT/DELETE to a single UPDATE
2815
2816    .. change::
2817        :tags: orm
2818        :tickets:
2819
2820      "association" mappings simplified to take advantage of
2821      automatic "row switch" feature
2822
2823    .. change::
2824        :tags: orm
2825        :tickets: 212
2826
2827      "custom list classes" is now implemented via the "collection_class"
2828      keyword argument to relation().  the old way still works but is
2829      deprecated
2830
2831    .. change::
2832        :tags: orm
2833        :tickets:
2834
2835      added "viewonly" flag to relation(), allows construction of
2836      relations that have no effect on the flush() process.
2837
2838    .. change::
2839        :tags: orm
2840        :tickets: 292
2841
2842      added "lockmode" argument to base Query select/get functions,
2843      including "with_lockmode" function to get a Query copy that has
2844      a default locking mode.  Will translate "read"/"update"
2845      arguments into a for_update argument on the select side.
2846
2847    .. change::
2848        :tags: orm
2849        :tickets:
2850
2851      implemented "version check" logic in Query/Mapper, used
2852      when version_id_col is in effect and query.with_lockmode()
2853      is used to get() an instance that's already loaded
2854
2855    .. change::
2856        :tags: orm
2857        :tickets: 208
2858
2859      post_update behavior improved; does a better job at not
2860      updating too many rows, updates only required columns
2861
2862    .. change::
2863        :tags: orm
2864        :tickets: 308
2865
2866      adjustments to eager loading so that its "eager chain" is
2867      kept separate from the normal mapper setup, thereby
2868      preventing conflicts with lazy loader operation, fixes
2869
2870    .. change::
2871        :tags: orm
2872        :tickets:
2873
2874      fix to deferred group loading
2875
2876    .. change::
2877        :tags: orm
2878        :tickets: 346
2879
2880      session.flush() wont close a connection it opened
2881
2882    .. change::
2883        :tags: orm
2884        :tickets:
2885
2886      added "batch=True" flag to mapper; if False, save_obj
2887      will fully save one object at a time including calls
2888      to before_XXXX and after_XXXX
2889
2890    .. change::
2891        :tags: orm
2892        :tickets:
2893
2894      added "column_prefix=None" argument to mapper; prepends the
2895      given string (typically '_') to column-based attributes automatically
2896      set up from the mapper's Table
2897
2898    .. change::
2899        :tags: orm
2900        :tickets: 315
2901
2902      specifying joins in the from_obj argument of query.select() will
2903      replace the main table of the query, if the table is somewhere within
2904      the given from_obj.  this makes it possible to produce custom joins and
2905      outerjoins in queries without the main table getting added twice.
2906
2907    .. change::
2908        :tags: orm
2909        :tickets:
2910
2911      eagerloading is adjusted to more thoughtfully attach its LEFT OUTER JOINs
2912      to the given query, looking for custom "FROM" clauses that may have
2913      already been set up.
2914
2915    .. change::
2916        :tags: orm
2917        :tickets:
2918
2919      added join_to and outerjoin_to transformative methods to SelectResults,
2920      to build up join/outerjoin conditions based on property names. also
2921      added select_from to explicitly set from_obj parameter.
2922
2923    .. change::
2924        :tags: orm
2925        :tickets:
2926
2927      removed "is_primary" flag from mapper.
2928