summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Get pypy to runpypy_runMike Bayer2016-06-172-2/+8
| | | | Change-Id: Idf8d66c5d65ca7cadf1d04d04441c957f5dc8f51
* 1.1.0b1Mike Bayer2016-06-162-1/+2
|
* - dont need thisMike Bayer2016-06-161-13/+2
|
* Merge "Add DDLCompiler.create_table_suffix()"mike bayer2016-06-163-1/+35
|\
| * Add DDLCompiler.create_table_suffix()Mark Sandan2016-06-163-1/+35
| | | | | | | | | | | | | | Allows custom dialects to add keywords after the CREATE TABLE section. Change-Id: I6fa66dfcf00ef95122f491a9115410df2746cf88
* | Merge "update pytest good practices link in PyTest class"mike bayer2016-06-161-2/+4
|\ \ | |/ |/|
| * update pytest good practices link in PyTest classMark Sandan2016-06-161-2/+4
| | | | | | | | | | Change-Id: Ie96edd05e962663e9ddeeda85b24858caabd3bfd Pull-request: https://github.com/zzzeek/sqlalchemy/pull/262
* | - dont use id() to test identity as these can be recycledMike Bayer2016-06-151-12/+14
| | | | | | | | Change-Id: Ie4cb4924909d55c5962f66e36cd5325e8e8f0538
* | - flake8Mike Bayer2016-06-151-106/+128
| | | | | | | | Change-Id: I74e369d1d71c98cb0af58dde80b7d535d17cbdf7
* | Merge "Add TABLESAMPLE clause support."mike bayer2016-06-159-2/+206
|\ \
| * | Add TABLESAMPLE clause support.saarni2016-06-159-2/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Interpret lateral, alias as from clauses"mike bayer2016-06-152-2/+4
|\ \ \ | |/ / |/| |
| * | Interpret lateral, alias as from clausesMike Bayer2016-06-152-2/+4
| | | | | | | | | | | | | | | | | | Also add doc members for Lateral. Change-Id: Ic801c296377ce84230139c6a43ecb3e93a852832
* | | Add `sqlalchemy.ext.index` for indexed attributes for ORMJeong YunWon2016-06-158-1/+724
|/ / | | | | | | | | | | | | | | | | 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
* | Merge "Add ON CONFLICT support for Postgresql"mike bayer2016-06-1410-15/+1102
|\ \
| * | Add ON CONFLICT support for PostgresqlRobin Thomas2016-06-1410-15/+1102
| | | | | | | | | | | | | | | | | | | | | Fixes: #3529 Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com> Change-Id: Ie3bf6ad70d9be9f0e44938830e922db03573991a Pull-request: https://github.com/zzzeek/sqlalchemy/pull/258
* | | Deprecate FromClause.count()Mike Bayer2016-06-1421-141/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Ensure CTE internals are handled during cloneMike Bayer2016-06-103-0/+34
|/ / | | | | | | | | | | | | | | | | 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-083-5/+73
| | | | | | | | | | | | | | | | | | | | | | | | 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-084-3/+81
|\ \
| * | Support normal /materialized views in PG separatelySebastian Bank2016-06-064-3/+81
| | | | | | | | | | | | | | | | | | 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-084-17/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-088-17/+141
|\ \ \
| * | | Add 'FOR NO KEY UPDATE' / 'FOR KEY SHARE' support for PostgresqlSergey Skopin2016-06-088-17/+141
| |/ / | | | | | | | | | | | | | | | | | | | | | 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-077-12/+276
|/ / | | | | | | | | | | | | Fixes: #3049 Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com> Change-Id: Ie572095c3e25f70a1e72e1af6858e5edd89fd25e Pull-request: https://github.com/zzzeek/sqlalchemy/pull/264
* | Merge "Add "render_nulls" flag to bulk_insert as optional performance ↵mike bayer2016-06-064-12/+73
|\ \ | | | | | | | | | optimization"
| * | Add "render_nulls" flag to bulk_insert as optional performance optimizationtsauerwein2016-06-064-12/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Refine PG inspection methods"mike bayer2016-06-061-94/+34
|\ \ \ | |/ / |/| |
| * | Refine PG inspection methodsSebastian Bank2016-06-061-94/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This refines get_schema_names(), get_table_names(), get_view_defintion(), _get_foreign_table_names(), and get_view_names() to use better queries and remove unnecessary explicit encoding logic. Pull-request: https://github.com/zzzeek/sqlalchemy/pull/250 Change-Id: I7e87b29c34b97b37f21bbc83392b2274af4db0ab
* | | Merge "Add IS (NOT) DISTINCT FROM operators"mike bayer2016-06-068-2/+166
|\ \ \
| * | | Add IS (NOT) DISTINCT FROM operatorsSebastian Bank2016-06-068-2/+166
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Replace some uses of re.sub with str.lstrip/replace"mike bayer2016-06-063-3/+3
|\ \ \ | |/ / |/| |
| * | Replace some uses of re.sub with str.lstrip/replaceVille Skyttä2016-06-063-3/+3
| | | | | | | | | | | | | | | Change-Id: I98cd60b6830ee94e39ba9307523a9e8fb93bf4e8 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/280
* | | Allow creating explicit non-clustered keys and indexes MS SQL.Saulius Žemaitaitis2016-06-064-12/+98
|/ / | | | | | | | | | | | | | | | | | | 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-032-3/+12
| | | | | | | | Change-Id: I734e4aec3701d7cf17813b561a1418cfeff1d473
* | - missing test_needs_fk for this test, fixes mysql failureMike Bayer2016-06-031-0/+1
| | | | | | | | Change-Id: I2dc6961f9b692a8bb6bfb2296d159df145dec679
* | Ensure "options" present for unnamed / unlocatable FKMike Bayer2016-06-032-13/+45
| | | | | | | | | | | | | | 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-034-2/+59
| | | | | | | | | | | | | | | | | | 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-039-5/+94
|\ \
| * | Add SKIP LOCKED support for Postgresql, OracleJack Zhou2016-06-029-5/+94
| | | | | | | | | | | | | | | | | | | | | | | | 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-034-4/+68
|\ \ \
| * | | Reflect ON DELETE and ON UPDATE for SQLite foreign keysMichal Petrucha2016-06-024-4/+68
| | | | | | | | | | | | | | | | | | | | | | | | 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-023-1/+55
|\ \ \
| * | | Add schema argument to AutomapBase.prepare()Josh Marlow2016-06-023-1/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 "Add an init_scalar event for attributes"mike bayer2016-06-026-6/+261
|\ \ \ \ | |_|/ / |/| | |
| * | | Add an init_scalar event for attributesMike Bayer2016-06-026-6/+261
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | This allows us to build default-setting recipes such as one that allows us to actively read column-level defaults. An example suite is also added. Change-Id: I7b022d52cc89526132d5bc4201ac27fea4cf088d Fixes: #1311
* | | - limit oracle DB reaps to identifiers generated from thisMike Bayer2016-06-025-8/+25
| | | | | | | | | | | | | | | | | | run to prevent race conditions against concurrent runs Change-Id: I065d1cec346ea7af03792c3cc2f30766f73c2bd3
* | | Merge "Skip UniqueConstraint marked by unique=True in tometadata"mike bayer2016-06-023-1/+43
|\ \ \ | |/ / |/| |
| * | Skip UniqueConstraint marked by unique=True in tometadataMike Bayer2016-06-023-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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