]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/log
thirdparty/sqlalchemy/sqlalchemy.git
8 years agoRaise when two validators conflict
Mike Bayer [Fri, 26 Aug 2016 16:56:01 +0000 (12:56 -0400)] 
Raise when two validators conflict

Two @validates decorators that make use of the same name
is not supported.  Raise an exception.

Change-Id: Ia3e89ffdc9ef345a0de258e2ac0ac5e0bd421c61
Fixes: #3776
8 years agoMerge "Add docstring to declarative_base"
mike bayer [Mon, 22 Aug 2016 14:49:48 +0000 (10:49 -0400)] 
Merge "Add docstring to declarative_base"

8 years ago- fix wrong var name, credit to @RazerM
Mike Bayer [Wed, 17 Aug 2016 22:26:34 +0000 (18:26 -0400)] 
- fix wrong var name, credit to @RazerM

Change-Id: I36fbbfd1223ef5298c679f46db24e1bf3013cef0

8 years agoMerge remote-tracking branch 'origin/pr/299'
Mike Bayer [Tue, 16 Aug 2016 16:04:41 +0000 (12:04 -0400)] 
Merge remote-tracking branch 'origin/pr/299'

8 years agoMerge remote-tracking branch 'origin/pr/300'
Mike Bayer [Tue, 16 Aug 2016 16:03:24 +0000 (12:03 -0400)] 
Merge remote-tracking branch 'origin/pr/300'

8 years agoRework _apply_joins(), _prep_for_joins() totally
Mike Bayer [Mon, 15 Aug 2016 20:39:12 +0000 (16:39 -0400)] 
Rework _apply_joins(), _prep_for_joins() totally

The approach here is still error prone
and hard to follow.  Reorganize the whole
thing to take a pretty blunt approach to
the structure of to_join().  Also fix some never-called
code (!) in _prep_for_joins() and ensure we re-use
an aliased object.

Fixes: #3774
Change-Id: Ie6319415ae7213b4a33eac2ab70803ad2880d340

8 years agoMerge "Ensure final link in subqueryload join is correct"
mike bayer [Sat, 13 Aug 2016 14:39:52 +0000 (10:39 -0400)] 
Merge "Ensure final link in subqueryload join is correct"

8 years ago- fill in forwards-ports for 1.1 in 1.0 changelog
Mike Bayer [Sat, 13 Aug 2016 03:39:49 +0000 (23:39 -0400)] 
- fill in forwards-ports for 1.1 in 1.0 changelog

Change-Id: I8d44b90bb9d05275de19d3ce2d9124050add5f01

8 years agoEnsure final link in subqueryload join is correct
Mike Bayer [Sat, 13 Aug 2016 03:35:40 +0000 (23:35 -0400)] 
Ensure final link in subqueryload join is correct

Fixed bug in subquery eager loading where a subqueryload
of an "of_type()" object linked to a second subqueryload of a plain
mapped class would fail to link the joins correctly.

Change-Id: I4be89e6f5e492438464a2ded01eb9c84d7ff7d4e
Fixes: #3773
8 years ago- fix this test which did not allow for the A/ ASub to be loaded
Mike Bayer [Sat, 13 Aug 2016 02:58:34 +0000 (22:58 -0400)] 
- fix this test which did not allow for the A/ ASub to be loaded
polymorphically

Change-Id: Id82435fa16b0456f32bce49715c6606e3a1534c8

8 years ago- add another example for chained polymorphic eager loading
Mike Bayer [Thu, 11 Aug 2016 16:03:38 +0000 (12:03 -0400)] 
- add another example for chained polymorphic eager loading

Change-Id: I87918ab4cd294d4b4a87a377c7b6b21105f4fd55
(cherry picked from commit 68b6984912760bfe4d9270750d8f39b9036b65b5)

8 years ago- small updates to polymorphic eager loading, cross-link from
Mike Bayer [Thu, 11 Aug 2016 15:45:03 +0000 (11:45 -0400)] 
- small updates to polymorphic eager loading, cross-link from
loading documentation

Change-Id: I3ce7e2cc521c4dd155195819a919017d4cc63b3c

8 years agoFix documentation basic example (missing imports)
Romuald Brunet [Thu, 11 Aug 2016 15:24:05 +0000 (17:24 +0200)] 
Fix documentation basic example (missing imports)

8 years agoSpelling fixes
Ville Skyttä [Mon, 8 Aug 2016 13:39:15 +0000 (16:39 +0300)] 
Spelling fixes

