| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed performance regression caused by the fix for :ticket:`3937` where
cx_Oracle as of version 5.3 dropped the ``.UNICODE`` symbol from its
namespace, which was interpreted as cx_Oracle's "WITH_UNICODE" mode being
turned on unconditionally, which invokes functions on the SQLAlchemy
side which convert all strings to unicode unconditionally and causing
a performance impact. In fact, per cx_Oracle's author the
"WITH_UNICODE" mode has been removed entirely as of 5.1, so the expensive unicode
conversion functions are no longer necessary and are disabled if
cx_Oracle 5.1 or greater is detected under Python 2. The warning against
"WITH_UNICODE" mode that was removed under :ticket:`3937` is also restored.
Change-Id: Iddd38d81a5adb27c953a5ee2eae5529a21da16e1
Fixes: #4035
|
| |
|
|
|
|
|
|
|
|
|
| |
Added support for MySQL's ON DUPLICATE KEY UPDATE
MySQL-specific :class:`.mysql.dml.Insert` object.
Pull request courtesy Michael Doronin.
Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Resolves: #4009
Change-Id: Ic71424f3c88af6082b48a910a2efb7fbfc0a7eb4
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/365
|
| |
|
|
|
|
|
|
|
|
|
| |
MySQL 5.7 has introduced permission limiting for the "SHOW VARIABLES"
command; the MySQL dialect will now handle when SHOW returns no
row, in particular for the initial fetch of SQL_MODE, and will
emit a warning that user permissions should be modified to allow the
row to be present.
Change-Id: I98e7a69230da397b17eae07b7e9d024fa7aeeb26
Fixes: #4007
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed bug where using :class:`.ARRAY` with a string type that
features a collation would fail to produce the correct syntax
within CREATE TABLE.
The "COLLATE" must appear to the right of the array dimensions,
so we are using regexp substitution to insert the brackets in the
appropriate place. A more heavyweight solution would be that datatypes
know how to split up their base type vs. modifiers, but as this is
so specific to Postgresql ARRAY it's better to handle these cases
more locally.
Change-Id: I394c3c673eb60689e51b5301e51651972cfdb4c0
Fixes: #4006
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Continuing with the fix that correctly handles Postgresql
version string "10devel" released in 1.1.8, an additional regexp
bump to handle version strings of the form "10beta1". While
Postgresql now offers better ways to get this information, we
are sticking w/ the regexp at least through 1.1.x for the least
amount of risk to compatibility w/ older or alternate Postgresql
databases.
Change-Id: I12ddb06465f7dcf80563c27632441ef5963f60d4
Fixes: #4005
|
| |
|
|
|
|
|
|
| |
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/326
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/342
Fixes: #4002
Change-Id: I221fe8ba305fc455a03e3a5d15f803bf8ee2e8fb
|
| |
|
|
|
|
|
|
|
|
|
| |
Added a placeholder type :class:`.mssql.XML` to the SQL Server
dialect, so that a reflected table which includes this type can
be re-rendered as a CREATE TABLE. The type has no special round-trip
behavior nor does it currently support additional qualifying
arguments.
Change-Id: I651fa729bd8e9b31a0b5effe0839aff077d77c46
Fixes: #3973
|
| |
|
|
|
|
|
|
|
|
|
| |
Support for two-phase transactions has been removed entirely for
cx_Oracle when version 6.0b1 or later of the DBAPI is in use. The two-
phase feature historically has never been usable under cx_Oracle 5.x in
any case, and cx_Oracle 6.x has removed the connection-level "twophase"
flag upon which this feature relied.
Change-Id: I2e8161cc2bc12f4845c9224cd483038112fe9734
Fixes: #3997
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Added support for views that are unreflectable due to stale
table definitions, when calling :meth:`.MetaData.reflect`; a warning
is emitted for the table that cannot respond to ``DESCRIBE``
but the operation succeeds. The MySQL dialect now
raises UnreflectableTableError which is in turn caught by
MetaData.reflect(). Reflecting the view standalone raises
this error directly.
Change-Id: Id8005219d8e073c154cc84a873df911b4a6cf4d6
Fixes: #3871
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fixed bug where SQL Server transaction isolation must be fetched
from a different view when using Azure data warehouse, the query
is now attempted against both views and then a NotImplemented
is raised unconditionally if failure continues to provide the
best resiliency against future arbitrary API changes in new
SQL Server versions.
Change-Id: I621b5089febe8ace136428fa133fde1a7e21cda4
Fixes: #3994
|
| | |
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixed bug in cx_Oracle dialect where version string parsing would
fail for cx_Oracle version 6.0b1 due to the "b" character. Version
string parsing is now via a regexp rather than a simple split.
Change-Id: I2af7172b0d7184e3ea3bd051e9fa8d6ca2a571cd
Fixes: #3975
|
| |/
|
|
|
|
|
| |
Extends `AUTOCOMMIT_REGEXP` for the postgres dialect to include `GRANT` and `REVOKE`.
Change-Id: Iba15f1ebf5bd7bc0fc1193fdf561417e53bf5d57
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/357
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Since postgresql_ops explicitly states that it expects
string keys, to apply to a function call or expression one
needs to give the SQL expression a label that can be referred
to by name in the dictionary. test / document this.
Change-Id: I4bc4ade46dac27f9c1b92e7823433292beab97b9
Fixes: #3970
|
| |
|
|
|
|
|
|
|
| |
Removed an ancient and unnecessary intercept of the UTC_TIMESTAMP
MySQL function, which was getting in the way of using it with a
parameter.
Change-Id: I6e6b52c051418bcb9d31987e78299310810cb78d
Fixes: #3966
|
| |
|
|
|
|
|
|
|
|
| |
For some reason, when ARRAY was added to the base it was never linked
to postgresql.ARRAY. Link the two types and also make base
ARRAY the schema event target so that it supports the same
features as postgresql.ARRAY.
Change-Id: I82fa6c9d2b8c5028dba3a009715f7bc296b2bc0b
Fixes: #3964
|
| |
|
|
|
|
|
|
|
| |
Move down all the PARTITION, SUBPARTITION options
into a separate segment so that they come out at the
end of CREATE TABLE after the table options.
Change-Id: Iaa1c823848c93680ca22d72bda1b7c49742b9060
Fixes: #3961
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Added support for all possible "fields" identifiers when reflecting the
Postgresql ``INTERVAL`` datatype, e.g. "YEAR", "MONTH", "DAY TO
MINUTE", etc.. In addition, the :class:`.postgresql.INTERVAL`
datatype itself now includes a new parameter
:paramref:`.postgresql.INTERVAL.fields` where these qualifiers can be
specified; the qualifier is also reflected back into the resulting
datatype upon reflection / inspection.
Change-Id: I33816e68c533b023e0632db6f4e73fefd2de4721
Fixes: #3959
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch moves the "doubling" of percent signs into
the base compiler and makes it completely a product
of whether or not the paramstyle is format/pyformat or
not. Without this paramstyle, percent signs
are not doubled across text(), literal_column(), and
column().
Change-Id: Ie2f278ab1dbb94b5078f85c0096d74dbfa049197
Fixes: #3740
|
| |/
|
|
|
|
|
|
|
|
|
|
|
| |
The SQL Server dialect now allows for a database and/or owner name
with a dot inside of it, using brackets explicitly in the string around
the owner and optionally the database name as well. In addition,
sending the :class:`.quoted_name` construct for the schema name will
not split on the dot and will deliver the full string as the "owner".
:class:`.quoted_name` is also now available from the ``sqlalchemy.sql``
import space.
Change-Id: I77491d63ce47638bd23787d903ccde2f35a9d43d
Fixes: #2626
|
| |
|
|
|
|
|
|
|
| |
Added support for parsing the Postgresql version string for
a development version like "PostgreSQL 10devel". Pull request
courtesy Sean McCully.
Change-Id: I7bc18bc4d290349c23e9796367b7d694d0873096
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/351
|
| |
|
|
|
|
|
|
|
|
| |
Some options need to be passed to engines in all cases,
such as currently the oracle 12516 workaround. make sure
calls to testing_engine also set up the dictionary with
defaults even if options is passed. not clear if this affects
other backends yet.
Change-Id: I5a1f7634e4ce5af6fe55dc21a24db6afacd19bb7
|
| |
|
|
|
|
|
| |
After bump minimum supported version to 2.7 (1da9d3752160430c91534a8868ceb8c5ad1451d4), we can use new syntax.
Change-Id: Ib064c75a00562e641d132f9c57e5e69744200e05
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/347
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added support for SQL comments on :class:`.Table` and :class:`.Column`
objects, via the new :paramref:`.Table.comment` and
:paramref:`.Column.comment` arguments. The comments are included
as part of DDL on table creation, either inline or via an appropriate
ALTER statement, and are also reflected back within table reflection,
as well as via the :class:`.Inspector`. Supported backends currently
include MySQL, Postgresql, and Oracle.
Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Fixes: #1546
Change-Id: Ib90683850805a2b4ee198e420dc294f32f15d35d
|
| |
|
|
|
|
|
| |
Also add some tests to test_rowcount.
Change-Id: Idaa18fdc4fcfeb615725531c37de77decf76a783
Fixes: #3932
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Oracle reflection now "normalizes" the name given to a foreign key
constraint, that is, returns it as all lower case for a case
insensitive name. This was already the behavior for indexes
and primary key constraints as well as all table and column names.
This will allow Alembic autogenerate scripts to compare and render
foreign key constraint names correctly when initially specified
as case insensitive.
Change-Id: Ibb34ec6ce7cb244d1c4ae9d44ce2d37d37227e69
Fixes: #3276
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cx_Oracle 5.3 seems to code this flag ON now, so
remove the warning and ensure WITH_UNICODE handling works.
Additionally, the XE setup on jenkins is having more
problems here, in particular low-connections mode is
causing cx_Oracle to fail more frequently now. Turning
off low-connections fixes those but then we get the
TNS errors, so adding an emergency "retry" flag that
is not yet a feature available to users. Real world
applications are not dropping/creating thousands of
tables the way our test suite is.
Change-Id: Ie95b0e697276c404d3264c2e624e870463d966d6
Fixes: #3937
|
| |
|
|
|
|
|
|
| |
the test_metadata tests trigger the before_create dispatch without
the checkfirst flag. Postgresql backend should be able to
tolerate this.
Change-Id: Ife497cc3a4eb2812462116f94aad732864225f3f
|
| |
|
|
| |
Change-Id: Ibd63311dfccebbdf67e8ad7dc56ad311bf573895
|
| |
|
|
|
|
|
| |
Based on https://dev.mysql.com/doc/refman/8.0/en/keywords.html#table-keywords-new-8.0
Change-Id: I128c93520e57331e0ec4d40b0c0e752bf9b982d9
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/346
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added regular expressions for the "IMPORT FOREIGN SCHEMA",
"REFRESH MATERIALIZED VIEW" Postgresql statements so that they
autocommit when invoked via a connection or engine without
an explicit transaction. Pull requests courtesy Frazer McLean
and Paweł Stiasny.
Fixes: #3840
Co-authored-by: Frazer McLean
Co-authored-by: Paweł Stiasny
Change-Id: I92b2b61683d29d57fa23a66a3559120cb1241c2f
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/323
|
| |
|
|
|
|
|
|
|
| |
Fixed bug in Postgresql :class:`.ExcludeConstraint` where the
"whereclause" and "using" parameters would not be copied during an
operation like :meth:`.Table.tometadata`.
Change-Id: I2f704981d4d4862f9c82a50272006fab8becebb6
Fixes: #3900
|
| |
|
|
|
|
|
|
|
|
| |
Added a version check to the "get_isolation_level" feature, which is
invoked upon first connect, so that it skips for SQL Server version
2000, as the necessary system view is not available prior to SQL Server
2005.
Change-Id: If4f860513f0aae6625803f449714aedfc5075f57
Fixes: #3898
|
| |
|
|
|
|
|
| |
for ExcludeConstraint, if string is used then quoting must
be applied manually. fixes #3899
Change-Id: I5885c90179e4056b84fc4776464bba7c8c70a80a
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Include the metadata argument for the Sequence
and explain the rationale. Correct inconsistencies
between Core / ORM examples and update language
regarding client side vs. server side Sequence
directive.
Co-authored-by: Stéphane Raimbault <stephane.raimbault@gmail.com>
Change-Id: I65c522acf9bdf25041a5baf2e10be41f0927999a
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/341
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The MySQL dialect now will not warn when a reflected column has a
"COMMENT" keyword on it, but note however the comment is not yet
reflected; this is on the roadmap for a future release. Pull request
courtesy Lele Long.
Fixes: #3867
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/324
Change-Id: I869e29aba6766d0eda1e59af09a3e8e3748a3942
|
| |/
|
|
|
|
|
|
|
| |
Added a new parameter ``mysql_prefix`` supported by the :class:`.Index`
construct, allows specification of MySQL-specific prefixes such as
"FULLTEXT". Pull request courtesy Joseph Schorr.
Change-Id: I5a21fa466fdfd4d9e39e1fb4ecec1eab93b92c36
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/339
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixed bug in new "ON CONFLICT DO UPDATE" feature where the "set"
values for the UPDATE clause would not be subject to type-level
processing, as normally takes effect to handle both user-defined
type level conversions as well as dialect-required conversions, such
as those required for JSON datatypes. Additionally, clarified that
the keys in the set_ dictionary should match the "key" of the column,
if distinct from the column name. A warning is emitted
for remaining column names that don't match column keys; for
compatibility reasons, these are emitted as they were previously.
Fixes: #3888
Change-Id: I67a04c67aa5f65e6d29f27bf3ef2f8257088d073
|
| |\ \
| |/
|/| |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Corrects some warnings and adds tox config. Adds DeprecationWarning
to the error category. Large sweep for string literals w/ backslashes
as this is common in docstrings
Co-authored-by: Andrii Soldatenko
Fixes: #3886
Change-Id: Ia7c838dfbbe70b262622ed0803d581edc736e085
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/337
|
| |/
|
|
|
|
| |
fixes #3887
Change-Id: I6d1a13b7bb4169204105c7a100d17cfed3ded9d1
|
| |\ |
|
| | |
| |
| |
| | |
Change-Id: I4e8c2aa8fe817bb2af8707410fa0201f938781de
|
| |/
|
|
| |
Change-Id: I9836b842be01ef24138071fa022d80f5f77be14f
|