Sqlalchemy

Latest version: v2.0.31

Safety actively analyzes 640296 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 43 of 50

0.5.0beta1

:released: Thu Jun 12 2008

.. change::
:tags:
:tickets:

The "__init__" trigger/decorator added by mapper now attempts
to exactly mirror the argument signature of the original
__init__. The pass-through for '_sa_session' is no longer
implicit- you must allow for this keyword argument in your
constructor.

.. change::
:tags:
:tickets:

ClassState is renamed to ClassManager.

.. change::
:tags:
:tickets:

Classes may supply their own InstrumentationManager by
providing a __sa_instrumentation_manager__ property.

.. change::
:tags:
:tickets:

Custom instrumentation may use any mechanism to associate a
ClassManager with a class and an InstanceState with an
instance. Attributes on those objects are still the default
association mechanism used by SQLAlchemy's native
instrumentation.

.. change::
:tags:
:tickets:

Moved entity_name, _sa_session_id, and _instance_key from the
instance object to the instance state. These values are still
available in the old way, which is now deprecated, using
descriptors attached to the class. A deprecation warning will
be issued when accessed.

.. change::
:tags:
:tickets:

The _prepare_instrumentation alias for prepare_instrumentation
has been removed.

.. change::
:tags:
:tickets:

sqlalchemy.exceptions has been renamed to sqlalchemy.exc. The
module may be imported under either name.

.. change::
:tags:
:tickets:

ORM-related exceptions are now defined in sqlalchemy.orm.exc.
ConcurrentModificationError, FlushError, and
UnmappedColumnError compatibility aliases are installed in
sqlalchemy.exc during the import of sqlalchemy.orm.

.. change::
:tags:
:tickets:

sqlalchemy.logging has been renamed to sqlalchemy.log.

.. change::
:tags:
:tickets:

The transitional sqlalchemy.log.SADeprecationWarning alias for
the warning's definition in sqlalchemy.exc has been removed.

.. change::
:tags:
:tickets:

exc.AssertionError has been removed and usage replaced with
Python's built-in AssertionError.

.. change::
:tags:
:tickets:

The behavior of MapperExtensions attached to multiple,
entity_name= primary mappers for a single class has been
altered. The first mapper() defined for a class is the only
mapper eligible for the MapperExtension 'instrument_class',
'init_instance' and 'init_failed' events. This is backwards
incompatible; previously the extensions of last mapper defined
would receive these events.

.. change::
:tags: firebird
:tickets:

Added support for returning values from inserts (2.0+ only),
updates and deletes (2.1+ only).

.. change::
:tags: general
:tickets:

global "propigate"->"propagate" change.

.. change::
:tags: orm
:tickets:

polymorphic_union() function respects the "key" of each
Column if they differ from the column's name.

.. change::
:tags: orm
:tickets: 1199

Fixed 0.4-only bug preventing composite columns
from working properly with inheriting mappers

.. change::
:tags: orm
:tickets:

Fixed RLock-related bug in mapper which could deadlock upon
reentrant mapper compile() calls, something that occurs when
using declarative constructs inside of ForeignKey objects.
Ported from 0.5.

.. change::
:tags: orm
:tickets: 1213

Fixed bug in composite types which prevented a primary-key
composite type from being mutated.

.. change::
:tags: orm
:tickets: 976

Added ScopedSession.is_active accessor.

.. change::
:tags: orm
:tickets: 939

Class-bound accessor can be used as the argument to
relation() order_by.

.. change::
:tags: orm
:tickets: 1072

Fixed shard_id argument on ShardedSession.execute().

.. change::
:tags: sql
:tickets: 1246

Connection.invalidate() checks for closed status
to avoid attribute errors.

.. change::
:tags: sql
:tickets: 1094

NullPool supports reconnect on failure behavior.

.. change::
:tags: sql
:tickets: 1299