8 years agoAdd docstring to declarative_base
Frazer McLean [Mon, 25 Jul 2016 22:02:03 +0000 (00:02 +0200)] 
Add docstring to declarative_base

Change-Id: I5ad44362515908592f1e8b1e6254a5270d43234a
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/295

8 years agoBuild string/int processors for JSONIndexType, JSONPathType
Mike Bayer [Thu, 4 Aug 2016 15:56:31 +0000 (11:56 -0400)] 
Build string/int processors for JSONIndexType, JSONPathType

Fixed regression in JSON datatypes where the "literal processor" for
a JSON index value, that needs to take effect for example within DDL,
would not be invoked for the value.  The native String and Integer
datatypes are now called upon from within the JSONIndexType
and JSONPathType.  This is applied to the generic, Postgresql, and
MySQL JSON types.

Change-Id: Ifa5f2acfeee57a79d01d7fc85d265a37bd27c716
Fixes: #3765
8 years agoPropagate kwargs to all MySQL CAST paths
Mike Bayer [Thu, 4 Aug 2016 16:34:55 +0000 (12:34 -0400)] 
Propagate kwargs to all MySQL CAST paths

Change-Id: I23a6abb26bbbe3d118887d043ce761fc4572d8d2
Fixes: #3766
8 years agoWarn that bulk save groups inserts/updates by type
brln [Tue, 2 Aug 2016 22:37:35 +0000 (18:37 -0400)] 
Warn that bulk save groups inserts/updates by type

Users who pass many different object types to bulk_save_objects
may be surprised that the INSERT/UPDATE batches must necessarily
be broken up by type.  Add this to the list of caveats.

Co-authored-by: Mike Bayer
Change-Id: I8390c1c971ced50c41268b479a9dcd09c695b135
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/294

8 years agoMerge remote-tracking branch 'origin/pr/296'
Mike Bayer [Tue, 2 Aug 2016 22:34:05 +0000 (18:34 -0400)] 
Merge remote-tracking branch 'origin/pr/296'

8 years agoMerge branch 'declarative-constructor-reference' of https://bitbucket.org/michaelwill...
Mike Bayer [Tue, 2 Aug 2016 22:29:11 +0000 (18:29 -0400)] 
Merge branch 'declarative-constructor-reference' of https://bitbucket.org/michaelwilliamson/sqlalchemy

8 years agoEnsure post-__clause_element__() expression are used in Index
Mike Bayer [Sun, 31 Jul 2016 04:10:04 +0000 (00:10 -0400)] 
Ensure post-__clause_element__() expression are used in Index

The change in Index for 1.1 combined with the fix for
ref #3763 still fails to deliver the correct object
resolved by __clause_element__() to the list of expressions
for compilation.   Make sure we use the expression that's
been unwrapped from __clause_element__().

Change-Id: Ie1df8db5090de665048331786f0024d52851923f
Fixes: #3763
8 years agoMerge "Index should extract __clause_element__() early"
mike bayer [Sat, 30 Jul 2016 16:54:10 +0000 (12:54 -0400)] 
Merge "Index should extract __clause_element__() early"

8 years agoMerge "Clarify order_by(False)"
mike bayer [Sat, 30 Jul 2016 16:53:26 +0000 (12:53 -0400)] 
Merge "Clarify order_by(False)"

8 years agoIndex should extract __clause_element__() early
Mike Bayer [Fri, 29 Jul 2016 22:17:43 +0000 (18:17 -0400)] 
Index should extract __clause_element__() early

Fixed bug where :class:`.Index` would fail to extract columns from
compound SQL expressions if those SQL expressions were wrapped inside
of an ORM-style ``__clause_element__()`` construct.  This bug
exists in 1.0.x as well, however in 1.1 is more noticeable as
hybrid_property @expression now returns a wrapped element.

Fixes: #3763
Change-Id: I992536386503a1fb3f2305790abe008d72c44c4a

8 years ago- Consoliate test/sql/test_constraint ConstraintAPITest
Mike Bayer [Sat, 30 Jul 2016 14:06:53 +0000 (10:06 -0400)] 
- Consoliate test/sql/test_constraint ConstraintAPITest
and test/sql/test_metadata IndexTest into
test/sql/test_metadata ConstraintTest

Change-Id: I7aeee9a1edbbd889200afc393695f73d5fbac3f3

9 years agoMerge "Allow None to cancel Query.group_by()"
mike bayer [Fri, 29 Jul 2016 23:03:38 +0000 (19:03 -0400)] 
Merge "Allow None to cancel Query.group_by()"

