Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e30deab

Browse filesBrowse files
committed
doc: expand TABs
1 parent 4158125 commit e30deab
Copy full SHA for e30deab

File tree

Expand file treeCollapse file tree

2 files changed

+99
-99
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+99
-99
lines changed

‎doc/_mysql.rst

Copy file name to clipboardExpand all lines: doc/_mysql.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ _mysql Module
44
.. automodule:: _mysql
55
:members:
66
:undoc-members:
7-
:show-inheritance:
7+
:show-inheritance:

‎doc/user_guide.rst

Copy file name to clipboardExpand all lines: doc/user_guide.rst
+98-98Lines changed: 98 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ MySQLdb User's Guide
88
Introduction
99
------------
1010

11-
MySQLdb is a thread-compatible interface to the popular MySQL
11+
MySQLdb is a interface to the popular MySQL
1212
database server that provides the Python database API.
1313

1414
Installation
@@ -28,7 +28,7 @@ for this module is intentionally weak because you probably should use
2828
the higher-level MySQLdb module. If you really need it, use the
2929
standard MySQL docs and transliterate as necessary.
3030

31-
.. _`MySQL documentation`: http://dev.mysql.com/doc/
31+
.. _`MySQL documentation`: https://dev.mysql.com/doc/
3232

3333

3434
MySQL C API translation
@@ -55,48 +55,48 @@ MySQL C API function mapping
5555
C API ``_mysql``
5656
=================================== ==================================
5757
``mysql_affected_rows()`` ``conn.affected_rows()``
58-
``mysql_autocommit()`` ``conn.autocommit()``
59-
``mysql_character_set_name()`` ``conn.character_set_name()``
60-
``mysql_close()`` ``conn.close()``
61-
``mysql_commit()`` ``conn.commit()``
62-
``mysql_connect()`` ``_mysql.connect()``
63-
``mysql_data_seek()`` ``result.data_seek()``
64-
``mysql_debug()`` ``_mysql.debug()``
65-
``mysql_dump_debug_info`` ``conn.dump_debug_info()``
66-
``mysql_escape_string()`` ``_mysql.escape_string()``
67-
``mysql_fetch_row()`` ``result.fetch_row()``
58+
``mysql_autocommit()`` ``conn.autocommit()``
59+
``mysql_character_set_name()`` ``conn.character_set_name()``
60+
``mysql_close()`` ``conn.close()``
61+
``mysql_commit()`` ``conn.commit()``
62+
``mysql_connect()`` ``_mysql.connect()``
63+
``mysql_data_seek()`` ``result.data_seek()``
64+
``mysql_debug()`` ``_mysql.debug()``
65+
``mysql_dump_debug_info`` ``conn.dump_debug_info()``
66+
``mysql_escape_string()`` ``_mysql.escape_string()``
67+
``mysql_fetch_row()`` ``result.fetch_row()``
6868
``mysql_get_character_set_info()`` ``conn.get_character_set_info()``
69-
``mysql_get_client_info()`` ``_mysql.get_client_info()``
70-
``mysql_get_host_info()`` ``conn.get_host_info()``
71-
``mysql_get_proto_info()`` ``conn.get_proto_info()``
72-
``mysql_get_server_info()`` ``conn.get_server_info()``
73-
``mysql_info()`` ``conn.info()``
74-
``mysql_insert_id()`` ``conn.insert_id()``
75-
``mysql_num_fields()`` ``result.num_fields()``
76-
``mysql_num_rows()`` ``result.num_rows()``
77-
``mysql_options()`` various options to ``_mysql.connect()``
78-
``mysql_ping()`` ``conn.ping()``
79-
``mysql_query()`` ``conn.query()``
80-
``mysql_real_connect()`` ``_mysql.connect()``
81-
``mysql_real_query()`` ``conn.query()``
82-
``mysql_real_escape_string()`` ``conn.escape_string()``
83-
``mysql_rollback()`` ``conn.rollback()``
84-
``mysql_row_seek()`` ``result.row_seek()``
85-
``mysql_row_tell()`` ``result.row_tell()``
86-
``mysql_select_db()`` ``conn.select_db()``
87-
``mysql_set_character_set()`` ``conn.set_character_set()``
69+
``mysql_get_client_info()`` ``_mysql.get_client_info()``
70+
``mysql_get_host_info()`` ``conn.get_host_info()``
71+
``mysql_get_proto_info()`` ``conn.get_proto_info()``
72+
``mysql_get_server_info()`` ``conn.get_server_info()``
73+
``mysql_info()`` ``conn.info()``
74+
``mysql_insert_id()`` ``conn.insert_id()``
75+
``mysql_num_fields()`` ``result.num_fields()``
76+
``mysql_num_rows()`` ``result.num_rows()``
77+
``mysql_options()`` various options to ``_mysql.connect()``
78+
``mysql_ping()`` ``conn.ping()``
79+
``mysql_query()`` ``conn.query()``
80+
``mysql_real_connect()`` ``_mysql.connect()``
81+
``mysql_real_query()`` ``conn.query()``
82+
``mysql_real_escape_string()`` ``conn.escape_string()``
83+
``mysql_rollback()`` ``conn.rollback()``
84+
``mysql_row_seek()`` ``result.row_seek()``
85+
``mysql_row_tell()`` ``result.row_tell()``
86+
``mysql_select_db()`` ``conn.select_db()``
87+
``mysql_set_character_set()`` ``conn.set_character_set()``
8888
``mysql_ssl_set()`` ``ssl`` option to ``_mysql.connect()``
89-
``mysql_stat()`` ``conn.stat()``
90-
``mysql_store_result()`` ``conn.store_result()``
91-
``mysql_thread_id()`` ``conn.thread_id()``
92-
``mysql_thread_safe_client()`` ``conn.thread_safe_client()``
93-
``mysql_use_result()`` ``conn.use_result()``
94-
``mysql_warning_count()`` ``conn.warning_count()``
95-
``CLIENT_*`` ``MySQLdb.constants.CLIENT.*``
96-
``CR_*`` ``MySQLdb.constants.CR.*``
97-
``ER_*`` ``MySQLdb.constants.ER.*``
98-
``FIELD_TYPE_*`` ``MySQLdb.constants.FIELD_TYPE.*``
99-
``FLAG_*`` ``MySQLdb.constants.FLAG.*``
89+
``mysql_stat()`` ``conn.stat()``
90+
``mysql_store_result()`` ``conn.store_result()``
91+
``mysql_thread_id()`` ``conn.thread_id()``
92+
``mysql_thread_safe_client()`` ``conn.thread_safe_client()``
93+
``mysql_use_result()`` ``conn.use_result()``
94+
``mysql_warning_count()`` ``conn.warning_count()``
95+
``CLIENT_*`` ``MySQLdb.constants.CLIENT.*``
96+
``CR_*`` ``MySQLdb.constants.CR.*``
97+
``ER_*`` ``MySQLdb.constants.ER.*``
98+
``FIELD_TYPE_*`` ``MySQLdb.constants.FIELD_TYPE.*``
99+
``FLAG_*`` ``MySQLdb.constants.FLAG.*``
100100
=================================== ==================================
101101