The per-dialect cache used by TypeEngine to cache
dialect-specific types is now a WeakKeyDictionary.
This to prevent dialect objects from
being referenced forever for an application that
creates an arbitrarily large number of engines
or dialects. There is a small performance penalty
which will be resolved in 0.6.

.. change::
:tags: sql
:tickets:

Fixed SQLite reflection methods so that non-present
cursor.description, which triggers an auto-cursor
close, will be detected so that no results doesn't
fail on recent versions of pysqlite which raise
an error when fetchone() called with no rows present.

.. change::
:tags: postgres
:tickets: 714

Added Index reflection support to Postgres, using a
great patch we long neglected, submitted by
Ken Kuhlman.

.. change::
:tags: mysql
:tickets: 1241

Fixed bug in exception raise when FK columns not present
during reflection.

.. change::
:tags: oracle
:tickets: 1265

Fixed bug which was preventing out params of certain types
from being received; thanks a ton to huddlej at wwu.edu !


=============
0.6 Changelog
=============


.. changelog::

0.4.8

Not secure
:released: Sun Oct 12 2008

.. change::
:tags: orm
:tickets: 1039

Fixed bug regarding inherit_condition passed
with "A=B" versus "B=A" leading to errors

.. change::
:tags: orm
:tickets:

Changes made to new, dirty and deleted
collections in
SessionExtension.before_flush() will take
effect for that flush.

.. change::
:tags: orm
:tickets:

Added label() method to InstrumentedAttribute
to establish forwards compatibility with 0.5.

.. change::
:tags: sql
:tickets: 1074

column.in_(someselect) can now be used as
a columns-clause expression without the subquery
bleeding into the FROM clause

.. change::
:tags: mysql
:tickets: 1146

Added MSMediumInteger type.

.. change::
:tags: sqlite
:tickets: 968

Supplied a custom strftime() function which
handles dates before 1900.

.. change::
:tags: sqlite
:tickets:

String's (and Unicode's, UnicodeText's, etc.)
convert_unicode logic disabled in the sqlite dialect,
to adjust for pysqlite 2.5.0's new requirement that
only Python unicode objects are accepted;
https://itsystementwicklung.de/pipermail/list-pysqlite/2008-March/000018.html

.. change::
:tags: oracle
:tickets: 1155

has_sequence() now takes schema name into account

.. change::
:tags: oracle
:tickets: 1121

added BFILE to the list of reflected types

.. changelog::
:version: 0.4.7p1
:released: Thu Jul 31 2008

.. change::
:tags: orm
:tickets:

Added "add()" and "add_all()" to scoped_session
methods. Workaround for 0.4.7::

from sqlalchemy.orm.scoping import ScopedSession, instrument

setattr(ScopedSession, "add", instrument("add"))
setattr(ScopedSession, "add_all", instrument("add_all"))

.. change::
:tags: orm
:tickets:

Fixed non-2.3 compatible usage of set() and generator
expression within relation().

.. changelog::

0.4.7

Not secure
:released: Sat Jul 26 2008

.. change::
:tags: orm
:tickets: 1058

The contains() operator when used with many-to-many
will alias() the secondary (association) table so
that multiple contains() calls will not conflict
with each other

.. change::
:tags: orm
:tickets:

fixed bug preventing merge() from functioning in
conjunction with a comparable_property()

.. change::
:tags: orm
:tickets:

the enable_typechecks=False setting on relation()
now only allows subtypes with inheriting mappers.
Totally unrelated types, or subtypes not set up with
mapper inheritance against the target mapper are
still not allowed.

.. change::
:tags: orm
:tickets: 976

Added is_active flag to Sessions to detect when
a transaction is in progress. This
flag is always True with a "transactional"
(in 0.5 a non-"autocommit") Session.

.. change::
:tags: sql
:tickets:

Fixed bug when calling select([literal('foo')])
or select([bindparam('foo')]).

.. change::
:tags: schema
:tickets: 571

create_all(), drop_all(), create(), drop() all raise
an error if the table name or schema name contains
more characters than that dialect's configured
character limit. Some DB's can handle too-long
table names during usage, and SQLA can handle this
as well. But various reflection/
checkfirst-during-create scenarios fail since we are
looking for the name within the DB's catalog tables.