9 years agoClarify order_by(False)
Mike Bayer [Fri, 29 Jul 2016 22:50:18 +0000 (18:50 -0400)] 
Clarify order_by(False)

It wasn't clear how this differs from order_by(None);
add more tests and document that this has to do with whether or
not mapper.order_by will be re-enabled as well.

Change-Id: I332e8ac60c999b38c5a243f1cb72de3cf77891b6

9 years agoAllow None to cancel Query.group_by()
Iuri Diniz [Fri, 29 Jul 2016 16:54:22 +0000 (12:54 -0400)] 
Allow None to cancel Query.group_by()

This replicates the same behavior as order_by().

order_by() will also be updated to deprecate passing
of False as this is no longer functionally different
than passing None.

Change-Id: I2fc05d0317d28b6c83373769a48f7eea32d56290
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/297

9 years agoMerge "Enable JSON testing for pymysql"
mike bayer [Fri, 29 Jul 2016 22:22:49 +0000 (18:22 -0400)] 
Merge "Enable JSON testing for pymysql"

9 years ago- next release is 1.1.0
Mike Bayer [Fri, 29 Jul 2016 22:18:10 +0000 (18:18 -0400)] 
- next release is 1.1.0

Change-Id: I1d8ac48e6457e80e93b925152f434c13139b3d94

9 years agoEnable JSON testing for pymysql
Mike Bayer [Fri, 29 Jul 2016 15:05:28 +0000 (11:05 -0400)] 
Enable JSON testing for pymysql

PyMySQL upstream has released 0.7.6 which should resolve
JSON encoding issues.

Change-Id: Icf543d48dace1419a0aac78bdb15ec666f0edafe
Fixes: #3754
9 years ago- Document how SQL Server does MAX with VARCHAR, NVARCHAR
Mike Bayer [Wed, 27 Jul 2016 14:04:52 +0000 (10:04 -0400)] 
- Document how SQL Server does MAX with VARCHAR, NVARCHAR
Fixes #3760

Change-Id: I0613eb66bfdc9d7118688c74e29c8da322c3b4db

9 years ago- 1.1.0b3 rel_1_1_0b3
Mike Bayer [Tue, 26 Jul 2016 15:25:52 +0000 (11:25 -0400)] 
- 1.1.0b3

9 years agoFix typo
Jeff Widman [Tue, 26 Jul 2016 02:07:19 +0000 (19:07 -0700)] 
Fix typo

9 years agoFix reference to _declarative_constructor in docstring
Michael Williamson [Mon, 25 Jul 2016 13:08:43 +0000 (13:08 +0000)] 
Fix reference to _declarative_constructor in docstring

9 years agoAllow Table._reset_exported to silently pass
Mike Bayer [Sun, 24 Jul 2016 21:37:25 +0000 (17:37 -0400)] 
Allow Table._reset_exported to silently pass

Fixed bug in :class:`.Table` where the internal method
``_reset_exported()`` would corrupt the state of the object.  This
method is intended for selectable objects and is called by the ORM
in some cases; an erroneous mapper configuration would could lead the
ORM to call this on on a :class:`.Table` object.

Change-Id: I63fa34ee0cdf16358bb125c556390df79758bcbc
Fixes: #3755
9 years ago- MySQL's JSON shared implementation completely w/ sqltypes.JSON;
Mike Bayer [Mon, 25 Jul 2016 03:14:47 +0000 (23:14 -0400)] 
- MySQL's JSON shared implementation completely w/ sqltypes.JSON;
this must have been an oversight.   Leave mysql.JSON in place still
as we might need to add things to it.
- CAST(json, String) still confusing MySQL drivers even mysqlclient.
Since here we're checking for the raw form of the JSON and not a typical
round trip, add a force for unicode

Change-Id: I727f4526a01a0875037cf0dede45cd074da5205a

9 years ago- don't use pymysql at all for JSON, there's Py2K failures also
Mike Bayer [Sun, 24 Jul 2016 22:29:25 +0000 (18:29 -0400)] 
- don't use pymysql at all for JSON, there's Py2K failures also

Change-Id: I39a574ea72f5c7af0084dee3169679c5f534cb8b

9 years ago- Workaround in tests for https://github.com/PyMySQL/PyMySQL/issues/488
Mike Bayer [Sun, 24 Jul 2016 21:48:33 +0000 (17:48 -0400)] 
- Workaround in tests for https://github.com/PyMySQL/PyMySQL/issues/488

Change-Id: I4f935cce878eb1678b432f4cb4ba6ee122f8e9d4