102102

@@ -126,7 +126,7 @@ We haven't even begun to touch upon all the parameters ``connect()``
126126
can take. For this reason, I prefer to use keyword parameters::
127127

128128
db=_mysql.connect(host="localhost",user="joebob",
129-
passwd="moonpie",db="thangs")
129+
passwd="moonpie",db="thangs")
130130

131131
This does exactly what the last example did, but is arguably easier to
132132
read. But since the default host is "localhost", and if your login
@@ -260,19 +260,19 @@ Functions and attributes
260260
Only a few top-level functions and attributes are defined within
261261
MySQLdb.
262262

263-
connect(parameters...)
264-
Constructor for creating a connection to the
265-
database. Returns a Connection Object. Parameters are the
266-
same as for the MySQL C API. In addition, there are a few
267-
additional keywords that correspond to what you would pass
268-
``mysql_options()`` before connecting. Note that some
269-
parameters must be specified as keyword arguments! The
270-
default value for each parameter is NULL or zero, as
271-
appropriate. Consult the MySQL documentation for more
272-
details. The important parameters are:
263+
connect(parameters...)
264+
Constructor for creating a connection to the
265+
database. Returns a Connection Object. Parameters are the
266+
same as for the MySQL C API. In addition, there are a few
267+
additional keywords that correspond to what you would pass
268+
``mysql_options()`` before connecting. Note that some
269+
parameters must be specified as keyword arguments! The
270+
default value for each parameter is NULL or zero, as
271+
appropriate. Consult the MySQL documentation for more
272+
details. The important parameters are:
273273

274274
host
275-
name of host to connect to. Default: use the local host
275+
name of host to connect to. Default: use the local host
276276
via a UNIX socket (where applicable)
277277

278278
user
@@ -284,11 +284,11 @@ connect(parameters...)
284284
db
285285
database to use. Default: no default database.
286286

287-
port
288-
TCP port of MySQL server. Default: standard port (3306).
287+
port
288+
TCP port of MySQL server. Default: standard port (3306).
289289

290290
unix_socket
291-
location of UNIX socket. Default: use default location or
291+
location of UNIX socket. Default: use default location or
292292
TCP for remote hosts.
293293

294294
conv
@@ -331,45 +331,45 @@ connect(parameters...)
331331
connecting (MySQL-4.1 and later), you'll need to put the
332332
correct character set name in connection.charset.
333333

334-
If False, text-like columns are returned as normal strings,
335-
but you can always write Unicode strings.
334+
If False, text-like columns are returned as normal strings,
335+
but you can always write Unicode strings.
336336

337-
*This must be a keyword parameter.*
337+
*This must be a keyword parameter.*
338338

