summaryrefslogtreecommitdiff
path: root/test/dialect
Commit message (Collapse)AuthorAgeFilesLines
* 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.
| * - fix array test that was essentially taking a weird guessMike Bayer2016-01-231-2/+2
| | | | | | | | | | | | at the primary key of a row based on other tests invoking around it (cherry picked from commit 7d70dfd412c05fd8349339da01b472bd3df02082)
| * - move out match compiler test to test_compilerMike Bayer2016-01-232-23/+11
| | | | | | | | - test_query isn't assertscompiledsql
| * - The unsupported Sybase dialect now raises ``NotImplementedError``Mike Bayer2016-01-201-3/+11
| | | | | | | | | | when attempting to compile a query that includes "offset"; Sybase has no straightforward "offset" feature. fixes #2278
| * - there was a DATEPART test after all, fix formatMike Bayer2016-01-141-1/+1
| |
| * - changelog for pr bitbucket:70, fixes #3624Mike Bayer2016-01-121-0/+12
| |
| * - Multi-tenancy schema translation for :class:`.Table` objects is added.Mike Bayer2016-01-081-0/+18
| | | | | | | | | | | | | | | | | | This supports the use case of an application that uses the same set of :class:`.Table` objects in many schemas, such as schema-per-user. A new execution option :paramref:`.Connection.execution_options.schema_translate_map` is added. fixes #2685 - latest tox doesn't like the {posargs} in the profile rerunner
| * - add a few JSON tests specific to MySQL, including basic reflectionMike Bayer2016-01-061-1/+45
| |
| * - Added :class:`.mysql.JSON` for MySQL 5.7. The JSON type providesMike Bayer2016-01-061-84/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | persistence of JSON values in MySQL as well as basic operator support of "getitem" and "getpath", making use of the ``JSON_EXTRACT`` function in order to refer to individual paths in a JSON structure. fixes #3547 - Added a new type to core :class:`.types.JSON`. This is the base of the PostgreSQL :class:`.postgresql.JSON` type as well as that of the new :class:`.mysql.JSON` type, so that a PG/MySQL-agnostic JSON column may be used. The type features basic index and path searching support. fixes #3619 - reorganization of migration docs etc. to try to refer both to the fixes to JSON that helps Postgresql while at the same time indicating these are new features of the new base JSON type. - a rework of the Array/Indexable system some more, moving things that are specific to Array out of Indexable. - new operators for JSON indexing added to core so that these can be compiled by the PG and MySQL dialects individually - rename sqltypes.Array to sqltypes.ARRAY - as there is no generic Array implementation, this is an uppercase type for now, consistent with the new sqltypes.JSON type that is also not a generic implementation. There may need to be some convention change to handle the case of datatypes that aren't generic, rely upon DB-native implementations, but aren't necessarily all named the same thing.
| * - break out mysql/base into modules as it's getting huge with more to comeMike Bayer2016-01-041-1/+2
| |
| * - An adjustment to the regular expression used to parse MySQL views,Mike Bayer2015-12-221-0/+31
| | | | | | | | | | | | | | such that we no longer assume the "ALGORITHM" keyword is present in the reflected view source, as some users have reported this not being present in some Amazon RDS environments. fixes #3613
| * - fix changelog for #3602Mike Bayer2015-12-081-1/+6
| | | | | | | | | | | | - add version switch for backend fsp test (cherry picked from commit 67b22cee3ab2c17b61100f1ccd69081082c0f074)
| * - make this DROP conditional, attempting to isolate why jenkins hasMike Bayer2015-12-081-1/+1
| | | | | | | | an issue with just one test
| * - Fixed bug in MySQL reflection where the "fractional sections portion"Mike Bayer2015-12-071-2/+8
| | | | | | | | | | | | | | | | of the :class:`.mysql.DATETIME`, :class:`.mysql.TIMESTAMP` and :class:`.mysql.TIME` types would be incorrectly placed into the ``timestamp`` attribute, which is unused by MySQL, instead of the ``fsp`` attribute. fixes #3602