9 years ago- a variety of test adjustments to accomodate for MySQL 5.7
Mike Bayer [Sun, 24 Jul 2016 20:36:27 +0000 (16:36 -0400)] 
- a variety of test adjustments to accomodate for MySQL 5.7

Change-Id: Ied4245433d0d7b469dae6e7394c4931d8405f387

9 years agoRemove same-named relationship warning
Mike Bayer [Tue, 19 Jul 2016 16:36:21 +0000 (12:36 -0400)] 
Remove same-named relationship warning

Removed a warning that dates back to 0.4 which emits when a same-named
relationship is placed on two mappers that inherits via joined or
single table inheritance.   The warning does not apply to the
current unit of work implementation.

Change-Id: If528ec3a2f4dc60712d9044fd1ec6c4dfbf0eadb
Fixes: #3749
9 years ago- fix formatting
Mike Bayer [Mon, 18 Jul 2016 20:43:42 +0000 (16:43 -0400)] 
- fix formatting

Change-Id: Ieba940a998a6aa287864e9748c2995ee4ae5bf54

9 years agoMerge "Add `default` parameter for `index_property`"
mike bayer [Wed, 13 Jul 2016 18:10:00 +0000 (14:10 -0400)] 
Merge "Add `default` parameter for `index_property`"

9 years agoEnsure DML provides named_with_column for CTE(Alias)
Mike Bayer [Tue, 12 Jul 2016 20:53:37 +0000 (16:53 -0400)] 
Ensure DML provides named_with_column for CTE(Alias)

Fixed bug in new CTE feature for update/insert/delete whereby
an anoymous (e.g. no name passed) :class:`.CTE` construct around
the statement would fail.  The Alias base class of CTE checks
for the "named_with_column" attribute in order to detect if
the underlying selectable has a name; UpdateBase now provides
this as False.

Change-Id: I4b0309db21379a4c0cb93085298c86da3cf840e4
Fixes: #3744
9 years agoMerge "Work w/ prefetch even for selects, if present"
mike bayer [Wed, 13 Jul 2016 15:48:41 +0000 (11:48 -0400)] 
Merge "Work w/ prefetch even for selects, if present"

9 years agoWork w/ prefetch even for selects, if present
Mike Bayer [Tue, 12 Jul 2016 20:38:22 +0000 (16:38 -0400)] 
Work w/ prefetch even for selects, if present

Fixed bug in new CTE feature for update/insert/delete stated
as a CTE inside of an enclosing statement (typically SELECT) whereby
oninsert and onupdate values weren't called upon for the embedded
statement.

This is accomplished by consulting prefetch
for all statements.  The collection is also broken into
separate insert/update collections so that we don't need to
consult toplevel self.isinsert to determine if the prefetch
is for an insert or an update.  What we don't yet test for
are CTE combinations that have both insert/update in one
statement, though these should now work in theory provided
the underlying database supports such a statement.

Change-Id: I3b6a860e22c86743c91c56a7ec751ff706f66f64
Fixes: #3745
9 years agoFix issue with unbaking subqueries
Mark Hahnenberg [Tue, 12 Jul 2016 18:07:52 +0000 (14:07 -0400)] 
Fix issue with unbaking subqueries

Fix improper capture of a loop variable inside a lambda during unbaking
of subquery eager loaders, which would cause the incorrect query
to be invoked.

Fixes: #3743
Change-Id: I995110deb8ee2dae8540486729e1ae64578d28fc
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/290

9 years ago- 1.0.15 for dev
Mike Bayer [Tue, 12 Jul 2016 18:04:40 +0000 (14:04 -0400)] 
- 1.0.15 for dev

Change-Id: I2d75b6d9ca533e662bc8160cf5fc52355e5e549e

9 years agoUpdate index.rst
Shige Takeda [Mon, 11 Jul 2016 22:58:43 +0000 (15:58 -0700)] 
Update index.rst

9 years agoUpdate index.rst
Shige Takeda [Mon, 11 Jul 2016 22:56:12 +0000 (15:56 -0700)] 
Update index.rst

9 years agoAdd `default` parameter for `index_property`
Jeong YunWon [Sun, 3 Jul 2016 13:23:45 +0000 (22:23 +0900)] 
Add `default` parameter for `index_property`

And force to use keyword arguments for trivial parameters in index_property

Change-Id: I12a178128182f77a2d06b52d7e36f59a36b45a33

9 years ago- fix typo
Mike Bayer [Thu, 7 Jul 2016 20:07:08 +0000 (16:07 -0400)] 
- fix typo

