summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
Commit message (Collapse)AuthorAgeFilesLines
* dialects/mysql: inspect superclass for IntegerType in __repr__pr/53pr/52Haydn Dufrene2013-12-171-0/+4
| | | | This was causing issues with Alembic (https://bitbucket.org/zzzeek/alembic/issue/127/auto-generate-seems-to-miss-unsigned)
* python2.5 fixMike Bayer2013-12-081-1/+1
|
* - documentation cleanup in ORM including [ticket:2816]Mike Bayer2013-12-073-35/+80
| | | | | Conflicts: lib/sqlalchemy/orm/mapper.py
* - A DBAPI that raises an error on ``connect()`` which is not a subclassMike Bayer2013-12-071-1/+1
| | | | | | | | | | | | of dbapi.Error (such as ``TypeError``, ``NotImplementedError``, etc.) will propagate the exception unchanged. Previously, the error handling specific to the ``connect()`` routine would both inappropriately run the exception through the dialect's :meth:`.Dialect.is_disconnect` routine as well as wrap it in a :class:`sqlalchemy.exc.DBAPIError`. It is now propagated unchanged in the same way as occurs within the execute process. [ticket:2881] - add tests for this in test_parseconnect, but also add tests in test_execute to ensure the execute() behavior as well
* - restore having the connection closed before decrementing the overflow counterMike Bayer2013-12-061-2/+4
|
* - The :class:`.QueuePool` has been enhanced to not block new connectionMike Bayer2013-12-061-31/+33
| | | | | | | | attempts when an existing connection attempt is blocking. Previously, the production of new connections was serialized within the block that monitored overflow; the overflow counter is now altered within it's own critical section outside of the connection process itself. [ticket:2880]
* - Made a slight adjustment to the logic which waits for a pooledMike Bayer2013-12-061-2/+8
| | | | | | | | | | | connection to be available, such that for a connection pool with no timeout specified, it will every half a second break out of the wait to check for the so-called "abort" flag, which allows the waiter to break out in case the whole connection pool was dumped; normally the waiter should break out due to a notify_all() but it's possible this notify_all() is missed in very slim cases. This is an extension of logic first introduced in 0.8.0, and the issue has only been observed occasionally in stress tests.
* Fix MSSQL dialects visit_drop_index to use the correct DDLdonkopotamus2013-12-051-5/+3
|
* fix for 2.5Mike Bayer2013-12-041-1/+1
|
* - move tests for unique constraints to dialect suite, includingMike Bayer2013-12-032-1/+49
| | | | requirements etc., just like 0.9
* - backport unique constraints reflection to 0.8.4, therebyRoman Podolyaka2013-12-035-5/+101
| | | | | | | | | | | | | | | assisting with alembic installations that have upgraded and are dealing with PG index/unique constraint reflection. Inspection API already supports reflection of table indexes information and those also include unique constraints (at least for PostgreSQL and MySQL). But it could be actually useful to distinguish between indexes and plain unique constraints (though both are implemented in the same way internally in RDBMS). This change adds a new method to Inspection API - get_unique_constraints() and implements it for SQLite, PostgreSQL and MySQL dialects.
* - Added ORA-02396 "maximum idle time" error code to list ofMike Bayer2013-12-031-1/+2
| | | | "is disconnect" codes with cx_oracle. [ticket:2864]
* - reduce verbiage in mutation.py regarding legacy style, place under ↵Mike Bayer2013-11-291-7/+3
| | | | | | | versionadded Conflicts: lib/sqlalchemy/ext/mutable.py
* Merge pull request #47 from yoloseem/patch-2mike bayer2013-11-291-1/+1
|\ | | | | Fixed a syntax error in example code.
| * Fixed a syntax error in example code.pr/47Hyunjun Kim2013-11-211-1/+1
| |
* | - Fixed bug where SQL statement would be improperly ASCII-encodedMike Bayer2013-11-221-1/+1
| | | | | | | | | | | | | | | | | | | | when a pre-DBAPI :class:`.StatementError` were raised within :meth:`.Connection.execute`, causing encoding errors for non-ASCII statements. The stringification now remains within Python unicode thus avoiding encoding errors. [ticket:2871] Conflicts: test/engine/test_execute.py
* | Fixed bug where Oracle ``VARCHAR`` types given with no lengthMike Bayer2013-11-221-1/+3
| | | | | | | | | | (e.g. for a ``CAST`` or similar) would incorrectly render ``None CHAR`` or similar. [ticket:2870]
* | py3k fix for non-ascii SQL stringsMike Bayer2013-11-211-2/+3
| |
* | - Fixed bug which prevented the ``serializer`` extension from workingMike Bayer2013-11-212-8/+9
|/ | | | | | | | | | correctly with table or column names that contain non-ASCII characters. [ticket:2869] Conflicts: lib/sqlalchemy/ext/serializer.py lib/sqlalchemy/sql/selectable.py lib/sqlalchemy/testing/assertions.py
* Fix cross referencesVraj Mohan2013-11-142-3/+3
|
* Ensure API generation and fix cross referencesVraj Mohan2013-11-141-2/+5
|
* Ensure API doc for make_url and resolve referencesVraj Mohan2013-11-141-2/+2
|
* Fix indentation and escape *args and **kwargsVraj Mohan2013-11-142-3/+3
|
* - Fixed a regression introduced by :ticket:`2818` where the EXISTSMike Bayer2013-10-301-1/+1
| | | | | | query being generated would produce a "columns being replaced" warning for a statement with two same-named columns, as the internal SELECT wouldn't have use_labels set.
* merge the same fix from masterMike Bayer2013-10-281-1/+1
|
* - Fixed bug where index reflection would mis-interpret indkey valuesMike Bayer2013-10-272-2/+5
| | | | | | | | | | when using the pypostgresql adapter, which returns these values as lists vs. psycopg2's return type of string. [ticket:2855] Conflicts: doc/build/changelog/changelog_09.rst lib/sqlalchemy/__init__.py
* - Fixed bug where Oracle table reflection using synonyms would failMike Bayer2013-10-251-5/+7
| | | | | if the synonym and the table were in different remote schemas. Patch to fix courtesy Kyle Derr. [ticket:2853]
* - The regexp used by the :func:`.url.make_url` function now parsesMike Bayer2013-10-231-2/+11
| | | | ipv6 addresses, e.g. surrounded by brackets. [ticket:2851]
* - Fixed bug where :func:`.type_coerce` would not interpret ORMMike Bayer2013-10-211-2/+2
| | | | | | | | elements with a ``__clause_element__()`` method properly. [ticket:2849] Conflicts: lib/sqlalchemy/sql/elements.py
* - add a type_coerce() step within Enum, Boolean to the CHECK constraint,Mike Bayer2013-10-202-3/+6
| | | | | | | | | | | | so that the custom type isn't exposed to an operation that is against the "impl" type's constraint, [ticket:2842] - this change showed up as some recursion overflow in pickling with labels, add a __reduce__() there....pickling of expressions is less and less something that's very viable... Conflicts: lib/sqlalchemy/sql/elements.py lib/sqlalchemy/sql/sqltypes.py
* - attempt to clarify what mutable extension does for HSTORE, [ticket:2803]Mike Bayer2013-10-181-2/+9
|
* - Removed a 128-character truncation from the reflection of theMike Bayer2013-10-181-2/+1
| | | | | | server default for a column; this code was original from PG system views which truncated the string for readability. [ticket:2844]
* - The change in :ticket:`2721`, which is that the ``deferrable`` keywordMike Bayer2013-10-181-0/+56
| | | | | | | | | | | | | | | | | of :class:`.ForeignKeyConstraint` is silently ignored on the MySQL backend, will be reverted as of 0.9; this keyword will now render again, raising errors on MySQL as it is not understood - the same behavior will also apply to the ``initially`` keyword. In 0.8, the keywords will remain ignored but a warning is emitted. Additionally, the ``match`` keyword now raises a :class:`.CompileError` on 0.9 and emits a warning on 0.8; this keyword is not only silently ignored by MySQL but also breaks the ON UPDATE/ON DELETE options. To use a :class:`.ForeignKeyConstraint` that does not render or renders differently on MySQL, use a custom compilation option. An example of this usage has been added to the documentation, see :ref:`mysql_foreign_keys`. [ticket:2721] [ticket:2839]
* The ``.unique`` flag on :class:`.Index` could be produced as ``None``Mike Bayer2013-10-141-1/+6
| | | | | | | | | if it was generated from a :class:`.Column` that didn't specify ``unique`` (where it defaults to ``None``). The flag will now always be ``True`` or ``False``. [ticket:2825] Conflicts: lib/sqlalchemy/sql/schema.py
* workaround for #2838 here. still need to figure out why an ENUM test is ↵Mike Bayer2013-10-141-0/+7
| | | | suddenly hitting this.
* alphabetical orderingMike Bayer2013-10-131-17/+17
|
* - Added new option to :func:`.relationship` ``distinct_target_key``.Mike Bayer2013-10-133-5/+40
| | | | | | | | | | | | | | | | | | This enables the subquery eager loader strategy to apply a DISTINCT to the innermost SELECT subquery, to assist in the case where duplicate rows are generated by the innermost query which corresponds to this relationship (there's not yet a general solution to the issue of dupe rows within subquery eager loading, however, when joins outside of the innermost subquery produce dupes). When the flag is set to ``True``, the DISTINCT is rendered unconditionally, and when it is set to ``None``, DISTINCT is rendered if the innermost relationship targets columns that do not comprise a full primary key. The option defaults to False in 0.8 (e.g. off by default in all cases), None in 0.9 (e.g. automatic by default). Thanks to Alexander Koval for help with this. [ticket:2836] Conflicts: lib/sqlalchemy/orm/relationships.py
* MySQL-connector dialect now allows options in the create_engineMike Bayer2013-10-131-2/+3
| | | | | | query string to override those defaults set up in the connect, including "buffered" and "raise_on_warnings". [ticket:2515]
* Parenthesis will be applied to a compound SQL expression asMike Bayer2013-10-121-1/+4
| | | | | rendered in the column list of a CREATE INDEX statement. [ticket:2742]
* - Fixed bug in default compiler plus those of postgresql, mysql, andMike Bayer2013-10-125-14/+17
| | | | | | | | | | | mssql to ensure that any literal SQL expression values are rendered directly as literals, instead of as bound parameters, within a CREATE INDEX statement. [ticket:2742] - don't need expression_as_ddl(); literal_binds and include_table take care of this functionality. Conflicts: lib/sqlalchemy/sql/util.py
* A :func:`.select` that is made to refer to itself in its FROM clause,Mike Bayer2013-10-081-0/+3
| | | | | | | | | typically via in-place mutation, will raise an informative error message rather than causing a recursion overflow. [ticket:2815] Conflicts: lib/sqlalchemy/sql/selectable.py
* Fixed bug where using an annotation such as :func:`.remote` orMike Bayer2013-10-081-1/+6
| | | | | | | | | | :func:`.foreign` on a :class:`.Column` before association with a parent :class:`.Table` could produce issues related to the parent table not rendering within joins, due to the inherent copy operation performed by an annotation. [ticket:2813] Conflicts: lib/sqlalchemy/sql/elements.py
* Non-working "schema" argument on :class:`.ForeignKey` is deprecated;Mike Bayer2013-10-081-0/+8
| | | | raises a warning. Removed in 0.9. [ticket:2831]
* Fix a typo: evaluted -> evaluated.pr/32Hyunjun Kim2013-10-081-1/+1
|
* - put exact version string in the testMike Bayer2013-09-291-2/+2
| | | | - use match with a .* preceding instead of search
* Merge pull request #26 from hackop/ticket_2819mike bayer2013-09-291-1/+1
| | | | re.match to re.search
* Merge pull request #25 from gthb/ticket_2821mike bayer2013-09-292-3/+10
| | | | | | Hide password in URL and Engine __repr__ Conflicts: lib/sqlalchemy/engine/url.py
* Fixed Query.exists() method for the case, when query doesn't have any ↵Vladimir Magamedov2013-09-041-1/+1
| | | | | | | filters applied. Conflicts: doc/build/changelog/changelog_09.rst
* plus some more adjustments for mysql, or in general if an Index refers toMike Bayer2013-08-281-1/+9
| | | | in-python only cols
* Fixed bug where using the ``column_reflect`` event to change the ``.key``Mike Bayer2013-08-281-6/+17
| | | | | | | | | of the incoming :class:`.Column` would prevent primary key constraints, indexes, and foreign key constraints from being correctly reflected. Also in 0.8.3. [ticket:2811] Conflicts: doc/build/changelog/changelog_09.rst