Commit Graph

9721 Commits

Author SHA1 Message Date
Mike Bayer 145db3bed7 - repair merge failure 2015-02-19 12:01:22 -05:00
Mike Bayer b86b239c87 - autopep8 2015-02-19 11:37:44 -05:00
Mike Bayer 3209a73b92 - Mapped state internals have been reworked to allow for a 50% reduction
in callcounts specific to the "expiration" of objects, as in
the "auto expire" feature of :meth:`.Session.commit` and
for :meth:`.Session.expire_all`, as well as in the "cleanup" step
which occurs when object states are garbage collected.
fixes #3307
2015-02-18 16:08:19 -05:00
Mike Bayer 3eff76c4b0 - add the test_expire_lots test for comparison 2015-02-18 15:50:37 -05:00
Mike Bayer 94d57374c4 - add a new section regarding multiprocessing 2015-02-17 13:43:48 -05:00
Mike Bayer 3c46eb17ed - additional mysql cast-related test fixes 2015-02-09 20:49:19 -05:00
Mike Bayer af42398742 - The MySQL dialect now supports CAST on types that are constructed
as :class:`.TypeDecorator` objects.
2015-02-09 20:43:28 -05:00
Mike Bayer 0843bbcfbb - add a fix to MySQL re: #3074 tests, make sure we check table is present 2015-02-09 20:32:53 -05:00
Mike Bayer 8750596c11 - test skips for MySQL w new cast warning 2015-02-09 20:32:06 -05:00
Mike Bayer 1ad236127c - A warning is emitted when :func:.cast is used with the MySQL
dialect on a type where MySQL does not support CAST; MySQL only
supports CAST on a subset of datatypes.   SQLAlchemy has for a long
time just omitted the CAST for unsupported types in the case of
MySQL.  While we don't want to change this now, we emit a warning
to show that it's taken place.   A warning is also emitted when
a CAST is used with an older MySQL version (< 4) that doesn't support
CAST at all, it's skipped in this case as well.
fixes #3237
2015-02-09 15:29:14 -05:00
Mike Bayer 03038f7e75 - flake8 2015-02-09 15:08:52 -05:00
Mike Bayer 81aa5b376e - Literal values within a :class:.DefaultClause, which is invoked
when using the :paramref:`.Column.server_default` parameter, will
now be rendered using the "inline" compiler, so that they are rendered
as-is, rather than as bound parameters.
fixes #3087
2015-02-09 14:58:26 -05:00
Mike Bayer 53da71fcc2 - remove meaningless assignment 2015-02-08 20:14:37 -05:00
Mike Bayer 7b9134be71 - test + changelog 2015-02-08 19:58:34 -05:00
Mike Bayer a7c8cf0f2f Merge remote-tracking branch 'origin/pr/147' into pr147
Conflicts:
	lib/sqlalchemy/orm/query.py