Change-Id: Ie66d419a5188529a64fcb2e2463c15c26863889f

9 years agoAdd additional documentation re: JSONEncodedDict
Mike Bayer [Thu, 7 Jul 2016 20:00:18 +0000 (16:00 -0400)] 
Add additional documentation re: JSONEncodedDict

Add an example of how to use coerce_compared_value()
specific to JSONEncodedDict, as this example class
is frequently dropped into applications.

Change-Id: I61639ac03dc5a37673ee8201b99a3c36ab944f00
Fixes: #3742
9 years ago- 1.0.14 changelog update
Mike Bayer [Wed, 6 Jul 2016 21:10:19 +0000 (17:10 -0400)] 
- 1.0.14 changelog update

(cherry picked from commit e9a1d7bc6a0ae4ec09b6431d23d201654013c6a7)

Change-Id: I5bab3fd6f2ec4986fd6b1049844f3851958d0c66

9 years agoMerge "Adapt "FOR UPDATE OF" with Oracle limit/offset"
mike bayer [Wed, 6 Jul 2016 14:13:56 +0000 (10:13 -0400)] 
Merge "Adapt "FOR UPDATE OF" with Oracle limit/offset"

9 years agoAdapt "FOR UPDATE OF" with Oracle limit/offset
Mike Bayer [Tue, 5 Jul 2016 16:48:41 +0000 (12:48 -0400)] 
Adapt "FOR UPDATE OF" with Oracle limit/offset

This modifies the Oracle ROWNUM limit/offset approach
to accommodate for the "OF" clause in a "FOR UPDATE"
phrase.  The column expressions must be added to the selected
subquery if necessary and adapted on the outside.

Change-Id: Ia71b5fc4df6d326e73863f8ae9f96e8f1a5acfc1
Fixes: #3741
9 years ago`index_property` catches IndexError as well as KeyError
Jeong YunWon [Sun, 3 Jul 2016 12:45:15 +0000 (21:45 +0900)] 
`index_property` catches IndexError as well as KeyError

It was raising AttributeError for key accessing in dict,
but raising IndexError for index accessing in array.

Change-Id: I58a2252a9e8d7f78cabcefcbe7223a4f3a729115

9 years ago- version bump
Mike Bayer [Tue, 5 Jul 2016 17:05:07 +0000 (13:05 -0400)] 
- version bump

Change-Id: I5ace1a90f36678c006d704b452fbbe8a3eb1cd0a

9 years agoRepair PG BIGSERIAL w/ TypeDecorator, Variant
Mike Bayer [Mon, 4 Jul 2016 20:37:26 +0000 (16:37 -0400)] 
Repair PG BIGSERIAL w/ TypeDecorator, Variant

Some of the dialect impl memoization for TypeDecorator
necessarily keeps the top-level TypeDecorator type
around, since a user-defined type will have bind and result
set processing behavior.  For both TypeDecorator and Variant,
PG dialect needs to ensure it's looking at the SQLAlchemy
type to check for SmallInteger / BigInteger.

Fixes: 3739
Change-Id: I2d45fb997f17c6272d6bb826a77d2dba665adae7
(cherry picked from commit 421fa6b8bf9f0c3c5041579c89ec405ce0f5e0b0)

9 years agoMerge remote-tracking branch 'origin/pr/288'
Mike Bayer [Mon, 4 Jul 2016 19:37:58 +0000 (15:37 -0400)] 
Merge remote-tracking branch 'origin/pr/288'

9 years agofixed typo
Kristian Perkins [Sun, 3 Jul 2016 03:59:47 +0000 (13:59 +1000)] 
fixed typo

9 years agoFix some typos in 1.1's changelog and migration sections
Lele Gaifax [Sat, 2 Jul 2016 11:07:48 +0000 (13:07 +0200)] 
Fix some typos in 1.1's changelog and migration sections

9 years agoConsistently use the official PostgreSQL casing
Lele Gaifax [Sat, 2 Jul 2016 11:05:27 +0000 (13:05 +0200)] 
Consistently use the official PostgreSQL casing

9 years ago- add backports
Mike Bayer [Fri, 1 Jul 2016 18:57:49 +0000 (14:57 -0400)] 
- add backports

Change-Id: Iee0bf9e60a5991bedbe29b305803b4c79ac5c511
(cherry picked from commit 849df799ec4107d0992c8eb0e015b74916aee266)