339-
charset
340-
If present, the connection character set will be changed
341-
to this character set, if they are not equal. Support for
342-
changing the character set requires MySQL-4.1 and later
343-
server; if the server is too old, UnsupportedError will be
344-
raised. This option implies use_unicode=True, but you can
345-
override this with use_unicode=False, though you probably
346-
shouldn't.
339+
charset
340+
If present, the connection character set will be changed
341+
to this character set, if they are not equal. Support for
342+
changing the character set requires MySQL-4.1 and later
343+
server; if the server is too old, UnsupportedError will be
344+
raised. This option implies use_unicode=True, but you can
345+
override this with use_unicode=False, though you probably
346+
shouldn't.
347347

348-
If not present, the default character set is used.
348+
If not present, the default character set is used.
349349

350-
*This must be a keyword parameter.*
350+
*This must be a keyword parameter.*
351351

352-
sql_mode
353-
If present, the session SQL mode will be set to the given
354-
string. For more information on sql_mode, see the MySQL
355-
documentation. Only available for 4.1 and newer servers.
352+
sql_mode
353+
If present, the session SQL mode will be set to the given
354+
string. For more information on sql_mode, see the MySQL
355+
documentation. Only available for 4.1 and newer servers.
356356

357-
If not present, the session SQL mode will be unchanged.
357+
If not present, the session SQL mode will be unchanged.
358358

359-
*This must be a keyword parameter.*
359+
*This must be a keyword parameter.*
360360

361-
ssl
362-
This parameter takes a dictionary or mapping, where the
363-
keys are parameter names used by the mysql_ssl_set_ MySQL
364-
C API call. If this is set, it initiates an SSL connection
365-
to the server; if there is no SSL support in the client,
366-
an exception is raised. *This must be a keyword
367-
parameter.*
361+
ssl
362+
This parameter takes a dictionary or mapping, where the
363+
keys are parameter names used by the mysql_ssl_set_ MySQL
364+
C API call. If this is set, it initiates an SSL connection
365+
to the server; if there is no SSL support in the client,
366+
an exception is raised. *This must be a keyword
367+
parameter.*
368368

369369
.. _mysql_ssl_set: http://dev.mysql.com/doc/refman/en/mysql-ssl-set.html
370370

371371

372-
apilevel
372+
apilevel
373373
String constant stating the supported DB API level. '2.0'
374374

375375
threadsafety
@@ -437,11 +437,11 @@ conv
437437
value), returning a Python value
438438

439439
* a sequence of 2-tuples, where the first value is a combination
440-
of flags from ``MySQLdb.constants.FLAG``, and the second value
441-
is a function as above. The sequence is tested until the flags
442-
on the field match those of the first value. If both values
443-
are None, then the default conversion is done. Presently this
444-
is only used to distinguish TEXT and BLOB columns.
440+
of flags from ``MySQLdb.constants.FLAG``, and the second value
441+
is a function as above. The sequence is tested until the flags
442+
on the field match those of the first value. If both values
443+
are None, then the default conversion is done. Presently this
444+
is only used to distinguish TEXT and BLOB columns.
445445

446446
If the key is a Python type or class, then the value is a
447447
callable Python object (usually a function) taking two arguments
@@ -522,7 +522,7 @@ close()
522522

523523
info()
524524
Returns some information about the last query. Normally
525-
you don't need to check this. If there are any MySQL
525+
you don't need to check this. If there are any MySQL
526526
warnings, it will cause a Warning to be issued through
527527
the Python warning module. By default, Warning causes a
528528
message to appear on the console. However, it is possible
@@ -542,7 +542,7 @@ nextset()
542542
sets, it returns None; otherwise it returns a true value.
543543

544544
Note that MySQL doesn't support multiple result sets until 4.1.
545-
545+
546546

547547
Some examples
548548
.............
@@ -598,13 +598,13 @@ The only other method you are very likely to use is when you have to
598598
do a multi-row insert::
599599

600600
c.executemany(
601-
"""INSERT INTO breakfast (name, spam, eggs, sausage, price)
602-
VALUES (%s, %s, %s, %s, %s)""",
603-
[
604-
("Spam and Sausage Lover's Plate", 5, 1, 8, 7.95 ),
605-
("Not So Much Spam Plate", 3, 2, 0, 3.95 ),
606-
("Don't Wany ANY SPAM! Plate", 0, 4, 3, 5.95 )
607-
] )
601+
"""INSERT INTO breakfast (name, spam, eggs, sausage, price)
602+
VALUES (%s, %s, %s, %s, %s)""",
603+
[
604+
("Spam and Sausage Lover's Plate", 5, 1, 8, 7.95 ),
605+
("Not So Much Spam Plate", 3, 2, 0, 3.95 ),
606+
("Don't Wany ANY SPAM! Plate", 0, 4, 3, 5.95 )
607+
] )
608608

609609
Here we are inserting three rows of five values. Notice that there is
610610
a mix of types (strings, ints, floats) though we still only use

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.