.. change::
:tags: schema
:tickets: 571, 820

The index name generated when you say "index=True"
on a Column is truncated to the length appropriate
for the dialect. Additionally, an Index with a too-
long name cannot be explicitly dropped with
Index.drop(), similar to.

.. change::
:tags: postgres
:tickets:

Repaired server_side_cursors to properly detect
text() clauses.

.. change::
:tags: postgres
:tickets: 1092

Added PGCidr type.

.. change::
:tags: mysql
:tickets:

Added 'CALL' to the list of SQL keywords which return
result rows.

.. change::
:tags: oracle
:tickets:

Oracle get_default_schema_name() "normalizes" the name
before returning, meaning it returns a lower-case name
when the identifier is detected as case insensitive.

.. change::
:tags: oracle
:tickets: 709

creating/dropping tables takes schema name into account
when searching for the existing table, so that tables
in other owner namespaces with the same name do not
conflict

.. change::
:tags: oracle
:tickets: 1062

Cursors now have "arraysize" set to 50 by default on
them, the value of which is configurable using the
"arraysize" argument to create_engine() with the
Oracle dialect. This to account for cx_oracle's default
setting of "1", which has the effect of many round trips
being sent to Oracle. This actually works well in
conjunction with BLOB/CLOB-bound cursors, of which
there are any number available but only for the life of
that row request (so BufferedColumnRow is still needed,
but less so).

.. change::
:tags: oracle
:tickets:

sqlite
- add SLFloat type, which matches the SQLite REAL
type affinity. Previously, only SLNumeric was provided
which fulfills NUMERIC affinity, but that's not the
same as REAL.

.. changelog::

0.4.6

Not secure
:released: Sat May 10 2008

.. change::
:tags: orm
:tickets:

Fix to the recent relation() refactoring which fixes
exotic viewonly relations which join between local and
remote table multiple times, with a common column shared
between the joins.

.. change::
:tags: orm
:tickets:

Also re-established viewonly relation() configurations
that join across multiple tables.

.. change::
:tags: orm
:tickets: 610

Added experimental relation() flag to help with
primaryjoins across functions, etc.,
_local_remote_pairs=[tuples]. This complements a complex
primaryjoin condition allowing you to provide the
individual column pairs which comprise the relation's
local and remote sides. Also improved lazy load SQL
generation to handle placing bind params inside of
functions and other expressions. (partial progress
towards)

.. change::
:tags: orm
:tickets: 1036

repaired single table inheritance such that you
can single-table inherit from a joined-table inheriting
mapper without issue.

.. change::
:tags: orm
:tickets: 1027

Fixed "concatenate tuple" bug which could occur with
Query.order_by() if clause adaption had taken place.

.. change::
:tags: orm
:tickets:

Removed ancient assertion that mapped selectables require
"alias names" - the mapper creates its own alias now if
none is present. Though in this case you need to use the
class, not the mapped selectable, as the source of column
attributes - so a warning is still issued.

.. change::
:tags: orm
:tickets:

fixes to the "exists" function involving inheritance (any(),
has(), ~contains()); the full target join will be rendered
into the EXISTS clause for relations that link to subclasses.

.. change::
:tags: orm
:tickets:

restored usage of append_result() extension method for primary
query rows, when the extension is present and only a single-
entity result is being returned.

.. change::
:tags: orm
:tickets:

Also re-established viewonly relation() configurations that
join across multiple tables.

.. change::
:tags: orm
:tickets:

removed ancient assertion that mapped selectables require
"alias names" - the mapper creates its own alias now if
none is present. Though in this case you need to use
the class, not the mapped selectable, as the source of
column attributes - so a warning is still issued.

.. change::
:tags: orm
:tickets: 1015

refined mapper._save_obj() which was unnecessarily calling
__ne__() on scalar values during flush