9 years agoPreserve type for math negation
Mike Bayer [Fri, 1 Jul 2016 16:44:47 +0000 (12:44 -0400)] 
Preserve type for math negation

Fixed issue in SQL math negation operator where the type of the
expression would no longer be the numeric type of the original.
This would cause issues where the type determined result set
behaviors.

Change-Id: If0e339614a3686e251235fc94b6f59310c4630a5
Fixes: #3735
9 years ago- 1.1.0b2 rel_1_1_0b2
Mike Bayer [Fri, 1 Jul 2016 14:47:20 +0000 (10:47 -0400)] 
- 1.1.0b2

9 years ago- revert the RTD reqs workaround, we are self-hosting now
Mike Bayer [Fri, 1 Jul 2016 14:39:05 +0000 (10:39 -0400)] 
- revert the RTD reqs workaround, we are self-hosting now

Change-Id: Ie11361147d497c6eb6418cdc850ed277dfbd1de4

9 years agoMerge "Repair pickling for Properties object"
mike bayer [Wed, 29 Jun 2016 21:41:03 +0000 (17:41 -0400)] 
Merge "Repair pickling for Properties object"

9 years agoRepair pickling for Properties object
Pieter Mulder [Wed, 29 Jun 2016 15:15:44 +0000 (11:15 -0400)] 
Repair pickling for Properties object

Fixed bug whereby the ``__getstate__`` / ``__setstate__``
methods for sqlalchemy.util.Properties were
non-working due to the transition in the 1.0 series to ``__slots__``.
The issue potentially impacted some third-party applications.
Pull request courtesy Pieter Mulder.

Fixes: #3728
Change-Id: I01ebd425bbfe145747fea2edd0d2d412c74fd84d
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/286
(cherry picked from commit cab57e9bab04fbdea44690c08dff379a29eaab32)

9 years agoEnsure @compiles calls down to the original compilation scheme
Mike Bayer [Wed, 29 Jun 2016 15:11:17 +0000 (11:11 -0400)] 
Ensure @compiles calls down to the original compilation scheme

Made a slight behavioral change in the ``sqlalchemy.ext.compiler``
extension, whereby the existing compilation schemes for an established
construct would be removed if that construct was itself didn't already
have its own dedicated ``__visit_name__``.  This was a
rare occurrence in 1.0, however in 1.1 :class:`.postgresql.ARRAY`
subclasses :class:`.sqltypes.ARRAY` and has this behavior.
As a result, setting up a compilation handler for another dialect
such as SQLite would render the main :class:`.postgresql.ARRAY`
object no longer compilable.

Fixes: #3732
Change-Id: If2c1ada4eeb09157885888e41f529173902f2b49

9 years agoMake boolean processors consistent between Py/C; coerce to 1/0
Mike Bayer [Thu, 23 Jun 2016 23:26:28 +0000 (19:26 -0400)] 
Make boolean processors consistent between Py/C; coerce to 1/0

The processing performed by the :class:`.Boolean` datatype for backends
that only feature integer types has been made consistent between the
pure Python and C-extension versions, in that the C-extension version
will accept any integer value from the database as a boolean, not just
zero and one; additionally, non-boolean integer values being sent to
the database are coerced to exactly zero or one, instead of being
passed as the original integer value.

Change-Id: I01e647547fd7047bd549dd70e1fa202c51e8328b
Fixes: #3730
9 years agoDon't reorder PrimaryKeyConstraint columns if explicit
Mike Bayer [Mon, 20 Jun 2016 15:39:01 +0000 (11:39 -0400)] 
Don't reorder PrimaryKeyConstraint columns if explicit

Dialed back the "order the primary key columns per auto-increment"
described in :ref:`change_mysql_3216` a bit, so that if the
:class:`.PrimaryKeyConstraint` is explicitly defined, the order
of columns is maintained exactly, allowing control of this behavior
when necessary.

Change-Id: I9e7902c57a96c15968a6abf53e319acf15680da0
Fixes: #3726
9 years agoDisable Enum string validation by default
Mike Bayer [Mon, 20 Jun 2016 14:08:36 +0000 (10:08 -0400)] 
Disable Enum string validation by default

Rolled back the validation rules a bit in :class:`.Enum` to allow
unknown string values to pass through, unless the flag
``validate_string=True`` is passed to the Enum; any other kind of object is
still of course rejected.  While the immediate use
is to allow comparisons to enums with LIKE, the fact that this
use exists indicates there may be more unknown-string-comparsion use
cases than we expected, which hints that perhaps there are some
unknown string-INSERT cases too.

