summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/mysql
Commit message (Collapse)AuthorAgeFilesLines
* - Added support for rendering "FULL OUTER JOIN" to both Core and ORM.Mike Bayer2016-03-281-1/+8
| | | | Pull request courtesy Stefan Urbanek. fixes #1957
* - changelog and docs for #3332, fixes #3332Mike Bayer2016-03-151-7/+35
| | | | | | - make docs for isolation level more consistent between postgresql and mysql - move mysql autocommit tests
* Merge branch 'master' into pr157Mike Bayer2016-03-1514-1569/+1801
|\
| * - add changelog and migration notes for new Enum features,Mike Bayer2016-02-021-25/+17
| | | | | | | | | | | | | | | | | | | | | | | | 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
| * - happy new yearMike Bayer2016-01-2914-14/+14
| |
| * - Added :class:`.mysql.JSON` for MySQL 5.7. The JSON type providesMike Bayer2016-01-063-6/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-044-1488/+1534
| |
| * - An adjustment to the regular expression used to parse MySQL views,Mike Bayer2015-12-221-1/+1
| | | | | | | | | | | | | | 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
| * Add new reserved words for MySQL 5.7.pr/222Hanno Schlichting2015-12-141-0/+2
| |
| * - Fixed bug in MySQL reflection where the "fractional sections portion"Mike Bayer2015-12-071-0/+5
| | | | | | | | | | | | | | | | 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
| * - cross-linking for pool recycle featureMike Bayer2015-10-301-0/+5
| |
| * - The system by which a :class:`.Column` considers itself to be anMike Bayer2015-10-071-31/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "auto increment" column has been changed, such that autoincrement is no longer implicitly enabled for a :class:`.Table` that has a composite primary key. In order to accommodate being able to enable autoincrement for a composite PK member column while at the same time maintaining SQLAlchemy's long standing behavior of enabling implicit autoincrement for a single integer primary key, a third state has been added to the :paramref:`.Column.autoincrement` parameter ``"auto"``, which is now the default. fixes #3216 - The MySQL dialect no longer generates an extra "KEY" directive when generating CREATE TABLE DDL for a table using InnoDB with a composite primary key with AUTO_INCREMENT on a column that isn't the first column; to overcome InnoDB's limitation here, the PRIMARY KEY constraint is now generated with the AUTO_INCREMENT column placed first in the list of columns.
| * - as the Concatenable mixin was changed to support calling down toMike Bayer2015-08-181-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | "super" instead of hardcoding to "self.type" for the default return value, the base Comparator was returning other_comparator.type. It's not clear what the rationale for this was, though in theory the base Comparator should possibly even throw an exception if the two types aren't the same (or of the same affinity?) . - mysql.SET was broken on this because the bitwise version adds "0" to the value to force an integer within column_expression, we are doing type_coerces here now in any case so that there is no type ambiguity for this operation
| * - Fixed support for "literal_binds" mode when using limit/offsetMike Bayer2015-04-231-1/+1
| | | | | | | | | | | | with Firebird, so that the values are again rendered inline when this is selected. Related to :ticket:`3034`. fixes #3381
| * - Fixed unicode support for PyMySQL when using an "executemany"Mike Bayer2015-03-221-0/+5
| | | | | | | | | | | | | | | | | | operation with unicode parameters. SQLAlchemy now passes both the statement as well as the bound parameters as unicode objects, as PyMySQL generally uses string interpolation internally to produce the final statement, and in the case of executemany does the "encode" step only on the final statement. fixes #3337
| * - more updates to the unicode mess to frame this inMike Bayer2015-03-225-75/+63
| | | | | | | | as up-to-date recommendations as possible
| * some doc defensesMike Bayer2015-03-213-2/+10
| |
| * - Repaired the commit for issue #2771 which was inadvertently commentedMike Bayer2015-03-201-1/+1
| | | | | | | | | | | | out. - add __backend__ to the dialect suite so that it runs on CI. - will be 1.0.0b3
| * Merge branch 'mysqlclient' of https://bitbucket.org/methane/sqlalchemy into pr48Mike Bayer2015-03-201-0/+9
| |\ | | | | | | | | | | | | Conflicts: lib/sqlalchemy/dialects/mysql/mysqldb.py
| | * Add mention about mysqlclientINADA Naoki2015-03-141-2/+4
| | |
| * | - reorganize MySQL docs re: unicode, other cleanup and updatesMike Bayer2015-03-208-21/+79
| | |
| * | Merge branch 'support-emoji-on-mysql' of ↵Mike Bayer2015-03-202-1/+21
| |\ \ | | | | | | | | | | | | https://bitbucket.org/graingert/sqlalchemy into pr49
| | * | add utf8mb4 recommendationThomas Grainger2015-03-181-0/+12
| | | |
| | * | map MySQL encodings to python encodings fixes #2771Thomas Grainger2015-03-181-1/+9
| | |/
| * | Merge remote-tracking branch 'origin/pr/158' into pr158Mike Bayer2015-03-201-1/+3
| |\ \ | | |/ | |/|
| | * fix Python 2-specific byte conversionpr/158David Marin2015-02-051-1/+3
| | |
| * | - The Postgresql :class:`.postgresql.ENUM` type will emit aMike Bayer2015-03-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DROP TYPE instruction when a plain ``table.drop()`` is called, assuming the object is not associated directly with a :class:`.MetaData` object. In order to accomodate the use case of an enumerated type shared between multiple tables, the type should be associated directly with the :class:`.MetaData` object; in this case the type will only be created at the metadata level, or if created directly. The rules for create/drop of Postgresql enumerated types have been highly reworked in general. fixes #3319
| * | - copyright 2015Mike Bayer2015-03-1010-10/+10
| | |
* | | Add 'native' autocommit support for mysql driverspr/157Roman Podoliaka2015-02-243-0/+33
|/ / | | | | | | | | | | Sometimes it might be useful to have 'native' autocommit support provided by a DB API driver rather than rely on SQLAlchemy autocommit emulation.
* | - The MySQL dialect now supports CAST on types that are constructedMike Bayer2015-02-091-3/+6
| | | | | | | | as :class:`.TypeDecorator` objects.
* | - add a fix to MySQL re: #3074 tests, make sure we check table is presentMike Bayer2015-02-091-1/+2
| |
* | - A warning is emitted when :func:`.cast` is used with the MySQLMike Bayer2015-02-091-0/+7
|/ | | | | | | | | | | dialect on a type where MySQL does not support CAST; MySQL only supports CAST on a subset of datatypes. SQLAlchemy has for a long time just omitted the CAST for unsupported types in the case of MySQL. While we don't want to change this now, we emit a warning to show that it's taken place. A warning is also emitted when a CAST is used with an older MySQL version (< 4) that doesn't support CAST at all, it's skipped in this case as well. fixes #3237
* - The MySQL dialect now renders TIMESTAMP with NULL / NOT NULL inMike Bayer2015-02-051-48/+40
| | | | | | | | | all cases, so that MySQL 5.6.6 with the ``explicit_defaults_for_timestamp`` flag enabled will will allow TIMESTAMP to continue to work as expected when ``nullable=False``. Existing applications are unaffected as SQLAlchemy has always emitted NULL for a TIMESTAMP column that is ``nullable=True``. fixes #3155
* - Added new user-space accessors for viewing transaction isolationMike Bayer2015-01-201-1/+1
| | | | | | | | | levels; :meth:`.Connection.get_isolation_level`, :attr:`.Connection.default_isolation_level`. - enhance documentation inter-linkage between new accessors, existing isolation_level parameters, as well as in the dialect-level methods which should be fully covered by Engine/Connection level APIs now.
* - Custom dialects that implement :class:`.GenericTypeCompiler` canMike Bayer2015-01-161-37/+39
| | | | | | | | | | | | | | now be constructed such that the visit methods receive an indication of the owning expression object, if any. Any visit method that accepts keyword arguments (e.g. ``**kw``) will in most cases receive a keyword argument ``type_expression``, referring to the expression object that the type is contained within. For columns in DDL, the dialect's compiler class may need to alter its ``get_column_specification()`` method to support this as well. The ``UserDefinedType.get_col_spec()`` method will also receive ``type_expression`` if it provides ``**kw`` in its argument signature. fixes #3074
* - use a different bitwise approach here that doesn't require iteratingMike Bayer2015-01-031-5/+6
| | | | through all possible set values
* - The :class:`.mysql.SET` type has been overhauled to no longerMike Bayer2015-01-031-49/+114
| | | | | | | | | | | | | | assume that the empty string, or a set with a single empty string value, is in fact a set with a single empty string; instead, this is by default treated as the empty set. In order to handle persistence of a :class:`.mysql.SET` that actually wants to include the blank value ``''`` as a legitimate value, a new bitwise operational mode is added which is enabled by the :paramref:`.mysql.SET.retrieve_as_bitwise` flag, which will persist and retrieve values unambiguously using their bitflag positioning. Storage and retrieval of unicode values for driver configurations that aren't converting unicode natively is also repaired. fixes #3283
* - restate sort_tables in terms of a more fine grainedMike Bayer2015-01-011-2/+2
| | | | | | | | | | | | | sort_tables_and_constraints function. - The DDL generation system of :meth:`.MetaData.create_all` and :meth:`.Metadata.drop_all` has been enhanced to in most cases automatically handle the case of mutually dependent foreign key constraints; the need for the :paramref:`.ForeignKeyConstraint.use_alter` flag is greatly reduced. The system also works for constraints which aren't given a name up front; only in the case of DROP is a name required for at least one of the constraints involved in the cycle. fixes #3282
* - ouch, this needs to be in dbapi, not module level!Mike Bayer2014-12-191-7/+8
|
* - make the google deprecation messages more specific, use full URLMike Bayer2014-12-192-4/+15
| | | | | | format - add an extra doc to MySQLdb - changelog
* Update gaerdbms to highlight improved connection methodRob Berry2014-12-181-0/+12
|
* - Added a version check to the MySQLdb dialect surrounding theMike Bayer2014-12-161-6/+7
| | | | | check for 'utf8_bin' collation, as this fails on MySQL server < 5.0. fixes #3274
* - Updated the "supports_unicode_statements" flag to True for MySQLdbMike Bayer2014-12-042-3/+2
| | | | | | | | | and Pymysql under Python 2. This refers to the SQL statements themselves, not the parameters, and affects issues such as table and column names using non-ASCII characters. These drivers both appear to support Python 2 Unicode objects without issue in modern versions. fixes #3121
* - The :meth:`.Operators.match` operator is now handled such that theMike Bayer2014-12-041-0/+9
| | | | | | | | | | | | | | | | return type is not strictly assumed to be boolean; it now returns a :class:`.Boolean` subclass called :class:`.MatchType`. The type will still produce boolean behavior when used in Python expressions, however the dialect can override its behavior at result time. In the case of MySQL, while the MATCH operator is typically used in a boolean context within an expression, if one actually queries for the value of a match expression, a floating point value is returned; this value is not compatible with SQLAlchemy's C-based boolean processor, so MySQL's result-set behavior now follows that of the :class:`.Float` type. A new operator object ``notmatch_op`` is also added to better allow dialects to define the negation of a match operation. fixes #3263
* - don't do inline string interpolation when loggingJon Nelson2014-11-111-1/+1
|
* - Mysqlconnector as of version 2.0, probably as a side effect ofMike Bayer2014-10-121-6/+40
| | | | | | | | | | | | | | | | the python 3 merge, now does not expect percent signs (e.g. as used as the modulus operator and others) to be doubled, even when using the "pyformat" bound parameter format (this change is not documented by Mysqlconnector). The dialect now checks for py2k and for mysqlconnector less than version 2.0 when detecting if the modulus operator should be rendered as ``%%`` or ``%``. - Unicode SQL is now passed for MySQLconnector version 2.0 and above; for Py2k and MySQL < 2.0, strings are encoded. Note that mysqlconnector as of 2.0.1 appears to have a bug with unicode DDL on py2k, so the tests here are skipping until we observe it's fixed. - take out profiling on mysqlconnector, callcounts vary too much with its current development speed
* Merge remote-tracking branch 'origin/pr/140' into pr140Mike Bayer2014-10-112-3/+3
|\
| * cleanup exception handling - use new exception hierarchy (since python 2.5)pr/140ndparker2014-10-022-9/+3
| |
| * improve exception vs. exit handlingndparker2014-09-232-0/+6
| |
* | - use provide_metadata for new unique constraint / index testsMike Bayer2014-10-041-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - add a test for PG reflection of unique index without any unique constraint - for PG, don't include 'duplicates_constraint' in the entry if the index does not actually mirror a constraint - use a distinct method for unique constraint reflection within table - catch unique constraint not implemented condition; this may be within some dialects and also is expected to be supported by Alembic tests - migration + changelogs for #3184 - add individual doc notes as well to MySQL, Postgreql fixes #3184