.. change::
:tags: orm
:tickets: 1019

added a feature to eager loading whereby subqueries set
as column_property() with explicit label names (which is not
necessary, btw) will have the label anonymized when
the instance is part of the eager join, to prevent
conflicts with a subquery or column of the same name
on the parent object.

.. change::
:tags: orm
:tickets:

set-based collections \|=, -=, ^= and &= are stricter about
their operands and only operate on sets, frozensets or
subclasses of the collection type. Previously, they would
accept any duck-typed set.

.. change::
:tags: orm
:tickets:

added an example dynamic_dict/dynamic_dict.py, illustrating
a simple way to place dictionary behavior on top of
a dynamic_loader.

.. change::
:tags: declarative, extension
:tickets:

Joined table inheritance mappers use a slightly relaxed
function to create the "inherit condition" to the parent
table, so that other foreign keys to not-yet-declared
Table objects don't trigger an error.

.. change::
:tags: declarative, extension
:tickets:

fixed reentrant mapper compile hang when
a declared attribute is used within ForeignKey,
ie. ForeignKey(MyOtherClass.someattribute)

.. change::
:tags: sql
:tickets:

Added COLLATE support via the .collate(<collation>)
expression operator and collate(<expr>, <collation>) sql
function.

.. change::
:tags: sql
:tickets:

Fixed bug with union() when applied to non-Table connected
select statements

.. change::
:tags: sql
:tickets: 1014

improved behavior of text() expressions when used as
FROM clauses, such as select().select_from(text("sometext"))

.. change::
:tags: sql
:tickets: 1021

Column.copy() respects the value of "autoincrement",
fixes usage with Migrate

.. change::
:tags: engines
:tickets:

Pool listeners can now be provided as a dictionary of
callables or a (possibly partial) duck-type of
PoolListener, your choice.

.. change::
:tags: engines
:tickets:

added "rollback_returned" option to Pool which will
disable the rollback() issued when connections are
returned. This flag is only safe to use with a database
which does not support transactions (i.e. MySQL/MyISAM).

.. change::
:tags: ext
:tickets:

set-based association proxies \|=, -=, ^= and &= are
stricter about their operands and only operate on sets,
frozensets or other association proxies. Previously, they
would accept any duck-typed set.

.. change::
:tags: mssql
:tickets: 1005

Added "odbc_autotranslate" parameter to engine / dburi
parameters. Any given string will be passed through to the
ODBC connection string as:

"AutoTranslate=%s" % odbc_autotranslate

.. change::
:tags: mssql
:tickets:

Added "odbc_options" parameter to engine / dburi
parameters. The given string is simply appended to the
SQLAlchemy-generated odbc connection string.

This should obviate the need of adding a myriad of ODBC
options in the future.

.. change::
:tags: firebird
:tickets:

Handle the "SUBSTRING(:string FROM :start FOR :length)"
builtin.

.. changelog::

0.4.5

Not secure
:released: Fri Apr 04 2008

.. change::
:tags: orm
:tickets:

A small change in behavior to session.merge() - existing
objects are checked for based on primary key attributes, not
necessarily _instance_key. So the widely requested
capability, that:

x = MyObject(id=1)
x = sess.merge(x)

will in fact load MyObject with id 1 from the database if
present, is now available. merge() still copies the state
of the given object to the persistent one, so an example
like the above would typically have copied "None" from all
attributes of "x" onto the persistent copy. These can be
reverted using session.expire(x).

.. change::
:tags: orm
:tickets:

Also fixed behavior in merge() whereby collection elements
present on the destination but not the merged collection
were not being removed from the destination.

.. change::
:tags: orm
:tickets: 995

Added a more aggressive check for "uncompiled mappers",
helps particularly with declarative layer

.. change::
:tags: orm
:tickets:

The methodology behind "primaryjoin"/"secondaryjoin" has
been refactored. Behavior should be slightly more
intelligent, primarily in terms of error messages which
have been pared down to be more readable. In a slight
number of scenarios it can better resolve the correct
foreign key than before.