Change-Id: I7d1d79b374a7d47966d410998f77cd19294ab7b0
Fixes: #3725
9 years ago- create space for 1.1.0b2
Mike Bayer [Mon, 20 Jun 2016 15:42:53 +0000 (11:42 -0400)] 
- create space for 1.1.0b2

Change-Id: I8815a68dcf6e5d27f3f82b02f939f72d9a412337

9 years ago- update alembic link
Mike Bayer [Sat, 18 Jun 2016 13:35:54 +0000 (09:35 -0400)] 
- update alembic link

Change-Id: I5ac6ba8234873fdd19bee6c1decd311a9cb4d55e

9 years ago- missing indexable.rst
Mike Bayer [Sat, 18 Jun 2016 13:31:11 +0000 (09:31 -0400)] 
- missing indexable.rst

Change-Id: Ida3ca92b496a1e3ebd761c100201d3660460c2bf

9 years ago1.1.0b1
Mike Bayer [Thu, 16 Jun 2016 19:02:10 +0000 (15:02 -0400)] 
1.1.0b1

9 years ago- dont need this
Mike Bayer [Thu, 16 Jun 2016 19:56:56 +0000 (15:56 -0400)] 
- dont need this

9 years agoMerge "Add DDLCompiler.create_table_suffix()"
mike bayer [Thu, 16 Jun 2016 19:00:49 +0000 (15:00 -0400)] 
Merge "Add DDLCompiler.create_table_suffix()"

9 years agoMerge "update pytest good practices link in PyTest class"
mike bayer [Thu, 16 Jun 2016 15:53:18 +0000 (11:53 -0400)] 
Merge "update pytest good practices link in PyTest class"

9 years agoupdate pytest good practices link in PyTest class
Mark Sandan [Fri, 22 Apr 2016 22:42:19 +0000 (18:42 -0400)] 
update pytest good practices link in PyTest class

Change-Id: Ie96edd05e962663e9ddeeda85b24858caabd3bfd
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/262

9 years agoAdd DDLCompiler.create_table_suffix()
Mark Sandan [Tue, 24 May 2016 00:08:36 +0000 (17:08 -0700)] 
Add DDLCompiler.create_table_suffix()

Allows custom dialects to add keywords after the
CREATE TABLE section.

Change-Id: I6fa66dfcf00ef95122f491a9115410df2746cf88

9 years ago- dont use id() to test identity as these can be recycled
Mike Bayer [Wed, 15 Jun 2016 22:15:46 +0000 (18:15 -0400)] 
- dont use id() to test identity as these can be recycled

Change-Id: Ie4cb4924909d55c5962f66e36cd5325e8e8f0538

9 years ago- flake8
Mike Bayer [Wed, 15 Jun 2016 22:10:46 +0000 (18:10 -0400)] 
- flake8

Change-Id: I74e369d1d71c98cb0af58dde80b7d535d17cbdf7

9 years agoMerge "Add TABLESAMPLE clause support."
mike bayer [Wed, 15 Jun 2016 19:17:10 +0000 (15:17 -0400)] 
Merge "Add TABLESAMPLE clause support."

9 years agoMerge "Interpret lateral, alias as from clauses"
mike bayer [Wed, 15 Jun 2016 19:16:57 +0000 (15:16 -0400)] 
Merge "Interpret lateral, alias as from clauses"

9 years agoAdd TABLESAMPLE clause support.
saarni [Thu, 26 May 2016 14:15:24 +0000 (10:15 -0400)] 
Add TABLESAMPLE clause support.

The TABLESAMPLE clause allows randomly selecting an approximate percentage
of rows from a table. At least DB2, Microsoft SQL Server and recent
Postgresql support this standard clause.

Fixes: #3718
Change-Id: I3fb8b9223e12a57100df30876b461884c58d72fa
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/277

9 years agoInterpret lateral, alias as from clauses
Mike Bayer [Wed, 15 Jun 2016 18:36:24 +0000 (14:36 -0400)] 
Interpret lateral, alias as from clauses

Also add doc members for Lateral.

Change-Id: Ic801c296377ce84230139c6a43ecb3e93a852832

9 years agoAdd `sqlalchemy.ext.index` for indexed attributes for ORM
Jeong YunWon [Tue, 12 Apr 2016 03:16:04 +0000 (23:16 -0400)] 
Add `sqlalchemy.ext.index` for indexed attributes for ORM

Add `sqlalchemy.ext.index.index_property`
which subscribe an index of a column with `Indexable` type.

Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: I238c23131e4fded5dc7f7a25eb02e26008099d00
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/235

