summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/mysql/base.py
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-151-1515/+147
|\
| * - happy new yearMike Bayer2016-01-291-1/+1
| |
| * - Added :class:`.mysql.JSON` for MySQL 5.7. The JSON type providesMike Bayer2016-01-061-3/+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-1488/+12
| |
| * - 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
| * - more updates to the unicode mess to frame this inMike Bayer2015-03-221-15/+54
| | | | | | | | as up-to-date recommendations as possible
| * some doc defensesMike Bayer2015-03-211-2/+4
| |
| * - 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
| * - reorganize MySQL docs re: unicode, other cleanup and updatesMike Bayer2015-03-201-1/+44
| |
| * Merge branch 'support-emoji-on-mysql' of ↵Mike Bayer2015-03-201-1/+9
| |\ | | | | | | | | | https://bitbucket.org/graingert/sqlalchemy into pr49
| | * 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-101-1/+1
| | |
* | | Add 'native' autocommit support for mysql driverspr/157Roman Podoliaka2015-02-241-0/+8
|/ / | | | | | | | | | | 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
* - 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
|
* Merge remote-tracking branch 'origin/pr/140' into pr140Mike Bayer2014-10-111-2/+2
|\
| * cleanup exception handling - use new exception hierarchy (since python 2.5)pr/140ndparker2014-10-021-6/+2
| |
| * improve exception vs. exit handlingndparker2014-09-231-0/+4
| |
* | - 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
* | Reflect unique constraints when reflecting a Table objectJohannes Erdfelt2014-09-171-1/+2
|/ | | | | | | | | | | | | | | Calls to reflect a table did not create any UniqueConstraint objects. The reflection core made no calls to get_unique_constraints and as a result, the sqlite dialect would never reflect any unique constraints. MySQL transparently converts unique constraints into unique indexes, but SQLAlchemy would reflect those as an Index object and as a UniqueConstraint. The reflection core will now deduplicate the unique constraints. PostgreSQL would reflect unique constraints as an Index object and as a UniqueConstraint object. The reflection core will now deduplicate the unique indexes.
* - omit MySQL index flavor if its NoneMike Bayer2014-09-051-1/+2
|
* - MySQL boolean symbols "true", "false" work again. 0.9's changeMike Bayer2014-09-051-0/+12
| | | | | | | | | | | in :ticket:`2682` disallowed the MySQL dialect from making use of the "true" and "false" symbols in the context of "IS" / "IS NOT", but MySQL supports this syntax even though it has no boolean type. MySQL remains "non native boolean", but the :func:`.true` and :func:`.false` symbols again produce the keywords "true" and "false", so that an expression like ``column.is_(true())`` again works on MySQL. fixes #3186
* - ensure literal_binds works with LIMIT clause, FOR UPDATEMike Bayer2014-09-031-6/+6
|
* - mention that FOUND_ROWS is hardcoded; fixes #3146Mike Bayer2014-08-251-7/+5
|
* - rewrite all the sqlite/pysqlite transaction isolation docsMike Bayer2014-08-091-0/+2
|
* - add some docs to try to explain the behavior with MySQL / TIMESTAMP.Mike Bayer2014-08-041-0/+91
| | | | ref #3155
* - The MySQL dialect will now disable :meth:`.ConnectionEvents.handle_error`Mike Bayer2014-07-251-3/+6
| | | | | | | | | | events from firing for those statements which it uses internally to detect if a table exists or not. This is achieved using an execution option ``skip_user_error_events`` that disables the handle error event for the scope of that execution. In this way, user code that rewrites exceptions doesn't need to worry about the MySQL dialect or other dialects that occasionally need to catch SQLAlchemy specific exceptions.
* - apply pep8 formatting to sqlalchemy/sql, sqlalchemy/util, sqlalchemy/dialects,Brian Jarrett2014-07-201-224/+261
| | | | sqlalchemy/orm, sqlalchemy/event, sqlalchemy/testing
* - break up the <authors> copyright comment as part of a passMike Bayer2014-07-091-1/+2
| | | | to get all flake8 passing
* - MySQL error 2014 "commands out of sync" appears to be raised as aMike Bayer2014-06-271-1/+1
| | | | | | | ProgrammingError, not OperationalError, in modern MySQL-Python versions; all MySQL error codes that are tested for "is disconnect" are now checked within OperationalError and ProgrammingError regardless. fixes #3101