.. change::
:tags: orm
:tickets:

Added comparable_property(), adds query Comparator
behavior to regular, unmanaged Python properties

.. change::
:tags: orm, Company.employees.of_type(Engineer), 'machines'
:tickets:

the functionality of query.with_polymorphic() has
been added to mapper() as a configuration option.

It's set via several forms:
with_polymorphic='*'
with_polymorphic=[mappers]
with_polymorphic=('*', selectable)
with_polymorphic=([mappers], selectable)

This controls the default polymorphic loading strategy
for inherited mappers. When a selectable is not given,
outer joins are created for all joined-table inheriting
mappers requested. Note that the auto-create of joins
is not compatible with concrete table inheritance.

The existing select_table flag on mapper() is now
deprecated and is synonymous with
with_polymorphic('*', select_table). Note that the
underlying "guts" of select_table have been
completely removed and replaced with the newer,
more flexible approach.

The new approach also automatically allows eager loads
to work for subclasses, if they are present, for
example::

sess.query(Company).options(eagerload_all())

to load Company objects, their employees, and the
'machines' collection of employees who happen to be
Engineers. A "with_polymorphic" Query option should be
introduced soon as well which would allow per-Query
control of with_polymorphic() on relations.

.. change::
:tags: orm
:tickets:

added two "experimental" features to Query,
"experimental" in that their specific name/behavior
is not carved in stone just yet: _values() and
_from_self(). We'd like feedback on these.

- _values(\*columns) is given a list of column
expressions, and returns a new Query that only
returns those columns. When evaluated, the return
value is a list of tuples just like when using
add_column() or add_entity(), the only difference is
that "entity zero", i.e. the mapped class, is not
included in the results. This means it finally makes
sense to use group_by() and having() on Query, which
have been sitting around uselessly until now.

A future change to this method may include that its
ability to join, filter and allow other options not
related to a "resultset" are removed, so the feedback
we're looking for is how people want to use
_values()...i.e. at the very end, or do people prefer
to continue generating after it's called.

- _from_self() compiles the SELECT statement for the
Query (minus any eager loaders), and returns a new
Query that selects from that SELECT. So basically you
can query from a Query without needing to extract the
SELECT statement manually. This gives meaning to
operations like query[3:5]._from_self().filter(some
criterion). There's not much controversial here
except that you can quickly create highly nested
queries that are less efficient, and we want feedback
on the naming choice.

.. change::
:tags: orm
:tickets:

query.order_by() and query.group_by() will accept
multiple arguments using \*args (like select()
already does).

.. change::
:tags: orm
:tickets:

Added some convenience descriptors to Query:
query.statement returns the full SELECT construct,
query.whereclause returns just the WHERE part of the
SELECT construct.

.. change::
:tags: orm
:tickets:

Fixed/covered case when using a False/0 value as a
polymorphic discriminator.

.. change::
:tags: orm
:tickets:

Fixed bug which was preventing synonym() attributes from
being used with inheritance

.. change::
:tags: orm
:tickets: 996

Fixed SQL function truncation of trailing underscores

.. change::
:tags: orm
:tickets:

When attributes are expired on a pending instance, an
error will not be raised when the "refresh" action is
triggered and no result is found.

.. change::
:tags: orm
:tickets:

Session.execute can now find binds from metadata

.. change::
:tags: orm
:tickets:

Adjusted the definition of "self-referential" to be any
two mappers with a common parent (this affects whether or
not aliased=True is required when joining with Query).

.. change::
:tags: orm
:tickets:

Made some fixes to the "from_joinpoint" argument to
query.join() so that if the previous join was aliased and
this one isn't, the join still happens successfully.

.. change::
:tags: orm
:tickets: 895

Assorted "cascade deletes" fixes:
- Fixed "cascade delete" operation of dynamic relations,
which had only been implemented for foreign-key
nulling behavior in 0.4.2 and not actual cascading
deletes