9 years agoMerge "Add ON CONFLICT support for Postgresql"
mike bayer [Tue, 14 Jun 2016 19:23:17 +0000 (15:23 -0400)] 
Merge "Add ON CONFLICT support for Postgresql"

9 years agoAdd ON CONFLICT support for Postgresql
Robin Thomas [Thu, 14 Apr 2016 16:57:15 +0000 (12:57 -0400)] 
Add ON CONFLICT support for Postgresql

Fixes: #3529
Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: Ie3bf6ad70d9be9f0e44938830e922db03573991a
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/258

9 years agoDeprecate FromClause.count()
Mike Bayer [Mon, 13 Jun 2016 19:18:13 +0000 (15:18 -0400)] 
Deprecate FromClause.count()

count() here is misleading in that it not only
counts from an arbitrary column in the table, it also
does not make accommodations for DISTINCT, JOIN, etc.
as the ORM-level function does.  Core should not be
attempting to provide a function like this.

Change-Id: I9916fc51ef744389a92c54660ab08e9695b8afc2
Fixes: #3724
9 years agoEnsure CTE internals are handled during clone
Mike Bayer [Fri, 10 Jun 2016 21:24:36 +0000 (17:24 -0400)] 
Ensure CTE internals are handled during clone

The CTE construct was missing a _copy_internals() method
which would handle CTE-specific structures including _cte_alias,
_restates during a clone operation.

Change-Id: I9aeac9cd24d8f7ae6b70e52650d61f7c96cb6d7e
Fixes: #3722
9 years agoSupport `postgresql_concurrently` on index dropping.
Iuri de Silvio [Wed, 27 Apr 2016 15:27:00 +0000 (10:27 -0500)] 
Support `postgresql_concurrently` on index dropping.

Also adds version detection so that DROP INDEX CONCURRENTLY
only renders if the Postgresql version is 9.2 or higher;
for CREATE INDEX CONCURRENTLY, version detection is added
to allow the phrase to omit if the Postgresql version is
less than 8.2.

Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: I597287e0ebbbe256c957a3579b58ace6848ab4f4
Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/84

9 years agoMerge "Support normal /materialized views in PG separately"
mike bayer [Wed, 8 Jun 2016 17:21:12 +0000 (13:21 -0400)] 
Merge "Support normal /materialized views in PG separately"

9 years agoUse the "committed" values when extracting many-to-one lazyload value
Mike Bayer [Sun, 8 May 2016 06:21:57 +0000 (02:21 -0400)] 
Use the "committed" values when extracting many-to-one lazyload value

The scalar object set() method calls upon the lazy loader
to get at the "old" value of the attriute, however doesn't
ensure that the "committed" value of the foreign key attributes
is used.  If the user has manipulated these attributes and they
themselves have pending, non committed changes, we get the
"new" value which these attributes would have set up if they
were flushed.  "old" vs "new" value is always about how the
value has changed since the load, so we always have to use the
DB-persisted values for everything when looking for "old".

Change-Id: I82bdc40ad0cf033c3a98f3361776cf3161542cd6
Fixes: #3708
9 years agoMerge "Add 'FOR NO KEY UPDATE' / 'FOR KEY SHARE' support for Postgresql"
mike bayer [Wed, 8 Jun 2016 15:52:22 +0000 (11:52 -0400)] 
Merge "Add 'FOR NO KEY UPDATE' / 'FOR KEY SHARE' support for Postgresql"

9 years agoAdd 'FOR NO KEY UPDATE' / 'FOR KEY SHARE' support for Postgresql
Sergey Skopin [Tue, 31 May 2016 14:02:08 +0000 (10:02 -0400)] 
Add 'FOR NO KEY UPDATE' / 'FOR KEY SHARE' support for Postgresql

Adds ``key_share=True`` for with_for_update().

Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: I74e0c3fcbc023e1dc98a1fa0c7db67b4c3693a31
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/279

9 years agoSupport range specification in window function
Phillip Cloud [Mon, 2 May 2016 02:26:10 +0000 (22:26 -0400)] 
Support range specification in window function

Fixes: #3049
Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: Ie572095c3e25f70a1e72e1af6858e5edd89fd25e
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/264

9 years agoSupport normal /materialized views in PG separately
Sebastian Bank [Tue, 12 Apr 2016 03:16:39 +0000 (23:16 -0400)] 
Support normal /materialized views in PG separately

Fixes: #3588
Change-Id: Ifbfcab67375f289ddb5c4522f4b803cb8b7c34de
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/250