summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* bump 4088 to test ticket autocloseoriginMike Bayer2017-09-261-0/+1
| | | | | | | Issue resolved in 35a1f5481a28837490037a6bd99d63590f748933 Change-Id: Ie1acae3d14467916b479192aebb5860ab31992f1 Fixes: #4088
* Merge branch 'patch-1' of https://github.com/irushchyshyn/sqlalchemyMike Bayer2017-09-261-1/+1
|\
| * Fix noseplugin to accept `zeroarg_callback` for `--dbs` optionIryna Shcherbina2017-09-261-1/+1
| | | | | | ./sqla_nose.py --dbs works fine with zero arguments, so `zeroarg_callback` should be treated as `callback`.
* | Merge "Make a common approach for "emulated" types"mike bayer2017-09-2610-133/+299
|\ \ | |/ |/|
| * Make a common approach for "emulated" typesMike Bayer2017-09-2510-133/+299
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Internal refinements to the :class:`.Enum`, :class:`.Interval`, and :class:`.Boolean` types, which now extend a common mixin :class:`.Emulated` that indicates a type that provides Python-side emulation of a DB native type, switching out to the DB native type when a supporting backend is in use. The Postgresql :class:`.INTERVAL` type when used directly will now include the correct type coercion rules for SQL expressions that also take effect for :class:`.sqltypes.Interval` (such as adding a date to an interval yields a datetime). Change-Id: Ifb9f9d7cbd9f5990dcb2abb583193e9e92b789ad Fixes: #4088
* | Merge "Add table / column comments into tometadata()"mike bayer2017-09-253-5/+30
|\ \
| * | Add table / column comments into tometadata()Mike Bayer2017-09-233-5/+30
| |/ | | | | | | | | | | | | | | Fixed bug in new SQL comments feature where table and column comment would not be copied when using :meth:`.Table.tometadata`. Change-Id: Ib3112e5e02930245daacb36c8ed38c01fa3e7dbd Fixes: #4087
* | Merge branch ↵Mike Bayer2017-09-251-1/+1
|\ \ | |/ |/| | | 'kishkin/fixed-a-typo-in-before_execute-doc-event-1503409727849' of https://bitbucket.org/kishkin/sqlalchemy
| * Fixed a typo in before_execute doc.Michael Smirnov2017-08-221-1/+1
| | | | | | events.py edited online with Bitbucket
* | Merge "Add __next__(), next() to ResultProxy"mike bayer2017-09-183-0/+44
|\ \
| * | Add __next__(), next() to ResultProxyreview/mike_bayer/ticket_4077Mike Bayer2017-09-153-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added ``__next__()`` and ``next()`` methods to :class:`.ResultProxy`, so that the ``next()`` builtin function works on the object directly. :class:`.ResultProxy` has long had an ``__iter__()`` method which already allows it to respond to the ``iter()`` builtin. The implementation for ``__iter__()`` is unchanged, as performance testing has indicated that iteration using a ``__next__()`` method with ``StopIteration`` is about 20% slower in both Python 2.7 and 3.6. Change-Id: I70569a4c48ad85a3c21a7ad422f270a559926cfb Fixes: #4077
* | | Add multivalued insert context for defaultsreview/mike_bayer/ticket_4075Mike Bayer2017-09-168-26/+250
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a new method :class:`.DefaultExecutionContext.current_parameters` which is used within a function-based default value generator in order to retrieve the current parameters being passed to the statement. The new function differs from the ``.current_parameters`` attribute in that it also provides for optional grouping of parameters that correspond to a multi-valued "insert" construct. Previously it was not possible to identify the subset of parameters that were relevant to the function call. Change-Id: I6894c7b4a2bce3e83c3ade8af0e5b2f8df37b785 Fixes: #4075
* | | Merge "Implement placeholders for CUBE, ROLLUP, GROUPING SETS"mike bayer2017-09-145-2/+131
|\ \ \
| * | | Implement placeholders for CUBE, ROLLUP, GROUPING SETSreview/mike_bayer/pr_github_383Spitcyn2017-09-135-2/+131
| |/ / | | | | | | | | | | | | | | | | | | | | | Fixes: #3429 Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com> Change-Id: I870ee7dc801d553c5309c291402ec468b671e9a9 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/383
* | | Merge "Ensure (+) is rendered for all right-hand members"mike bayer2017-09-133-5/+67
|\ \ \
| * | | Ensure (+) is rendered for all right-hand membersticket_4076Mike Bayer2017-09-133-5/+67
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug where Oracle 8 "non ansi" join mode would not add the ``(+)`` operator to expressions that used an operator other than the ``=`` operator. The ``(+)`` needs to be on all columns that are part of the right-hand side. Change-Id: I952e2369f11b78f5b918456ae3a5b0768d9761ec Fixes: #4076
* | | use the stack to get the insert statement in on conflictticket_4074Mike Bayer2017-09-123-1/+35
|/ / | | | | | | | | | | | | | | | | Fixed bug in Postgresql :meth:`.postgresql.dml.Insert.on_conflict_do_update` which would prevent the insert statement from being used as a CTE, e.g. via :meth:`.Insert.cte`, within another statement. Change-Id: Ie20972a05e194290bc9d92819750845872949ecc Fixes: #4074
* | Refactor for cx_Oracle version 6oracle_numericMike Bayer2017-09-1125-2906/+3073
| | | | | | | | | | | | | | | | | | Drops support for cx_Oracle prior to version 5.x, reworks numeric and binary support. Fixes: #4064 Change-Id: Ib9ae9aba430c15cd2a6eeb4e5e3fd8e97b5fe480
* | Don't use repr() for Column/ColumnClause in warningMike Bayer2017-09-102-3/+4
| | | | | | | | | | | | | | | | for #4073, use the string version of the column expression in the warning, otherwise the repr() is showing the hex id which causes unlimited warnings. Change-Id: I6869b685b237e7f02c7b5071701dd63a3577182a
* | Warn instead of raise for unmapped column that matches on keyticket_4073Mike Bayer2017-09-104-10/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modified the change made to the ORM update/delete evaluator in :ticket:`3366` such that if an unmapped column expression is present in the update or delete, if the evaluator can match its name to the mapped columns of the target class, a warning is emitted, rather than raising UnevaluatableError. This is essentially the pre-1.2 behavior, and is to allow migration for applications that are currently relying upon this pattern. However, if the given attribute name cannot be matched to the columns of the mapper, the UnevaluatableError is still raised, which is what was fixed in :ticket:`3366`. Change-Id: I658ed0dbf485b7f8009774f9c12d9912447abd2a Fixes: #4073
* | Merge "Remove LRU warnings"mike bayer2017-09-095-113/+16
|\ \
| * | Remove LRU warningsMike Bayer2017-09-085-113/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed the warnings that are emitted when the LRU caches employed by the mapper as well as loader srtategies reach their threshold; the purpose of this warning was at first a guard against excess cache keys being generated but became basically a check on the "creating many engines" antipattern. While this is still an antipattern, the presense of test suites which both create an engine per test as well as raise on all warnings will be an inconvenience; it should not be critical that such test suites change their architecture just for this warning (though engine-per-test suite is always better). Change-Id: I41ef8cd642d05a845f53119b196440f9d7879cd9 Fixes: #4071
* | | Rename MySQL dml.insert().values to .insertedMike Bayer2017-09-086-32/+43
|/ / | | | | | | | | | | | | | | | | | | | | Changed the name of the ``.values`` attribute of the new MySQL INSERT..ON DUPLICATE KEY UPDATE construct to ``.inserted``, as :class:`.Insert` already has a method called :meth:`.Insert.values`. The ``.inserted`` attribute ultimately renders the MySQL ``VALUES()`` function. Change-Id: I8da8e30a3077698385a4b77e2c2032e2d1ff10b2 Fixes: #4072
* | - skip oracle tests until we can merge refactorMike Bayer2017-09-082-0/+20
| | | | | | | | Change-Id: Ie9bec6e8f51d52349dcbd8009981818e459e88b8
* | - add separate oracle / oracle5 jobs so we can CIMike Bayer2017-09-051-6/+7
| | | | | | | | | | | | on both series for now Change-Id: Ide8938334c248119c1d5c2e1bf07070f17c86242
* | Version 1.1.15 placeholderMike Bayer2017-09-051-0/+4
| | | | | | | | | | Change-Id: I81fd38694b19ee9dadaf89276dd4fe9bd6f67c94 (cherry picked from commit 21ca9b50c794c58df476300206aefff46511909d)
* | - 1.1.14Mike Bayer2017-09-057-61/+65
| | | | | | | | | | | | (cherry picked from commit 4b22b01ade6f94cc4db2f2040c802067a25d29a4) Change-Id: I520fbff300ae034166a2f80685e0831ff2d1929e
* | - 1.1.14 placeholderMike Bayer2017-09-051-1/+5
| | | | | | | | | | Change-Id: I1648f7780cc0accdfe7650a62754b39c8e5552a8 (cherry picked from commit 2cdb0777c2bfd35b1cdda7fdb9ce60122211bc29)
* | Merge "Guard against KeyError in session.merge after check for identity"mike bayer2017-09-052-18/+33
|\ \
| * | Guard against KeyError in session.merge after check for identityMike Bayer2017-09-042-18/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug in :meth:`.Session.merge` following along similar lines as that of :ticket:`4030`, where an internal check for a target object in the identity map could lead to an error if it were to be garbage collected immediately before the merge routine actually retrieves the object. Change-Id: Ifecfb8b9d50c52d0ebd5a03e1bd69fe3abf1dc40 Fixes: #4069
* | | Merge "Check for non-mapped property in synonym"mike bayer2017-09-053-1/+46
|\ \ \
| * | | Check for non-mapped property in synonymMike Bayer2017-09-043-1/+46
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | An :class:`.InvalidRequestError` is raised when a :func:`.synonym` is used against an attribute that is not against a :class:`.MapperProperty`, such as an association proxy. Previously, a recursion overflow would occur trying to locate non-existent attributes. Change-Id: If2ce38c429a69951df4c94b71b74edbd59d775e3 Fixes: #4067
* | | Merge "Ensure custom ops have consistent typing behavior, boolean support"mike bayer2017-09-049-20/+187
|\ \ \
| * | | Ensure custom ops have consistent typing behavior, boolean supportMike Bayer2017-09-019-20/+187
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refined the behavior of :meth:`.Operators.op` such that in all cases, if the :paramref:`.Operators.op.is_comparison` flag is set to True, the return type of the resulting expression will be :class:`.Boolean`, and if the flag is False, the return type of the resulting expression will be the same type as that of the left-hand expression, which is the typical default behavior of other operators. Also added a new parameter :paramref:`.Operators.op.return_type` as well as a helper method :meth:`.Operators.bool_op`. Change-Id: Ifc8553cd4037d741b84b70a9702cbd530f1a9de0 Fixes: #4063
* | | - add forwards-port versionsMike Bayer2017-09-042-0/+2
| | | | | | | | | | | | Change-Id: I5741f213d0edb989566f45140f5e7e1dd522e194
* | | Always check that discarded state is the expected oneMike Bayer2017-09-043-12/+94
|/ / | | | | | | | | | | | | | | | | | | | | | | Fixed race condition in ORM identity map which would cause objects to be inappropriately removed during a load operation, causing duplicate object identities to occur, particularly under joined eager loading which involves deduplication of objects. The issue is specific to garbage collection of weak references and is observed only under the Pypy interpreter. Change-Id: I9f6ae3fe5b078f26146af82b15d16f3a549a9032 Fixes: #4068
* | Add InternalError for mysqlclient disconnectMike Bayer2017-09-012-1/+11
| | | | | | | | | | | | | | | | | | | | mysqlclient as of 1.3.11 changed the exception class for a particular disconnect situation from InterfaceError to InternalError; the disconnection detection logic now accommodates this. Change-Id: I294f90f794491fd363548719222d8e3008480615 Fixes: #4065
* | include a note about the importance of type coerce for custom opsMike Bayer2017-09-011-2/+12
| | | | | | | | Change-Id: Ia7dab65523d6a34fcc92ee785ffe03f7e2a33cfd
* | Consider merge key with (None, ) as non-persistentMike Bayer2017-08-313-5/+51
| | | | | | | | | | | | | | | | | | | | | | | | Fixed bug in :meth:`.Session.merge` where objects in a collection that had the primary key attribute set to ``None`` for a key that is typically autoincrementing would be considered to be a database-persisted key for part of the internal deduplication process, causing only one object to actually be inserted in the database. Change-Id: I0a6e00043be0b2979cda33740e1be3b430ecf8c7 Fixes: #4056 (cherry picked from commit 5243341ed886e10a0d3f7fef8ae3d071e0ffdcf0)
* | Add SQL Server CI coverageMike Bayer2017-08-3136-268/+382
| | | | | | | | Change-Id: Ida0d01ae9bcc0573b86e24fddea620a38c962822
* | - pin on cx_Oracle 6.0.1 for the moment while we wait forMike Bayer2017-08-311-1/+2
| | | | | | | | | | | | | | either https://github.com/oracle/python-cx_Oracle/issues/75 to be fixed or we can merge a workaround Change-Id: Ia3927337fb48824e0fdc764ed3a9d4930ca7a9c6
* | Additional fixes to sane rowcountMike Bayer2017-08-315-28/+63
| | | | | | | | | | | | | | | | Implement rowcount assertions and single row check for post_update as well as deletes. Change-Id: I4e5ba7e8747bf0e0b41f569089eb8cdbf064b7a9 Fixes: #4062
* | Add new sane_rowcount_w_returning flagMike Bayer2017-08-317-23/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a new class of "rowcount support" for dialects that is specific to when "RETURNING", which on SQL Server looks like "OUTPUT inserted", is in use, as the PyODBC backend isn't able to give us rowcount on an UPDATE or DELETE statement when OUTPUT is in effect. This primarily affects the ORM when a flush is updating a row that contains server-calcluated values, raising an error if the backend does not return the expected row count. PyODBC now states that it supports rowcount except if OUTPUT.inserted is present, which is taken into account by the ORM during a flush as to whether it will look for a rowcount. ORM tests are implicit in existing tests run against PyODBC Fixes: #4062 Change-Id: Iff17cbe4c7a5742971ed85a4d58660c18cc569c2
* | Use text_type, not unicodeMike Bayer2017-08-311-1/+1
| | | | | | | | | | | | | | Revise the fix from 03560c4b83308719067ec635662c35f9a437fb7f to use compat.text_type for py3k compatibility Change-Id: Ia6807bd4de3bba4b33b5327a1be7e728b45eb093
* | Enable native boolean for SQL ServerMike Bayer2017-08-303-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SQL Server supports what SQLAlchemy calls "native boolean" with its BIT type, as this type only accepts 0 or 1 and the DBAPIs return its value as True/False. So the SQL Server dialects now enable "native boolean" support, in that a CHECK constraint is not generated for a :class:`.Boolean` datatype. The only difference vs. other native boolean is that there are no "true" / "false" constants so "1" and "0" are still rendered here. Tests are implicit in the existing suites. Change-Id: I75bbcd549884099fb1a177e68667bf880c40fa7c Fixes: #4061
* | Merge "Join key_constraints on schema as well for SQL server get_fks"mike bayer2017-08-302-0/+10
|\ \
| * | Join key_constraints on schema as well for SQL server get_fksMike Bayer2017-08-302-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug where the SQL Server dialect could pull columns from multiple schemas when reflecting a self-referential foreign key constraint, if multiple schemas contained a constraint of the same name against a table of the same name. Tests are part of standard suite already (CI has been disabled) Change-Id: I04ff4a5dea9b82c8e517b3700a28fe994b5550f3 Fixes: #4060
* | | Merge "Ignore SQL Server "heap" indexes"mike bayer2017-08-302-1/+9
|\ \ \
| * | | Ignore SQL Server "heap" indexesMike Bayer2017-08-302-1/+9
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a rule to SQL Server index reflection to ignore the so-called "heap" index that is implicitly present on a table that does not specify a clustered index. Tests are part of standard suite already (CI has been disabled) Change-Id: I593b95551c40ee5d95d54203611112cbff10856f Fixes: #4059
* | | Add preparer to pymssql that disables percent doublingMike Bayer2017-08-302-1/+21
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Fixed the pymssql dialect so that percent signs in SQL text, such as used in modulus expressions or literal textual values, are **not** doubled up, as seems to be what pymssql expects. This is despite the fact that the pymssql DBAPI uses the "pyformat" parameter style which itself considers the percent sign to be significant. Tests are part of standard suite already (CI has been disabled) Change-Id: Ie05de403caefcba3292a967183a995e95a5854d5 Fixes: #4057