- Delete cascade without delete-orphan cascade on a
many-to-one will not delete orphans which were
disconnected from the parent before session.delete()
is called on the parent (one-to-many already had
this).

- Delete cascade with delete-orphan will delete orphans
whether or not it remains attached to its also-deleted
parent.

- delete-orphan cascade is properly detected on relations
that are present on superclasses when using inheritance.

.. change::
:tags: orm
:tickets:

Fixed order_by calculation in Query to properly alias
mapper-config'ed order_by when using select_from()

.. change::
:tags: orm
:tickets:

Refactored the diffing logic that kicks in when replacing
one collection with another into collections.bulk_replace,
useful to anyone building multi-level collections.

.. change::
:tags: orm
:tickets:

Cascade traversal algorithm converted from recursive to
iterative to support deep object graphs.

.. change::
:tags: sql
:tickets: 999

schema-qualified tables now will place the schemaname
ahead of the tablename in all column expressions as well
as when generating column labels. This prevents cross-
schema name collisions in all cases

.. change::
:tags: sql
:tickets:

can now allow selects which correlate all FROM clauses
and have no FROM themselves. These are typically
used in a scalar context, i.e. SELECT x, (SELECT x WHERE y)
FROM table. Requires explicit correlate() call.

.. change::
:tags: sql
:tickets:

'name' is no longer a required constructor argument for
Column(). It (and .key) may now be deferred until the
column is added to a Table.

.. change::
:tags: sql
:tickets: 791, 993

like(), ilike(), contains(), startswith(), endswith() take
an optional keyword argument "escape=<somestring>", which
is set as the escape character using the syntax "x LIKE y
ESCAPE '<somestring>'".

.. change::
:tags: sql
:tickets:

random() is now a generic sql function and will compile to
the database's random implementation, if any.

.. change::
:tags: sql
:tickets:

update().values() and insert().values() take keyword
arguments.

.. change::
:tags: sql
:tickets:

Fixed an issue in select() regarding its generation of
FROM clauses, in rare circumstances two clauses could be
produced when one was intended to cancel out the other.
Some ORM queries with lots of eager loads might have seen
this symptom.

.. change::
:tags: sql
:tickets:

The case() function now also takes a dictionary as its
whens parameter. It also interprets the "THEN"
expressions as values by default, meaning case([(x==y,
"foo")]) will interpret "foo" as a bound value, not a SQL
expression. use text(expr) for literal SQL expressions in
this case. For the criterion itself, these may be literal
strings only if the "value" keyword is present, otherwise
SA will force explicit usage of either text() or
literal().

.. change::
:tags: oracle
:tickets:

The "owner" keyword on Table is now deprecated, and is
exactly synonymous with the "schema" keyword. Tables can
now be reflected with alternate "owner" attributes,
explicitly stated on the Table object or not using
"schema".

.. change::
:tags: oracle
:tickets:

All of the "magic" searching for synonyms, DBLINKs etc.
during table reflection are disabled by default unless you
specify "oracle_resolve_synonyms=True" on the Table
object. Resolving synonyms necessarily leads to some
messy guessing which we'd rather leave off by default.
When the flag is set, tables and related tables will be
resolved against synonyms in all cases, meaning if a
synonym exists for a particular table, reflection will use
it when reflecting related tables. This is stickier
behavior than before which is why it's off by default.

.. change::
:tags: declarative, extension
:tickets:

The "synonym" function is now directly usable with
"declarative". Pass in the decorated property using the
"descriptor" keyword argument, e.g.: somekey =
synonym('_somekey', descriptor=property(g, s))

.. change::
:tags: declarative, extension
:tickets:

The "deferred" function is usable with "declarative".
Simplest usage is to declare deferred and Column together,
e.g.: data = deferred(Column(Text))

.. change::
:tags: declarative, extension
:tickets:

Declarative also gained synonym_for(...) and
comparable_using(...), front-ends for synonym and
comparable_property.

.. change::
:tags: declarative, extension
:tickets: 995