2015-02-08 19:50:41 -05:00
Mike Bayer ab1f7d2058 - add versionadded for service_name 2015-02-08 19:13:21 -05:00
Malthe Borch 02c072edbb It's the 'kwargs' which are iterable, not 'keys' 2014-10-30 10:49:37 +01:00
Mike Bayer d2c1edfb15 - added new backend for pysqlcipher, as we will probably get
requests for it soon.
2014-10-29 14:55:42 -04:00
Mike Bayer e1d1d999c9 changelog 2014-10-26 16:49:44 -04:00
jlgoldb2 2083ccfbcf changed connnection to connection 2014-10-26 00:01:42 -07:00
Mike Bayer 393470c7ab typo 2014-10-23 02:10:01 -04:00
Mike Bayer 3be8da4860 move this into behavioral changes 2014-10-23 02:00:42 -04:00
Mike Bayer 445b9e2aff - Fixed bug in single table inheritance where a chain of joins
that included the same single inh entity more than once
(normally this should raise an error) could, in some cases
depending on what was being joined "from", implicitly alias the
second case of the single inh entity, producing
a query that "worked".   But as this implicit aliasing is not
intended in the case of single table inheritance, it didn't
really "work" fully and was very misleading, since it wouldn't
always appear.
fixes #3233
2014-10-23 01:54:10 -04:00
Mike Bayer 47d316ec66 - Fixed bug where the ON clause for :meth:.Query.join,
and :meth:`.Query.outerjoin` to a single-inheritance subclass
using ``of_type()`` would not render the "single table criteria" in
the ON clause if the ``from_joinpoint=True`` flag were set.
fixes #3232
2014-10-23 00:43:11 -04:00
Mike Bayer 56d5732fbd - changelog for pullreq github:139
- add support for self-referential foreign keys to move over as well when
the table name is changed.
2014-10-21 17:58:51 -04:00
Mike Bayer 0ae140aa98 Merge remote-tracking branch 'origin/pr/139' into pr139 2014-10-21 17:29:40 -04:00
Mike Bayer fee776dde0 - changelog 2014-10-21 17:27:37 -04:00
Mike Bayer 233d9c1bc0 Merge remote-tracking branch 'origin/pr/137' into pr137 2014-10-21 17:24:14 -04:00
Mike Bayer ade27f35cb - Reversing a change that was made in 0.9, the "singleton" nature
of the "constants" :func:`.null`, :func:`.true`, and :func:`.false`
has been reverted.   These functions returning a "singleton" object
had the effect that different instances would be treated as the
same regardless of lexical use, which in particular would impact
the rendering of the columns clause of a SELECT statement.
fixes #3170
2014-10-19 18:26:14 -04:00
Mike Bayer 38bc809841 - Fixed bug where :meth:.Session.expunge would not fully detach
the given object if the object had been subject to a delete
operation that was flushed, but not committed.  This would also
affect related operations like :func:`.make_transient`.
fixes #3139
2014-10-19 16:53:45 -04:00
Mike Bayer dddb74bbd3 - control the module name of the exception here for py3k compat 2014-10-19 13:37:48 -04:00
Mike Bayer b88f9e555e - for #3230, scale back the check to only look at columns that
already have more than one ForeignKeyConstraint referring to them.
This limits the check to what we hope is the most common case,
but we benefit that the memory and config-time impact is scaled back
dramatically.
2014-10-19 06:43:53 -04:00
Mike Bayer 55cad302ce - A warning is emitted in the case of multiple relationships that
ultimately will populate a foreign key column in conflict with
another, where the relationships are attempting to copy values
from different source columns.  This occurs in the case where
composite foreign keys with overlapping columns are mapped to
relationships that each refer to a different referenced column.
A new documentation section illustrates the example as well as how
to overcome the issue by specifying "foreign" columns specifically
on a per-relationship basis.
fixes #3230
2014-10-19 00:01:50 -04:00
Mike Bayer a7c1258d03 - flake8 2014-10-18 22:32:07 -04:00
Mike Bayer 6f40eb37cb - Exception messages have been spiffed up a bit. The SQL statement
and parameters are not displayed if None, reducing confusion for
error messages that weren't related to a statement.  The full
module and classname for the DBAPI-level exception is displayed,
making it clear that this is a wrapped DBAPI exception.  The
statement and parameters themselves are bounded within a bracketed
sections to better isolate them from the error message and from
each other.
fixes #3172
2014-10-17 19:37:45 -04:00
Mike Bayer 2924f8685c pep8 2014-10-17 19:29:32 -04:00
Mike Bayer 61a4a89d99 - The :meth:.Query.update method will now convert string key
names in the given dictionary of values into mapped attribute names
against the mapped class being updated.  Previously, string names
were taken in directly and passed to the core update statement without
any means to resolve against the mapped entity.  Support for synonyms
and hybrid attributes as the subject attributes of
:meth:`.Query.update` are also supported.
fixes #3228
2014-10-16 14:36:56 -04:00
Mike Bayer a02664869c - fix imports
- pep8
2014-10-16 13:30:51 -04:00
mozillazg d06e9c361f Fixed typo 2014-10-15 21:40:19 +08:00
Mike Bayer 6de1a87870 - Improvements to the mechanism used by :class:.Session to locate
"binds" (e.g. engines to use), such engines can be associated with
mixin classes, concrete subclasses, as well as a wider variety
of table metadata such as joined inheritance tables.
fixes #3035
2014-10-14 14:04:17 -04:00
Mike Bayer 1e5ffa029a - move BindTest into orm/test_binds 2014-10-14 12:07:38 -04:00
Mike Bayer fb09ad7551 - The `__module__` attribute is now set for all those SQL and
ORM functions that are derived as "public factory" symbols, which
should assist with documentation tools being able to report on the
target module.
fixes #3218
2014-10-14 11:59:48 -04:00
Mike Bayer 09e2a15a80 - merge 0.9.8 release date 2014-10-13 13:17:24 -04:00
Mike Bayer 198917237e - additional issues fixed in mysqlconnector 2.0.1 2014-10-13 12:37:42 -04:00
Mike Bayer e04b693e7c - this test passes now in more recent mysqlconnector 2014-10-13 12:34:41 -04:00
Mike Bayer 50d2432a9e - Mysqlconnector as of version 2.0, probably as a side effect of
the  python 3 merge, now does not expect percent signs (e.g.
as used as the modulus operator and others) to be doubled,
even when using the "pyformat" bound parameter format (this
change is not documented by Mysqlconnector).  The dialect now
checks for py2k and for mysqlconnector less than version 2.0
when detecting if the modulus operator should be rendered as
``%%`` or ``%``.
- Unicode SQL is now passed for MySQLconnector version 2.0 and above;
for Py2k and MySQL < 2.0, strings are encoded.  Note that mysqlconnector
as of 2.0.1 appears to have a bug with unicode DDL on py2k, so the tests here
are skipping until we observe it's fixed.
- take out profiling on mysqlconnector, callcounts vary too much with
its current development speed
2014-10-12 20:14:32 -04:00
Mike Bayer 0426d174e4 - the test_except test was doing an unnecessary workaround of some kind,
take that out, restore the better exception logic in exc
2014-10-12 19:37:14 -04:00
Mike Bayer 6d5c03001c - roll back part of pr 140 to get exception wrapping working again 2014-10-12 09:54:44 -04:00
Mike Bayer f7b119705a Merge remote-tracking branch 'origin/pr/140' into pr140 2014-10-11 20:08:27 -04:00
Mike Bayer 216b88894d add more order by here 2014-10-11 19:02:32 -04:00