summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/mysql
Commit message (Collapse)AuthorAgeFilesLines
* fix Python 2-specific byte conversionpr/158David Marin2015-02-051-1/+3
|
* - 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
* | 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-2010-275/+327
| | | | sqlalchemy/orm, sqlalchemy/event, sqlalchemy/testing
* - break up the <authors> copyright comment as part of a passMike Bayer2014-07-0910-10/+20
| | | | to get all flake8 passing
* - Changed the default value of "raise_on_warnings" to False forMike Bayer2014-07-091-1/+3
| | | | | | | | MySQLconnector. This was set at True for some reason. The "buffered" flag unfortunately must stay at True as MySQLconnector does not allow a cursor to be closed unless all results are fully fetched. fixes #2515 - lots of MySQL tests seemed to not be hitting all backends, so we should be getting some mysqlconnector failures now
* - 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
* - Fixed bug where column names added to ``mysql_length`` parameterMike Bayer2014-06-181-3/+7
| | | | | | | | on an index needed to have the same quoting for quoted names in order to be recognized. The fix makes the quotes optional but also provides the old behavior for backwards compatibility with those using the workaround. fixes #3085
* - remove drizzle dialectMike Bayer2014-05-301-20/+123
| | | | | - restore mysqldb fully within dialects/mysql/, it's no longer a connector. fixes #2984
* - fix some identity map accessorsMike Bayer2014-05-241-1/+1
| | | | - fix a bad comparison in MySQL w/ limit/offset thing
* Merge branch 'issue_3034' of ↵Mike Bayer2014-05-161-8/+8
|\ | | | | | | https://bitbucket.org/dobesv/sqlalchemy/branch/issue_3034 into ticket_3034
| * Use _offset_clause and _limit_clause, which are always Visitable and usually ↵Dobes Vandermeer2014-04-251-8/+8
| | | | | | | | a BindParameter, instead of _offset and _limit in GenerativeSelect.
* | Merged in WSMcG/sqlalchemy (pull request #15) Mike Bayer2014-05-121-1/+1
|\ \ | | | | | | Added optional '=' to MySQL KEY_BLOCK_SIZE regex
| * | Added optional '=' to MySQL KEY_BLOCK_SIZE regexW. Sean McGivern2014-04-191-1/+1
| |/
* | Fix many typos throughout the codebasepr/85Alex Gaynor2014-04-261-1/+1
|/ | | | Found using: https://github.com/intgr/topy
* - Tweaked the settings for mysql-connector-python; in Py2K, theMike Bayer2014-03-271-1/+4
| | | | | | | | | | | "supports unicode statements" flag is now False, so that SQLAlchemy will encode the *SQL string* (note: *not* the parameters) to bytes before sending to the database. This seems to allow all unicode-related tests to pass for mysql-connector, including those that use non-ascii table/column names, as well as some tests for the TEXT type using unicode under cursor.executemany(). - other mysql-connector fixes; latest version seems to do better on function call counts
* cut out the BS as far as MySQLdb urls, put the one url everyone should be usingMike Bayer2014-03-041-22/+14
|
* - add a topological rule here to place PARTITIONS after PARTITION_BY,Mike Bayer2014-02-191-1/+2
| | | | for output consistency within the tests as well as in practice
* - Added new MySQL-specific :class:`.mysql.DATETIME` which includesMike Bayer2014-02-191-17/+73
| | | | | | | fractional seconds support; also added fractional seconds support to :class:`.mysql.TIMESTAMP`. DBAPI support is limited, though fractional seconds are known to be supported by MySQL Connector/Python. Patch courtesy Geert JM Vanderkelen. #2941
* Merge branch 'master' of https://bitbucket.org/50onred/sqlalchemy/overview ↵Mike Bayer2014-02-191-2/+2
|\ | | | | | | into t
| * Fixes MySQL dialect partitioningMarcus McCurdy2014-02-141-2/+2
| |
* | - update mysql connector python link, #2938Mike Bayer2014-02-181-1/+1
| |
* | - expand docs on MySQL table arguments beyond just storage enginesMike Bayer2014-02-151-30/+63
|/ | | | | - clarify section on "foreign key reflection" and group this in a section that refers to foreign keys.
* Parse server version info more robustlypr/69Matt (work)2014-02-111-1/+8
| | | | Closes #2934
* - Fixed bug which prevented MySQLdb-based dialects (e.g.Mike Bayer2014-02-031-0/+1
| | | | | | | | | | pymysql) from working in Py3K, where a check for "connection charset" would fail due to Py3K's more strict value comparison rules. The call in question wasn't taking the database version into account in any case as the server version was still None at that point, so the method overall has been simplified to rely upon connection.character_set_name(). [ticket:2933]
* - add a few missing methods to the cymysql dialectMike Bayer2014-02-021-0/+8
|