diff options
| author | LunarShaddow <aflyhorse@hotmail.com> | 2017-05-08 12:31:50 +0800 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-05-08 17:58:33 -0400 |
| commit | 2d5477e12ba677a0d6977ef35994a631a1b7abfc (patch) | |
| tree | e0553064adabfb0cfacf130fc9015c7a0b9d1193 /lib/sqlalchemy/dialects | |
| parent | aec264ba31316997ab3fecf75d911e78b1ed7c28 (diff) | |
| download | sqlalchemy-2d5477e12ba677a0d6977ef35994a631a1b7abfc.tar.gz | |
Break the lines to fit pdf and fix another broken syntax
(cherry picked from commit 3d19fb6d53c2aa0fdb7944569fa697c75785634c)
Change-Id: I17334d7673c645505af4eaaf2112544f2fa5e625
Diffstat (limited to 'lib/sqlalchemy/dialects')
| -rw-r--r-- | lib/sqlalchemy/dialects/mysql/base.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py index 9a1ec8553..93f35ef2f 100644 --- a/lib/sqlalchemy/dialects/mysql/base.py +++ b/lib/sqlalchemy/dialects/mysql/base.py @@ -205,8 +205,8 @@ Most MySQL DBAPIs offer the option to set the client character set for a connection. This is typically delivered using the ``charset`` parameter in the URL, such as:: - e = create_engine("mysql+pymysql://scott:tiger@localhost/\ -test?charset=utf8") + e = create_engine( + "mysql+pymysql://scott:tiger@localhost/test?charset=utf8") This charset is the **client character set** for the connection. Some MySQL DBAPIs will default this to a value such as ``latin1``, and some @@ -224,8 +224,8 @@ that includes codepoints more than three bytes in size, this new charset is preferred, if supported by both the database as well as the client DBAPI, as in:: - e = create_engine("mysql+pymysql://scott:tiger@localhost/\ -test?charset=utf8mb4") + e = create_engine( + "mysql+pymysql://scott:tiger@localhost/test?charset=utf8mb4") At the moment, up-to-date versions of MySQLdb and PyMySQL support the ``utf8mb4`` charset. Other DBAPIs such as MySQL-Connector and OurSQL @@ -237,8 +237,8 @@ the MySQL schema and/or server configuration may be required. .. seealso:: `The utf8mb4 Character Set \ -<http://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html>`_ - \ -in the MySQL documentation + <http://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html>`_ - \ + in the MySQL documentation Unicode Encoding / Decoding ~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -259,7 +259,8 @@ DBAPI's handling of unicode, such that it instead will return data of the ``str`` type or ``bytes`` type, with data in the configured charset:: # connect while disabling the DBAPI's unicode encoding/decoding - e = create_engine("mysql+mysqldb://scott:tiger@localhost/test?charset=utf8&use_unicode=0") + e = create_engine( + "mysql+mysqldb://scott:tiger@localhost/test?charset=utf8&use_unicode=0") Current recommendations for modern DBAPIs are as follows: @@ -408,7 +409,8 @@ storage engine. .. seealso:: - `CREATE INDEX <http://dev.mysql.com/doc/refman/5.0/en/create-index.html>`_ - MySQL documentation + `CREATE INDEX <http://dev.mysql.com/doc/refman/5.0/en/create-index.html>`_ - \ + MySQL documentation Index Types ~~~~~~~~~~~~~ |
