summaryrefslogtreecommitdiff
path: root/test/dialect
Commit message (Collapse)AuthorAgeFilesLines
...
* Add check for blank string coming from MySQL's enumMike Bayer2016-10-281-0/+24
| | | | | | | | | | | | | MySQL's native ENUM type supports any non-valid value being sent, and in response will return a blank string. A hardcoded rule to check for "is returning the blank string" has been added to the MySQL implementation for ENUM so that this blank string is returned to the application rather than being rejected as a non-valid value. Note that if your MySQL enum is linking values to objects, you still get the blank string back. Change-Id: I61f85c20293a48b0c11a31f2a19f6756c206bd20 Fixes: #3841
* Don't set pg autoincrement if type affinity is not IntegerMike Bayer2016-10-201-0/+16
| | | | | | | | | | | | | | | Postgresql table reflection will ensure that the :paramref:`.Column.autoincrement` flag is set to False when reflecting a primary key column that is not of an :class:`.Integer` datatype, even if the default is related to an integer-generating sequence. This can happen if a column is created as SERIAL and the datatype is changed. The autoincrement flag can only be True if the datatype is of integer affinity in the 1.1 series. This bug is related to a test failure in downstream sqlalchemy_migrate. Change-Id: I40260e47e1927a1ac940538408983c943bbdba28 Fixes: #3835
* Add a qualifying character to multi INSERT..VALUES parameter namesMike Bayer2016-10-172-0/+56
| | | | | | | | | | Changed the naming convention used when generating bound parameters for a multi-VALUES insert statement, so that the numbered parameter names don't conflict with the anonymized parameters of a WHERE clause, as is now common in a PostgreSQL ON CONFLICT construct. Change-Id: I3188d100fe4d322a47d344d6a63d3e40b915f228 Fixes: #3828
* spelling: Postgresql -> PostgreSQLVille Skyttä2016-10-081-2/+2
|
* Change autoincrement compileerror to a warningMike Bayer2016-10-072-48/+76
| | | | | | | | Users are complaining that IntegrityError is no longer raised. Change-Id: I0855d5b7a98d4338f0910501b6e6d404ba33634d Fixes: #3216
* Check row for None with implicit returning PK to accommodate ON CONFLICTMike Bayer2016-10-041-12/+97
| | | | | | | | | | An adjustment to ON CONFLICT such that the "inserted_primary_key" logic is able to accommodate the case where there's no INSERT or UPDATE and there's no net change. The value comes out as None in this case, rather than failing on an exception. Change-Id: I0794e95c3ca262cb1ab2387167d96b8984225fce Fixes: #3813
* Add "eager_parenthesis" late-compilation rule, use w/ PG JSON/HSTOREMike Bayer2016-10-011-7/+20
| | | | | | | | | | | | Added compiler-level flags used by Postgresql to place additional parenthesis than would normally be generated by precedence rules around operations involving JSON, HSTORE indexing operators as well as within their operands since it has been observed that Postgresql's precedence rules for at least the HSTORE indexing operator is not consistent between 9.4 and 9.5. Fixes: #3806 Change-Id: I5899677b330595264543b055abd54f3c76bfabf2
* Enable include_table for ON CONFLICT whereclausesMike Bayer2016-09-281-6/+22
| | | | | | | | | Fixed issue in new PG "on conflict" construct where columns including those of the "excluded" namespace would not be table-qualified in the WHERE clauses in the statement. Change-Id: Idfefc93e7e7b0d84805e23d5436d822d606f6a0a Fixes: #3807
* Add exclude_tablespaces argument to OracleDavid Fraser2016-09-201-0/+35
| | | | | | | | | Allows the SYSTEM and SYSAUX tablespaces to be only conditionally omitted when doing get_table_names() and get_temp_table_names(). Change-Id: Ie6995873f05163f2ce473a6a9c2d958a30681b44 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/292
* Propagate kwargs to all MySQL CAST pathsMike Bayer2016-08-041-0/+35
| | | | | Change-Id: I23a6abb26bbbe3d118887d043ce761fc4572d8d2 Fixes: #3766
* - a variety of test adjustments to accomodate for MySQL 5.7Mike Bayer2016-07-242-2/+2
| | | | Change-Id: Ied4245433d0d7b469dae6e7394c4931d8405f387
* Adapt "FOR UPDATE OF" with Oracle limit/offsetMike Bayer2016-07-051-0/+73
| | | | | | | | | | 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
* Repair PG BIGSERIAL w/ TypeDecorator, VariantMike Bayer2016-07-041-1/+20
| | | | | | | | | | | | | 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)
* Disable Enum string validation by defaultMike Bayer2016-06-201-1/+3
| | | | | | | | | | | | | | 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
* Merge "Add ON CONFLICT support for Postgresql"mike bayer2016-06-142-5/+563
|\
| * Add ON CONFLICT support for PostgresqlRobin Thomas2016-06-142-5/+563
| | | | | | | | | | | | | | 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-142-18/+19
|/ | | | | | | | | | | 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
* 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
* | Add 'FOR NO KEY UPDATE' / 'FOR KEY SHARE' support for PostgresqlSergey Skopin2016-06-082-2/+68
|/ | | | | | | | 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
* Add IS (NOT) DISTINCT FROM operatorsSebastian Bank2016-06-061-0/+11
| | | | | | | | | | | 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
* Merge "Add SKIP LOCKED support for Postgresql, Oracle"mike bayer2016-06-032-0/+29
|\
| * Add SKIP LOCKED support for Postgresql, OracleJack Zhou2016-06-022-0/+29
| | | | | | | | | | | | | | | | 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
* | 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
* 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-012-0/+39
| | | | | | 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
* Support "blank" schema when MetaData.schema is setMike Bayer2016-05-181-0/+23
| | | | | | | | | | | | | 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
* 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
* - Add support for PostgreSQL with PyGreSQLChristoph Zwerschke2016-04-152-5/+9
| | | | | Change-Id: I040b75ff3b4110e7e8b26442a4eb226ba8c26715 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/234
* Merge remote-tracking branch 'origin/pr/230'Mike Bayer2016-03-301-3/+34
|\
| * sqlite: reflect primary key constraint names, fixes #3629Diana Clarke2016-01-271-3/+34
| |
* | - Added support for rendering "FULL OUTER JOIN" to both Core and ORM.Mike Bayer2016-03-281-0/+27
| | | | | | | | Pull request courtesy Stefan Urbanek. fixes #1957
* | - changelog and docs for #3332, fixes #3332Mike Bayer2016-03-151-23/+24
| | | | | | | | | | | | - make docs for isolation level more consistent between postgresql and mysql - move mysql autocommit tests
* | Merge branch 'master' into pr157Mike Bayer2016-03-1518-1003/+2694
|\ \
| * | - update the mssql autoincrement reflection test to accommodateMike Bayer2016-02-201-27/+23
| | | | | | | | | | | | the new behavior of the autoincrement flag as per ref #3216
| * | - reworked the way the "select_wraps_for" expression isMike Bayer2016-02-201-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | handled within visit_select(); this attribute was added in the 1.0 series to accommodate the subquery wrapping behavior of SQL Server and Oracle while also working with positional column targeting and no longer relying upon "key fallback" in order to target columns in such a statement. The IBM DB2 third-party dialect also has this use case, but its implementation is using regular expressions to rewrite the textual SELECT only and does not make use of a "wrapped" select at this time. The logic no longer attempts to reconcile proxy set collections as this was not deterministic, and instead assumes that the select() and the wrapper select() match their columns postionally, at least for the column positions they have in common, so it is now very simple and safe. fixes #3657. - as a side effect of #3657 it was also revealed that the strategy of calling upon a ResultProxy._getter was not correctly calling into NoSuchColumnError when an expected column was not present, and instead returned None up to loading.instances() to produce NoneType failures; added a raiseerr argument to _getter() which is called when we aren't expecting None, fixes #3658.
| * | - add missing __backend__ directives for SQL serverMike Bayer2016-02-082-0/+6
| | |
| * | - add missing __backend__ directives so that oracle tests actually run with ↵Mike Bayer2016-02-081-0/+17
| | | | | | | | | | | | --backend-only
| * | - detect "Enterprise" and assume compression stuff isn't availableMike Bayer2016-02-081-0/+6
| | | | | | | | | | | | if not
| * | - adjust the MultiSchemaTest to handle multiple test_schemas / processes at theMike Bayer2016-02-081-5/+6
| | | | | | | | | | | | same time
| * | - adjust to allow dblink tests to work with multiprocess users.Mike Bayer2016-02-081-9/+3
| | | | | | | | | | | | | | | | | | unfortunately the synonym doesn't work for SQL statements here when the dblink is on a different user, testing this is not really critical so just removed it.
| * | - test fixes for metadata.enums value now being a listMike Bayer2016-02-022-24/+20
| | | | | | | | | | | | - modernize those tests as well
| * | - add changelog and migration notes for new Enum features,Mike Bayer2016-02-021-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | - Fixed issue where inadvertent use of the Python ``__contains__``Mike Bayer2016-02-021-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | - The ``sqlalchemy.dialects.postgres`` module, long deprecated, isMike Bayer2016-01-291-0/+10
| |/ | | | | | | | | | | | | 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.