Improvements to mapper compilation when using declarative;
already-compiled mappers will still trigger compiles of
other uncompiled mappers when used

.. change::
:tags: declarative, extension
:tickets:

Declarative will complete setup for Columns lacking names,
allows a more DRY syntax.

class Foo(Base):
__tablename__ = 'foos'
id = Column(Integer, primary_key=True)

.. change::
:tags: declarative, extension
:tickets:

inheritance in declarative can be disabled when sending
"inherits=None" to __mapper_args__.

.. change::
:tags: declarative, extension
:tickets:

declarative_base() takes optional kwarg "mapper", which
is any callable/class/method that produces a mapper,
such as declarative_base(mapper=scopedsession.mapper).
This property can also be set on individual declarative
classes using the "__mapper_cls__" property.

.. change::
:tags: postgres
:tickets: 1001

Got PG server side cursors back into shape, added fixed
unit tests as part of the default test suite. Added
better uniqueness to the cursor ID

.. change::
:tags: oracle
:tickets:

The "owner" keyword on Table is now deprecated, and is
exactly synonymous with the "schema" keyword. Tables can
now be reflected with alternate "owner" attributes,
explicitly stated on the Table object or not using
"schema".

.. change::
:tags: oracle
:tickets:

All of the "magic" searching for synonyms, DBLINKs etc.
during table reflection are disabled by default unless you
specify "oracle_resolve_synonyms=True" on the Table
object. Resolving synonyms necessarily leads to some
messy guessing which we'd rather leave off by default.
When the flag is set, tables and related tables will be
resolved against synonyms in all cases, meaning if a
synonym exists for a particular table, reflection will use
it when reflecting related tables. This is stickier
behavior than before which is why it's off by default.

.. change::
:tags: mssql
:tickets: 979

Reflected tables will now automatically load other tables
which are referenced by Foreign keys in the auto-loaded
table,.

.. change::
:tags: mssql
:tickets: 916

Added executemany check to skip identity fetch,.

.. change::
:tags: mssql
:tickets: 884

Added stubs for small date type.

.. change::
:tags: mssql
:tickets:

Added a new 'driver' keyword parameter for the pyodbc dialect.
Will substitute into the ODBC connection string if given,
defaults to 'SQL Server'.

.. change::
:tags: mssql
:tickets:

Added a new 'max_identifier_length' keyword parameter for
the pyodbc dialect.

.. change::
:tags: mssql
:tickets:

Improvements to pyodbc + Unix. If you couldn't get that
combination to work before, please try again.

.. change::
:tags: mysql
:tickets:

The connection.info keys the dialect uses to cache server
settings have changed and are now namespaced.

.. changelog::

0.4.4

Not secure
:released: Wed Mar 12 2008

.. change::
:tags: sql
:tickets: 975

Can again create aliases of selects against textual FROM
clauses.

.. change::
:tags: sql
:tickets:

The value of a bindparam() can be a callable, in which
case it's evaluated at statement execution time to get the
value.

.. change::
:tags: sql
:tickets: 978

Added exception wrapping/reconnect support to result set
fetching. Reconnect works for those databases that raise
a catchable data error during results (i.e. doesn't work
on MySQL)

.. change::
:tags: sql
:tickets: 936

Implemented two-phase API for "threadlocal" engine, via
engine.begin_twophase(), engine.prepare()

.. change::
:tags: sql
:tickets: 986

Fixed bug which was preventing UNIONS from being
cloneable.

.. change::
:tags: sql
:tickets:

Added "bind" keyword argument to insert(), update(),
delete() and DDL(). The .bind property is now assignable
on those statements as well as on select().

.. change::
:tags: sql
:tickets:

Insert statements can now be compiled with extra "prefix"
words between INSERT and INTO, for vendor extensions like
MySQL's INSERT IGNORE INTO table.

.. change::
:tags: orm
:tickets:

any(), has(), contains(), ~contains(), attribute level ==
and != now work properly with self-referential relations -
the clause inside the EXISTS is aliased on the "remote"
side to distinguish it from the parent table. This
applies to single table self-referential as well as
inheritance-based self-referential.

