summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
Commit message (Collapse)AuthorAgeFilesLines
* fix passing literal_binds flag through for update and insertpr/232Tim Tate2016-02-022-4/+5
|
* Merge branch 'master' of https://bitbucket.org/carlrivers/sqlalchemyMike Bayer2016-02-021-2/+1
|\
| * Merged zzzeek/sqlalchemy into masterCarlos Rivas2016-01-2658-2090/+3371
| |\
| * | Removed entry that causes AttributeError (#3621) - Oracle zxJDBC fails with ↵Carlos Rivas2016-01-231-2/+1
| | | | | | | | | | | | AttributeError in object OracleCompiler_zxjdbc
* | | - add changelog and migration notes for new Enum features,Mike Bayer2016-02-022-74/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixes #3095, #3292 - reorganize enum constructor to again work with the MySQL ENUM type - add a new create_constraint flag to Enum to complement that of Boolean - reinstate the CHECK constraint tests for enum, these already fail /skip against the MySQL backend - simplify lookup rules in Enum, have them apply to all varieties of Enum equally
* | | - Initial implementation of support for PEP-435 enumerated typesAlex Grönholm2016-02-021-5/+72
| | | | | | | | | | | | within the Enum type.
* | | - Fixed issue where inadvertent use of the Python ``__contains__``Mike Bayer2016-02-022-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | override with a column expression (e.g. by using ``'x' in col``) would cause an endless loop in the case of an ARRAY type, as Python defers this to ``__getitem__`` access which never raises for this type. Overall, all use of ``__contains__`` now raises NotImplementedError. fixes #3642
* | | - put a retry in for PG database provisioning as it locksMike Bayer2016-01-291-1/+14
| | | | | | | | | | | | on database use
* | | - The ``sqlalchemy.dialects.postgres`` module, long deprecated, isMike Bayer2016-01-292-18/+9
| | | | | | | | | | | | | | | | | | | | | removed; this has emitted a warning for many years and projects should be calling upon ``sqlalchemy.dialects.postgresql``. Engine URLs of the form ``postgres://`` will still continue to function, however.
* | | - happy new yearMike Bayer2016-01-29174-174/+174
| | |
* | | - use a StaticPool for componentreflectiontest to ensureMike Bayer2016-01-281-7/+16
| | | | | | | | | | | | | | | temp tables are reflectable on the same session they were created
* | | - use schema argument correctly when we are dropping for a schemaMike Bayer2016-01-281-1/+1
| | |
* | | - revert the change first made in a6fe4dc, as we are now generalizingMike Bayer2016-01-282-14/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the warning here to all safe_reraise() cases in Python 2. - Revisiting :ticket:`2696`, first released in 1.0.10, which attempts to work around Python 2's lack of exception context reporting by emitting a warning for an exception that was interrupted by a second exception when attempting to roll back the already-failed transaction; this issue continues to occur for MySQL backends in conjunction with a savepoint that gets unexpectedly lost, which then causes a "no such savepoint" error when the rollback is attempted, obscuring what the original condition was. The approach has been generalized to the Core "safe reraise" function which takes place across the ORM and Core in any place that a transaction is being rolled back in response to an error which occurred trying to commit, including the context managers provided by :class:`.Session` and :class:`.Connection`, and taking place for operations such as a failure on "RELEASE SAVEPOINT". Previously, the fix was only in place for a specific path within the ORM flush/commit process; it now takes place for all transational context managers as well. fixes #2696
* | | - reinstate "dont set up integer index in keymap if we're on cexts",Mike Bayer2016-01-272-6/+11
| | | | | | | | | | | | | | | and this time also fix the cext itself to properly handle int vs. long on py2k
* | | Revert "- dont set up integer index in keymap if we're on cexts"Mike Bayer2016-01-271-10/+5
| | | | | | | | | | | | | | | | | | This reverts commit de0d144a395c31eb74084177df95a4858b830f88. Apparently the test suite is not using the cextensions correctly at the moment.
* | | - dont set up integer index in keymap if we're on cextsMike Bayer2016-01-271-5/+10
| | |
* | | - unfortunately we need to match within join where col.key does not matchMike Bayer2016-01-261-2/+1
| |/ |/| | | | | | | what's given so we need to use a set() here. contains_column is not within any performance paths
* | - rework ColumnCollection to no longer persist "all_col_set"; we don'tMike Bayer2016-01-261-20/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | need this collection except in the extend/update uses where we create it ad-hoc. simplifies pickling. Compatibility with 1.0 should be OK as ColumnColleciton uses __getstate__ in any case and the __setstate__ contract hasn't changed. - Fixed bug in :class:`.Table` metadata construct which appeared around the 0.9 series where adding columns to a :class:`.Table` that was unpickled would fail to correctly establish the :class:`.Column` within the 'c' collection, leading to issues in areas such as ORM configuration. This could impact use cases such as ``extend_existing`` and others. fixes #3632
* | - The workaround for right-nested joins on SQLite, where they are rewrittenMike Bayer2016-01-262-7/+14
| | | | | | | | | | | | | | | | | | | | as subqueries in order to work around SQLite's lack of support for this syntax, is lifted when SQLite version 3.7.16 or greater is detected. fixes #3634 - The workaround for SQLite's unexpected delivery of column names as ``tablename.columnname`` for some kinds of queries is now disabled when SQLite version 3.10.0 or greater is detected. fixes #3633
* | - add a new qualifier "native" vs. "dbapi" unicode to avoidMike Bayer2016-01-241-0/+5
| | | | | | | | | | | | profiling problems here - add extras_require to setup.py for the most common DBAPIs - rework tox.ini to use extras, specify a test matrix built in
* | - use uuid fragments for provision names to enable multiple test suitesMike Bayer2016-01-231-2/+2
| | | | | | | | per server
* | - documenation updates to clarify specific SQLite versionsMike Bayer2016-01-211-2/+14
| | | | | | | | | | | | | | | | | | that have problems with right-nested joins and UNION column keys; references #3633 references #3634. backport from 1.1 to 0.9 announcing 1.1 as where these behaviors will be retired based on version-specific checks - fix test_resultset so that it passes when SQLite 3.10.0 is present, references #3633
* | - Added new parameter :paramref:`.orm.mapper.passive_deletes` toMike Bayer2016-01-202-1/+44
| | | | | | | | | | | | | | | | available mapper options. This allows a DELETE to proceed for a joined-table inheritance mapping against the base table only, while allowing for ON DELETE CASCADE to handle deleting the row from the subclass tables. fixes #2349
* | - The unsupported Sybase dialect now raises ``NotImplementedError``Mike Bayer2016-01-201-5/+1
| | | | | | | | | | when attempting to compile a query that includes "offset"; Sybase has no straightforward "offset" feature. fixes #2278
* | - generalize the verbiage on LargeBinary so that it doesn'tMike Bayer2016-01-201-10/+5
| | | | | | | | create confusion for inherited classes such as BYTEA, fixes
* | - update oracle JDBC driver URL, fixes #3554Mike Bayer2016-01-201-2/+1
| |
* | - cross link for concrete helper classesMike Bayer2016-01-201-0/+16
| | | | | | | | | | - remove redundant concrete helper docs from declarative docs, two places is enough
* | - add a note that the literal_binds flag should be usedMike Bayer2016-01-201-1/+11
| | | | | | | | when cross-compiling from DDL to SQL, fixes #3615
* | Fix ArrayOfEnum's handling of empty arrays.pr/229Chase2016-01-191-1/+1
| | | | | | Prior to this change a value of `'{}'` would split into the list `['']`.
* | - the order in which _generate_backref() for different mappers is calledMike Bayer2016-01-191-1/+1
| | | | | | | | | | is random; therefore it may be called against the subclass mapper first, so need to check .concrete on both sides, references #3630
* | - calling str() on a core sql construct has been made more "friendly",Mike Bayer2016-01-196-2/+56
| | | | | | | | | | | | | | | | | | | | when the construct contains non-standard sql elements such as returning, array index operations, or dialect-specific or custom datatypes. a string is now returned in these cases rendering an approximation of the construct (typically the postgresql-style version of it) rather than raising an error. fixes #3631 - add within_group to top-level imports - add eq_ignore_whitespace to sqlalchemy.testing imports
* | - Fixed issue where two same-named relationships that refer toMike Bayer2016-01-192-10/+16
| | | | | | | | | | | | | | | | a base class and a concrete-inherited subclass would raise an error if those relationships were set up using "backref", while setting up the identical configuration using relationship() instead with the conflicting names would succeed, as is allowed in the case of a concrete mapping. fixes #3630
* | - The ``str()`` call for :class:`.Query` will now take into accountMike Bayer2016-01-192-7/+29
| | | | | | | | | | | | | | | | | | | | | | | | the :class:`.Engine` to which the :class:`.Session` is bound, when generating the string form of the SQL, so that the actual SQL that would be emitted to the database is shown, if possible. Previously, only the engine associated with the :class:`.MetaData` to which the mappings are associated would be used, if present. If no bind can be located either on the :class:`.Session` or on the :class:`.MetaData` to which the mappings are associated, then the "default" dialect is used to render the SQL, as was the case previously. fixes #3081
* | - Fixed bug where some exception re-raise scenarios would attachMike Bayer2016-01-181-12/+12
| | | | | | | | | | | | | | | | the exception to itself as the "cause"; while the Python 3 interpreter is OK with this, it could cause endless loops in iPython. fixes #3625 - add tests for reraise, raise_from_cause - raise_from_cause is the same on py2k/3k, use just one function
* | - A deep improvement to the recently added :meth:`.TextClause.columns`Mike Bayer2016-01-146-154/+355
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | method, and its interaction with result-row processing, now allows the columns passed to the method to be positionally matched with the result columns in the statement, rather than matching on name alone. The advantage to this includes that when linking a textual SQL statement to an ORM or Core table model, no system of labeling or de-duping of common column names needs to occur, which also means there's no need to worry about how label names match to ORM columns and so-forth. In addition, the :class:`.ResultProxy` has been further enhanced to map column and string keys to a row with greater precision in some cases. fixes #3501 - reorganize the initialization of ResultMetaData for readability and complexity; use the name "cursor_description", define the task of "merging" cursor_description with compiled column information as its own function, and also define "name extraction" as a separate task. - fully change the name we use in the "ambiguous column" error to be the actual name that was ambiguous, modify the C ext also
* | - fix some old verbiage that refers to text() as an "implicit" thingMike Bayer2016-01-141-8/+7
| | | | | | | | | | for SQL fragments; we've deprecated that in 1.0 and its a good idea to document like this for 0.9 as well.
* | - convert keys to str for None not sortable against str on py3kMike Bayer2016-01-121-1/+1
| |
* | Remove quote on first DATEPART paramaterGuillaume DOUMENC2016-01-121-1/+1
| |
* | - reorganize schema_translate_map to be succinct and gain the performanceMike Bayer2016-01-1110-62/+124
| | | | | | | | back by using an attrgetter for the default case
* | - refactor a bit the loader options system to make it a bit moreMike Bayer2016-01-101-31/+38
| | | | | | | | | | intelligible, given the fixes for ref #3623. unfortunately the system is still quite weird even though it was rewritten to be... less weird
* | - fix link to types in metadata, fixes #3618Mike Bayer2016-01-101-1/+1
| | | | | | | | | | | | - fix "version" got whacked into "f" in core tutorial - fix short underline in automap - fix unmatched boldface in session events
* | - ensure we use a Connection for effective schema here since Engine doesn'tMike Bayer2016-01-092-1/+3
| | | | | | | | have it; keep it simple
* | - Fixed regression since 0.9 where the 0.9 style loader optionsMike Bayer2016-01-092-4/+23
| | | | | | | | | | | | | | system failed to accommodate for multiple :func:`.undefer_group` loader options in a single query. Multiple :func:`.undefer_group` options will now be taken into account even against the same entity. fixes #3623
* | - Multi-tenancy schema translation for :class:`.Table` objects is added.Mike Bayer2016-01-089-44/+157
| | | | | | | | | | | | | | | | | | This supports the use case of an application that uses the same set of :class:`.Table` objects in many schemas, such as schema-per-user. A new execution option :paramref:`.Connection.execution_options.schema_translate_map` is added. fixes #2685 - latest tox doesn't like the {posargs} in the profile rerunner
* | - fix docstringsMike Bayer2016-01-081-15/+16
| |
* | Merged in jvanasco/sqlalchemy-alt/issue_docs_scoped_session (pull request #50)Mike Bayer2016-01-071-4/+11
|\ \ | | | | | | | | | updated docstrings for orm.scoping
| * | updated sphinx tagetingjonathan vanasco2015-04-021-8/+10
| | |
| * | updates to scoping docs to make `.session_factory` appear publicjonathan vanasco2015-04-021-2/+7
| | |
* | | - pg8000 fixes for jsonMike Bayer2016-01-073-0/+9
| | |
* | | - add limiting criteria to the JSON tests so that we don'tMike Bayer2016-01-061-3/+16
| | | | | | | | | | | | | | | | | | attempt integer indexed access from a key/value object nor string access from an integer-indexed array, as earlier Postgresql versions (prior to 9.4) don't allow this