summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Ensure CTE internals are handled during cloneMike Bayer2016-06-101-0/+17
| | | | | | | | | 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
* Support `postgresql_concurrently` on index dropping.Iuri de Silvio2016-06-081-0/+26
| | | | | | | | | | | | 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
* Merge "Support normal /materialized views in PG separately"mike bayer2016-06-081-1/+21
|\
| * Support normal /materialized views in PG separatelySebastian Bank2016-06-061-1/+21
| | | | | | | | | | | | Fixes: #3588 Change-Id: Ifbfcab67375f289ddb5c4522f4b803cb8b7c34de Pull-request: https://github.com/zzzeek/sqlalchemy/pull/250
* | Use the "committed" values when extracting many-to-one lazyload valueMike Bayer2016-06-081-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Add 'FOR NO KEY UPDATE' / 'FOR KEY SHARE' support for Postgresql"mike bayer2016-06-083-4/+93
|\ \
| * | Add 'FOR NO KEY UPDATE' / 'FOR KEY SHARE' support for PostgresqlSergey Skopin2016-06-083-4/+93
| |/ | | | | | | | | | | | | | | 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
* | Support range specification in window functionPhillip Cloud2016-06-071-0/+67
|/ | | | | | | Fixes: #3049 Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com> Change-Id: Ie572095c3e25f70a1e72e1af6858e5edd89fd25e Pull-request: https://github.com/zzzeek/sqlalchemy/pull/264
* Add "render_nulls" flag to bulk_insert as optional performance optimizationtsauerwein2016-06-061-2/+25
| | | | | | | | | | | | | | Currently, ``Session.bulk_insert_mappings`` omits NULL values which causes it to break up batches of inserts based on which batches contain NULL and which do not. By adding this flag, the same columns are rendered in the INSERT for all rows allowing them to be batched. The downside is that server-side defaults are omitted. Doctext-author: Mike Bayer <mike_mp@zzzcomputing.com> Change-Id: Iec5969304d4bdbf57290b200331bde02254aa3a5 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/243
* Add IS (NOT) DISTINCT FROM operatorsSebastian Bank2016-06-062-0/+77
| | | | | | | | | | | None / True / False render as literals. For SQLite, "IS" is used as SQLite lacks "IS DISTINCT FROM" but its "IS" operator acts this way for NULL. Doctext-author: Mike Bayer <mike_mp@zzzcomputing.com> Change-Id: I9227b81f7207b42627a0349d14d40b46aa756cce Pull-request: https://github.com/zzzeek/sqlalchemy/pull/248
* Allow creating explicit non-clustered keys and indexes MS SQL.Saulius Žemaitaitis2016-06-061-0/+38
| | | | | | | | | | mssql_clustered=False on Index, UniqueConstraint, PrimaryKeyConstraint now renders NONCLUSTERED. The default of mssql_clustered is now None. Co-Authored-By: mike bayer <mike_mp@zzzcomputing.com> Change-Id: Id6b8d840e355be8f8fa72360cb4b6d2617ba72cf Pull-request: https://github.com/zzzeek/sqlalchemy/pull/252
* - further adjustment to accomodate for the "ON" in "NO ACTION"Mike Bayer2016-06-031-2/+10
| | | | Change-Id: I734e4aec3701d7cf17813b561a1418cfeff1d473
* Ensure "options" present for unnamed / unlocatable FKMike Bayer2016-06-031-11/+43
| | | | | | | Also ensure the regular expression and subsequent matching is case insensitive, add more tests Change-Id: Ie4aa971dcbffca94e78965e22982478eccbf8597
* Ensure 'options' is always present in foreign key infoMike Bayer2016-06-031-0/+3
| | | | | | | | | Regarding 0e88bcc30ed49193b91f248123f526fa30007f22, "options" needs to be present as a key in the dictionary because Alembic uses this as a guide to know if the backend is even capable of reporting on foreign key options. Change-Id: I271090f75088cfeec24315a878060f9b8a265335
* Merge "Add SKIP LOCKED support for Postgresql, Oracle"mike bayer2016-06-033-0/+47
|\
| * Add SKIP LOCKED support for Postgresql, OracleJack Zhou2016-06-023-0/+47
| | | | | | | | | | | | | | | | This adds `SELECT ... FOR UPDATE SKIP LOCKED`/ `SELECT ... FOR SHARE SKIP LOCKED` rendering. Change-Id: Id1dc4f1cafc1de23f397a6f73d54ab2c58d5910d Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/86
* | Merge "Reflect ON DELETE and ON UPDATE for SQLite foreign keys"mike bayer2016-06-031-0/+37
|\ \
| * | Reflect ON DELETE and ON UPDATE for SQLite foreign keysMichal Petrucha2016-06-021-0/+37
| | | | | | | | | | | | | | | | | | Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com> Change-Id: Icd77ddbf851b1950f767022d67c8142b1b3c50f3 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/244
* | | - use a mock here, do away with timing problems for good. need to do thisMike Bayer2016-06-021-12/+18
|/ / | | | | | | | | | | for the rest of the timing tests Change-Id: I06a815b1500222126a4dbc2a9a5da3ef7847e321
* | Merge "Add schema argument to AutomapBase.prepare()"mike bayer2016-06-021-1/+36
|\ \ | |/ |/|
| * Add schema argument to AutomapBase.prepare()Josh Marlow2016-06-021-1/+36
| | | | | | | | | | | | | | | | | | This allows automap to reflect tables from a schema other than the default without the need to resort to calling MetaData.reflect directly. Change-Id: Ie73cb113bd6d115555c09c5efc33d27ad2c9c512 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/237
* | Merge "Skip UniqueConstraint marked by unique=True in tometadata"mike bayer2016-06-021-0/+28
|\ \ | |/ |/|
| * Skip UniqueConstraint marked by unique=True in tometadataMike Bayer2016-06-021-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixes an issue where a Column would be copied with unique=True and at the same time the UniqueConstraint would also be copied, leading to duplicate UniqueConstraints in the target table, when tometadata() is used. Imitates the same logic used by index=True/Index to avoid duplicates. For some reason a fix was implemented for Index long ago but never for UniqueConstraint. Change-Id: Ie622ee912a6fb8bf0ea900a8b09d78c7ebc79fc0 Fixes: #3721
* | Add postgresql_tablespace option on Indexbeenje2016-06-011-0/+43
|/ | | | | | | | | This complements the same-named parameter available on Table. Fixes: #3720 Change-Id: I56e081e2a551f37c3f392ca4b301c9ef82b94e59 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/233
* Implemented CHECK constraint reflection for SQLite and PostgreSQLAlex Grönholm2016-06-014-0/+66
| | | | | | Co-Authored-By: Mike Bayer <mike_mp@zzzcomputing.com> Change-Id: Ie6cf2d2958d1c567324db9e08fef2d3186e97350 Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/80
* Use new mxODBC 3.3.4 varbinary null symbolSheila Allen2016-05-311-1/+3
| | | | | | | | | Use new mxODBC 3.3.4 varbinary null symbol with VARBINARY data types when value is None(based on similar change to pyodbc). Fix a test to pass on mxODBC starting w 3.3.3 version Change-Id: Id703ecb51ebc5db149c81fef124f673433606c7f Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/58
* Merge remote-tracking branch 'origin/pr/270'Mike Bayer2016-05-241-1/+1
|\
| * Spelling fixes: "an SQL" -> "a SQL", see #266pr/270Ville Skyttä2016-05-051-1/+1
| |
* | Support "blank" schema when MetaData.schema is setMike Bayer2016-05-183-1/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, it was impossible to have a Table that has None for a schema name when the "schema" parameter on MetaData was set. A new symbol sqlalchemy.schema.BLANK_SCHEMA is added which indicates that the schema name should unconditionally be set to None. In particular, this value must be passed within cross-schema foreign key reflection, so that a Table which is in the "default" schema can be represented properly. Fixes: #3716 Change-Id: I3d24f99c22cded206c5379fd32a225e74edb7a8e
* | Accommodate "callable" bound param in evaluatorMike Bayer2016-05-161-1/+13
| | | | | | | | | | | | | | | | | | | | Fixed bug in "evaluate" strategy of :meth:`.Query.update` and :meth:`.Query.delete` which would fail to accommodate a bound parameter with a "callable" value, as which occurs when filtering by a many-to-one equality expression along a relationship. Change-Id: I47758d3f5d8b9ea1a07e23166780d5f3c32b17f1 Fixes: #3700
* | Fix formatting on test_evaluatorMike Bayer2016-05-161-10/+16
| | | | | | | | Change-Id: Idcd77a570b19f1b022a74d67fa8253d922dadc67
* | Merge remote-tracking branch 'origin/pr/272'Mike Bayer2016-05-131-1/+1
|\ \
| * | change "psotgresql" to 'postgresql' in decoratorpr/272Mark Sandan2016-05-061-1/+1
| | |
* | | Fix label referencing in SQL Server OFFSET logicMike Bayer2016-05-101-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug where by ROW_NUMBER OVER clause applied for OFFSET selects in SQL Server would inappropriately substitute a plain column from the local statement that overlaps with a label name used by the ORDER BY criteria of the statement. Change-Id: Ic2500c886cbfc83a1ad5a2681783f008b9f23838 Fixes: #3711
* | | Check for duplicate calls to register_attribute_implMike Bayer2016-05-101-0/+41
|/ / | | | | | | | | | | | | | | | | | | Fixed bug whereby the event listeners used for backrefs could be inadvertently applied multiple times, when using a deep class inheritance hierarchy in conjunction with mutiple mapper configuration steps. Change-Id: I712beaf4674e2323bf5b282922658020a6d00b53 Fixes: #3710
* | Repair _orm_columns() to accommodate text()Mike Bayer2016-05-051-0/+19
|/ | | | | | | | | Fixed bug whereby passing a :func:`.text` construct to the :meth:`.Query.group_by` method would raise an error, instead of intepreting the object as a SQL fragment. Change-Id: I5fc2f590b76508d52e23b5fa9cf037ddea8080c3 fixes: #3706
* Don't double-process ResultMetaData for BufferedColumnResultProxyMike Bayer2016-04-271-5/+47
| | | | | | | | | | | | Fixed a bug in the result proxy used mainly by Oracle when binary and other LOB types are in play, such that when query / statement caching were used, the type-level result processors, notably that required by the binary type itself but also any other processor, would become lost after the first run of the statement due to it being removed from the cached result metadata. Change-Id: I751940866cffb4f48de46edc8137482eab59790c Fixes: #3699
* Fix result set handling for case insensitive dupe colsMike Bayer2016-04-211-0/+15
| | | | | | | | | | | Fixed bug where when using ``case_sensitive=False`` with an :class:`.Engine`, the result set would fail to correctly accomodate for duplicate column names in the result set, causing an error when the statement is executed in 1.0, and preventing the "ambiguous column" exception from functioning in 1.1. Change-Id: If582bb9fdd057e4da3ae42f7180b17d1a1a2d98e Fixes: #3690
* Merge "Deprecate Mapper.order_by"mike bayer2016-04-1915-61/+111
|\
| * Deprecate Mapper.order_byMike Bayer2016-04-1915-61/+111
| | | | | | | | | | | | | | | | | | | | | | This is an old parameter no longer relevant to how SQLAlchemy works, once the Query object was introduced. By deprecating it we establish that we aren't supporting non-working use cases and that we encourage applications to move off of the use of this parameter. Fixes: #3394 Change-Id: I25b9a38142a1537bbcb27d3e8b66a8b265140072
* | Rename Query._mapper_zero() to Query._entity_zero()Mike Bayer2016-04-192-6/+7
|/ | | | | | | | | | | | To be more descriptive of the use of _mapper_zero(), rename it to _entity_zero(), but also supply a new _mapper_zero() function that more strictly returns a mapper. The existing _entity_zero() function is renamed to _query_entity_zero. _only_mapper_zero() is removed as it isn't used. Divide up the existing calling functions to refer to the appropriate new method. Change-Id: I8780c3235e87b4936c6daf64d9d299b22b6e1260 Fixes: #3608
* Merge "Add raise/raiseload relationship loading strategy"mike bayer2016-04-191-0/+109
|\
| * Add raise/raiseload relationship loading strategyAdrian Moennich2016-04-191-0/+109
| | | | | | | | | | | | | | Fixes: #3512 Co-Authored-By: Mike Bayer <mike_mp@zzzcomputing.com> Change-Id: Ibd126c50eda621e2f4120ee378f7313af2d7ec3c Pull-request: https://github.com/zzzeek/sqlalchemy/pull/193
* | Propagate hybrid properties / infoMike Bayer2016-04-181-0/+53
| | | | | | | | | | | | | | | | | | | | | | Keystone and others depend on the .property attribute being "mirrored" when a @hybrid_property is linked directly to a mapped attribute. Restore this linkage and also create a defined behavior for the .info dictionary; it is that of the hybrid itself. Add this behavioral change to the migration notes. Change-Id: I8ac34ef52039387230c648866c5ca15d381f7fee References: #3653
* | Honor hybrid property / method docstringsMike Bayer2016-04-182-11/+288
| | | | | | | | | | | | | | | | | | | | | | | | The docstring specified on a hybrid property or method is now honored at the class level, allowing it to work with tools like Sphinx autodoc. The mechanics here necessarily involve some wrapping of expressions to occur for hybrid properties, which may cause them to appear differently using introspection. Fixes: #3653 Change-Id: I02549977fe8b2a051802eed7b00cc532fbc214e3 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/239
* | - Add support for PostgreSQL with PyGreSQLChristoph Zwerschke2016-04-153-7/+11
|/ | | | | Change-Id: I040b75ff3b4110e7e8b26442a4eb226ba8c26715 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/234
* - don't load deferred columns on unexpire for merge with load=False,Diana Clarke2016-04-061-4/+100
| | | | | | | fixes #3488 Change-Id: Ic9577b800e4a4e2465ec7f3a2e95bd231f5337ee Co-Authored-By: Mike Bayer <mike_mp@zzzcomputing.com>
* - callcount refresh due to negative indexes change for nocextMike Bayer2016-03-311-247/+299
|
* - limit this to sqlite for nowMike Bayer2016-03-301-0/+1
|
* - move all resultproxy tests intio test_resultsetMike Bayer2016-03-302-333/+336
|