.. change::
:tags: orm
:tickets: 985

Repaired behavior of == and != operators at the relation()
level when compared against NULL for one-to-one relations

.. change::
:tags: orm
:tickets:

Fixed bug whereby session.expire() attributes were not
loading on an polymorphically-mapped instance mapped by a
select_table mapper.

.. change::
:tags: orm
:tickets:

Added query.with_polymorphic() - specifies a list of
classes which descend from the base class, which will be
added to the FROM clause of the query. Allows subclasses
to be used within filter() criterion as well as eagerly
loads the attributes of those subclasses.

.. change::
:tags: orm
:tickets:

Your cries have been heard: removing a pending item from
an attribute or collection with delete-orphan expunges the
item from the session; no FlushError is raised. Note that
if you session.save()'ed the pending item explicitly, the
attribute/collection removal still knocks it out.

.. change::
:tags: orm
:tickets:

session.refresh() and session.expire() raise an error when
called on instances which are not persistent within the
session

.. change::
:tags: orm
:tickets:

Fixed potential generative bug when the same Query was
used to generate multiple Query objects using join().

.. change::
:tags: orm
:tickets:

Fixed bug which was introduced in 0.4.3, whereby loading
an already-persistent instance mapped with joined table
inheritance would trigger a useless "secondary" load from
its joined table, when using the default "select"
polymorphic_fetch. This was due to attributes being
marked as expired during its first load and not getting
unmarked from the previous "secondary" load. Attributes
are now unexpired based on presence in __dict__ after any
load or commit operation succeeds.

.. change::
:tags: orm
:tickets:

Deprecated Query methods apply_sum(), apply_max(),
apply_min(), apply_avg(). Better methodologies are
coming....

.. change::
:tags: orm
:tickets:

relation() can accept a callable for its first argument,
which returns the class to be related. This is in place
to assist declarative packages to define relations without
classes yet being in place.

.. change::
:tags: orm
:tickets:

Added a new "higher level" operator called "of_type()":
used in join() as well as with any() and has(), qualifies
the subclass which will be used in filter criterion, e.g.:

query.filter(Company.employees.of_type(Engineer).
any(Engineer.name=='foo'))

or

query.join(Company.employees.of_type(Engineer)).
filter(Engineer.name=='foo')

.. change::
:tags: orm
:tickets:

Preventive code against a potential lost-reference bug in
flush().

.. change::
:tags: orm
:tickets:

Expressions used in filter(), filter_by() and others, when
they make usage of a clause generated from a relation
using the identity of a child object (e.g.,
filter(Parent.child==<somechild>)), evaluate the actual
primary key value of <somechild> at execution time so that
the autoflush step of the Query can complete, thereby
populating the PK value of <somechild> in the case that
<somechild> was pending.

.. change::
:tags: orm
:tickets:

setting the relation()-level order by to a column in the
many-to-many "secondary" table will now work with eager
loading, previously the "order by" wasn't aliased against
the secondary table's alias.

.. change::
:tags: orm
:tickets:

Synonyms riding on top of existing descriptors are now
full proxies to those descriptors.

.. change::
:tags: dialects
:tickets:

Invalid SQLite connection URLs now raise an error.

.. change::
:tags: dialects
:tickets: 981

postgres TIMESTAMP renders correctly

.. change::
:tags: dialects
:tickets:

postgres PGArray is a "mutable" type by default; when used
with the ORM, mutable-style equality/ copy-on-write
techniques are used to test for changes.

.. change::
:tags: extensions
:tickets:

a new super-small "declarative" extension has been added,
which allows Table and mapper() configuration to take
place inline underneath a class declaration. This
extension differs from ActiveMapper and Elixir in that it
does not redefine any SQLAlchemy semantics at all; literal
Column, Table and relation() constructs are used to define
the class behavior and table definition.

.. changelog::

Page 43 of 50

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.