| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
A full rewrite of all imports and pep8 formatting using zimports, black,
commits are broken into sections.
Directories included in this commit:
test/dialect/
Change-Id: Iec0231a43eb00122fcaaec942f1528ac4a33e59d
(cherry picked from commit e88e29bb8e1aced6898d2aa7105c6e9eae528291)
|
| |
|
|
| |
Change-Id: I0d7f5105f838a0275f3c240441bdcdc9ae7444d0
|
| |
|
|
| |
Change-Id: Ia661822e9d1792da8f965fe3cbb00cce288c8739
|
| |
|
|
|
|
|
|
|
|
|
|
| |
A full rewrite of all imports and pep8 formatting using zimports, black,
commits are broken into sections.
Directories included in this commit:
lib/sqlalchemy/testing/ lib/sqlalchemy/util/
Change-Id: Ia686b88e8b334874716de0be5e383c7b2abe5643
(cherry picked from commit 40ba6aca86362f54a27ae3380cb453ec6fd4448f)
|
| |
|
|
|
|
|
| |
manually merged exaples.
Change-Id: I9532d3b13d13f2769e6ca48eea23dd7d4041f68f
(cherry picked from commit e3bdd80c6661c0e95fb67998c57540be667ce761)
|
| | |
|
| |
|
|
| |
includes adjustment to setup.py to recognize __version__ correctly
|
| |
|
|
|
|
|
|
| |
The expression was expecting spaces which means we were skipping
Postgresql window function tests and possibly other things.
Change-Id: I57c4aed558f4011f2f7b882a2d9b1fee210f9eaf
(cherry picked from commit 1eaf9dc7776b9833a9fb62fe630b4b9ac63a31f4)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Author: Lele Gaifax <lele@metapensiero.it>
Date: Tue Dec 25 12:35:41 2018 +0100
Consistently use "PostgreSQL", fixing also a few doc glitches
commit 0e382aaee4427193926f0dc10ad29056bc12c85e
Author: Lele Gaifax <lele@metapensiero.it>
Date: Tue Dec 25 12:08:49 2018 +0100
Remove duplicated words
Change-Id: Iaa586b9412f46a50fe6ff3bbb92e07d6cb1905c8
(cherry picked from commit c0f9708fde39175c8695fdd87873464f516fdf98)
|
| |
|
|
|
|
|
|
|
|
|
| |
Use the existence of ConnectionRecord.connection to estimate
that this connection is likely closed, and if so, don't
try to call "rollback" on it. This rollback is normally harmless
but is causing segfaults in mysqlclient due to
https://github.com/PyMySQL/mysqlclient-python/issues/270.
Change-Id: I1d7c5f5a520527d8268b6334795c2051f7ceeea6
(cherry picked from commit a8781b51b4039eee56791b9dbfdee183f7a5b797)
|
| |
|
|
|
|
|
|
|
|
| |
MariaDB seems to handle some additional UPDATE/DELETE FROM
syntaxes as well as some forms of INTERSECT and EXCEPT. Open
up tests that expect failure for MySQL to allow success for
MariaDB 10.3.
Change-Id: Ia9341a82485ef7201bb8130d8dbf4a9b6976035a
(cherry picked from commit 081d4275cf5c3e6842c8e0198542ff89617eaa96)
|
| |
|
|
|
|
|
|
|
|
| |
For cx_Oracle, Integer datatypes will now be bound to "int", per advice
from the cx_Oracle developers. Previously, using cx_Oracle.NUMBER caused a
loss in precision within the cx_Oracle 6.x series.
Change-Id: I4c6b2cca490aff5b98b7ceff3414715202881c89
Fixes: #4309
(cherry picked from commit 75d48e65eaac9e97283bb14fdec54a143d9997f1)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fixed bug in MSSQL reflection where when two same-named tables in different
schemas had same-named primary key constraints, foreign key constraints
referring to one of the tables would have their columns doubled, causing
errors. Pull request courtesy Sean Dunn.
Fixes: #4228
Change-Id: I7dabaaee0944e1030048826ba39fc574b0d63031
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/457
(cherry picked from commit ca94ea8ab583f8ab366ee5971bfc1bdd96e54cc9)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed bug in MySQLdb dialect and variants such as PyMySQL where an
additional "unicode returns" check upon connection makes explicit use of
the "utf8" character set, which in MySQL 8.0 emits a warning that utf8mb4
should be used. This is now replaced with a utf8mb4 equivalent.
Documentation is also updated for the MySQL dialect to specify utf8mb4 in
all examples. Additional changes have been made to the test suite to use
utf8mb3 charsets and databases (there seem to be collation issues in some
edge cases with utf8mb4), and to support configuration default changes made
in MySQL 8.0 such as explicit_defaults_for_timestamp as well as new errors
raised for invalid MyISAM indexes.
Change-Id: Ib596ea7de4f69f976872a33bffa4c902d17dea25
Fixes: #4283
Fixes: #4192
(cherry picked from commit c99345ee9994c3ea2a5e6536cc3365f18d017cc1)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed INSERT FROM SELECT with CTEs for the Oracle and MySQL dialects, where
the CTE was being placed above the entire statement as is typical with
other databases, however Oracle and MariaDB 10.2 wants the CTE underneath
the "INSERT" segment. Note that the Oracle and MySQL dialects don't yet
work when a CTE is applied to a subquery inside of an UPDATE or DELETE
statement, as the CTE is still applied to the top rather than inside the
subquery.
Also adds test suite support CTEs against backends.
Change-Id: I8ac337104d5c546dd4f0cd305632ffb56ac8bf90
Fixes: #4275
Fixes: #4230
(cherry picked from commit 3619edcb8aa3ceef2a44925b85315fc0e90c5982)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added new attribute :attr:`.Query.lazy_loaded_from` which is populated
with an :class:`.InstanceState` that is using this :class:`.Query` in
order to lazy load a relationship. The rationale for this is that
it serves as a hint for the horizontal sharding feature to use, such that
the identity token of the state can be used as the default identity token
to use for the query within id_chooser().
Also repaired an issue in the :meth:`.Result.with_post_criteria`
method added in I899808734458e25a023142c2c5bb37cbed869479
for :ticket:`4128` where the "unbake subquery loaders" version was calling
the post crtieria functions given the :class:`.Result` as the argument
rather than applying them to the :class:`.Query`.
Change-Id: I3c0919ce7fd151b80fe2f9b5f99f60df31c2d73d
Fixes: #4243
(cherry picked from commit a574b409296ef793cec8e1d00f1f7be48f15325e)
|
| |
|
|
|
|
|
|
|
|
| |
Fixed a bug in the test suite where if an external dialect returned
``None`` for ``server_version_info``, the exclusion logic would raise an
``AttributeError``.
Change-Id: I9124d3ac5484941081127274e6eb71f392fb94f7
Fixes: #4249
(cherry picked from commit 29ce87273e3f66797d87edc9673fd3868e28249a)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed a 1.2 regression caused by :ticket:`4061` where the SQL Server
"BIT" type would be considered to be "native boolean". The goal here
was to avoid creating a CHECK constraint on the column, however the bigger
issue is that the BIT value does not behave like a true/false constant
and cannot be interpreted as a standalone expression, e.g.
"WHERE <column>". The SQL Server dialect now goes back to being
non-native boolean, but with an extra flag that still avoids creating
the CHECK constraint.
Change-Id: I4765d2a2a00b0d14f50282603cc4d48d4739dac1
Fixes: #4250
(cherry picked from commit bd1d6012dcbe5fbc6d1097a79d85b972b0d4fd8a)
|
| |
|
|
|
|
|
|
|
|
| |
* Causes intermittent failure against Greenplum cluster
* Tested using Greenplum dialact:
https://github.com/PlaidCloud/sqlalchemy-greenplum
Change-Id: I6387e98f17a3667612fdaaadb27a08f79ec46398
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/440
(cherry picked from commit 5d5b9fe63d6d416bf21969bd1c27c1e1a754a2d3)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed 1.2 regression caused by :ticket:`4060` where the query used to
reflect SQL Server cross-schema foreign keys was limiting the criteria
incorrectly.
Additionally, added some rework of the inter-schema reflection tests
so that MySQL, MSSQL can be included, breaking out some of the
Postgresql-specific behaviors into separate requirements.
Fixes: #4234
Change-Id: I20c8e70707075f1767b79127c2c27d4b313c6515
(cherry picked from commit 9d5e117f6fcc38d8773bc943c615888dc8a3a819)
|
| |
|
|
|
|
|
|
|
|
|
| |
Fixed issue where the compilation of an INSERT statement with the
"literal_binds" option that also uses an explicit sequence and "inline"
generation, as on Postgresql and Oracle, would fail to accommodate the
extra keyword argument within the sequence processing routine.
Change-Id: Ibdab7d340aea7429a210c9535ccf1a3e85f074fb
Fixes: #4231
(cherry picked from commit b4eb29253cb29a069973503f36d1103d4a18311c)
|
| |
|
|
|
|
|
|
|
| |
The logic here seems to try to say something different when
__backend__ is True but it produces a nonsensical message,
since __only_on__ doesn't tell us about the implementation
we are actually running.
Change-Id: I14e20cadcba975f8efe8fdefa439c8b8c480b3ed
|
| |
|
|
|
|
|
|
|
| |
The ON DELETE options for foreign keys are now part of
Oracle reflection. Oracle does not support ON UPDATE
cascades. Pull request courtesy Miroslav Shubernetskiy.
Change-Id: I135cd6cd3436354a86b2c1e1437c3785c38eed26
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/418
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This is the only way I could get this test pass on informix, basically I strip every whitespace.
The sql text as recorded in informix is:
```
((a > 1 ) AND (a < 5 ) )
((a = 1 ) OR ((a > 2 ) AND (a <5 ) ) )
```
Yes, this is absolutely bonkers, but that is what I get :(
Change-Id: I936e860f2b75b521e5560c05c452dbe72f0d3812
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/413
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixed regression in 1.2 where newly repaired quoting
of collation names in :ticket:`3785` breaks SQL Server,
which explicitly does not understand a quoted collation
name. Whether or not mixed-case collation names are
quoted or not is now deferred down to a dialect-level
decision so that each dialect can prepare these identifiers
directly.
Change-Id: Iaf0a8123d9bf4711219e320896bb28c5d2649304
Fixes: #4154
|
| | |
| |
| |
| | |
Change-Id: I3ef36bfd0cb0ba62b3123c8cf92370a43156cf8f
|
| |\ \ |
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
MariaDB adds a JSON alias for the LONGTEXT datatype and
all the same json functions work against it in any case.
What doesn't work is reflection, since it's just an alias,
and also the CAST we were using in one of our tests doesn't seem
to work for JSON which is probably also because it's not
a real datatype.
Change-Id: I44e5503db29ca2f04de8e521527978f34675a5e0
|
| |/
|
|
|
|
|
|
|
| |
Fixed regression where the removal of most setinputsizes
rules from cx_Oracle dialect impacted the TIMESTAMP
datatype's ability to retrieve fractional seconds.
Fixes: #4157
Change-Id: Ic53109fd199aea8b9c4da14355e125849b8b198f
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Added a new exclusion rule group_by_complex_expression
which disables tests that use "GROUP BY <expr>", which seems
to be not viable for at least two third party dialects.
Change-Id: I47284513382ae93f5a3d12c734b3a44643147c99
|
| |/
|
|
|
|
|
|
| |
Removed an oracle-specific requirements rule from the public
test suite that was interfering with third party dialect
suites.
Change-Id: Iebae510edcb8ef908dcd9be9222888e12caed97d
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Added some additional rules to fully handle ``Decimal('Infinity')``,
``Decimal('-Infinity')`` values with cx_Oracle numerics when using
``asdecimal=True``.
Allow remaining cx_Oracle numeric tests that were waiting
for the refactor to be finished and forgot to get enabled.
Change-Id: I1e2365176e34559c0230c84f800a7cfe0a034ed5
Fixes: #4064
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implemented "DELETE..FROM" syntax for Postgresql, MySQL, MS SQL Server
(as well as within the unsupported Sybase dialect) in a manner similar
to how "UPDATE..FROM" works. A DELETE statement that refers to more than
one table will switch into "multi-table" mode and render the appropriate
"USING" or multi-table "FROM" clause as understood by the database.
Pull request courtesy Pieter Mulder.
For SQL syntaxes see:
Postgresql: https://www.postgresql.org/docs/current/static/sql-delete.html
MySQL: https://dev.mysql.com/doc/refman/5.7/en/delete.html#multiple-table_syntax
MSSQL: https://docs.microsoft.com/en-us/sql/t-sql/statements/delete-transact-sql
Sybase: http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc00801.1510/html/iqrefso/X315721.htm
Co-authored by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: I6dfd57b49e44a095d076dc493cd2360bb5d920d3
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/392
Fixes: #959
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Reworked the new "autoescape" feature introduced in
:ref:`change_2694` in 1.2.0b2 to be fully automatic; the escape
character now defaults to a forwards slash ``"/"`` and
is applied to percent, underscore, as well as the escape
character itself, for fully automatic escaping. The
character can also be changed using the "escape" parameter.
Change-Id: I74894a2576983c0f6eb89480c9e5727f49fa9c25
Fixes: #2694
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The test here commits even though integrityerror
was raised due to the fixture. Postgresql seems to allow
this even though it's usually strict about this. remove
the requirement that a database needs to be able to
commit after an integrity error was raised.
Change-Id: I437faadb04ff7a9c3f624c68646b4f4f504b504a
|
| |/
|
|
|
|
|
| |
I observed test runs that failed on 'test_bound_in_scalar' due to arbitrary ordering of the result set. The assertion not only tests for the elements to be present, but also for the correct ordering. Hence, the proposal to add an order_by clause to the select statements.
Change-Id: If1fbb864761e77dfd2a42ef857801c8aaf893bee
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/389
|
| |
|
|
|
|
|
|
|
|
|
| |
Fixed bug where SQLite CHECK constraint reflection would fail
if the referenced table were in a remote schema, e.g. on SQLite a
remote database referred to by ATTACH.
Also add suite support for general CHECK constraint reflection.
Change-Id: I073a72cb47dc4f8c5683000d708768523759332f
Fixes: #4099
|
| |
|
| |
./sqla_nose.py --dbs works fine with zero arguments, so `zeroarg_callback` should be treated as `callback`.
|
| |
|
|
|
|
|
|
|
| |
Drops support for cx_Oracle prior to version 5.x, reworks
numeric and binary support.
Fixes: #4064
Change-Id: Ib9ae9aba430c15cd2a6eeb4e5e3fd8e97b5fe480
|
| |
|
|
| |
Change-Id: Ie9bec6e8f51d52349dcbd8009981818e459e88b8
|
| |
|
|
| |
Change-Id: Ida0d01ae9bcc0573b86e24fddea620a38c962822
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added a new class of "rowcount support" for dialects that is specific to
when "RETURNING", which on SQL Server looks like "OUTPUT inserted", is in
use, as the PyODBC backend isn't able to give us rowcount on an UPDATE or
DELETE statement when OUTPUT is in effect. This primarily affects the ORM
when a flush is updating a row that contains server-calcluated values,
raising an error if the backend does not return the expected row count.
PyODBC now states that it supports rowcount except if OUTPUT.inserted is
present, which is taken into account by the ORM during a flush as to
whether it will look for a rowcount.
ORM tests are implicit in existing tests run against PyODBC
Fixes: #4062
Change-Id: Iff17cbe4c7a5742971ed85a4d58660c18cc569c2
|
| |
|
|
|
|
|
| |
To support adding AUTOCOMMIT to more dialects, add a suite
test
Change-Id: I585dcce19fcdce70e8cf21aea4edaa97d7bf2bb9
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed bug in new percent-sign support (e.g. :ticket:`3740`) where a bound
parameter rendered with literal_binds would fail to escape percent-signs
for relevant dialects. In addition, ensured new table / column comment
support feature also fully makes use of literal-rendered parameters so that
this percent sign support takes place with table / column comment DDL as
well, allowing percent sign support for the mysql / psycopg2 backends that
require escaping of percent signs.
Change-Id: Ia4136a300933e9bc6a01a7b9afd5c7b9a3fee4e3
Fixes: #4054
Fixes: #4052
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fixed regression introduced in 1.2.0b1 due to :ticket:`3934` where the
:class:`.Session` would fail to "deactivate" the transaction, if a
rollback failed (the target issue is when MySQL loses track of a SAVEPOINT).
This would cause a subsequent call to :meth:`.Session.rollback` to raise
an error a second time, rather than completing and bringing the
:class:`.Session` back to ACTIVE.
Fixes: #4050
Change-Id: Id245e8dd3487cb006b2d6631c8bd513b5ce81abe
|
| |
|
|
|
|
|
| |
PG CREATE DATABASE. as nobody will connect to it that would
solve the contention issue here
Change-Id: I00a4d52091876e120faff4a8a5493c53280d96f1
|
| |
|
|
|
| |
Change-Id: I69e39d2368f50b126c369ecc35e01799fd013254
(cherry picked from commit 3fc6f32ddc5fbbf439acff42c2fdae9e910154be)
|