Home | Trees | Index | Help |
---|
an adaptation of the MySQL C API (mostly)
You probably are better off using MySQLdb instead of using this module directly.
In general, renaming goes from mysql_* to _mysql.*. _mysql.connect() returns a connection object (MYSQL). Functions which expect MYSQL * as an argument are now methods of the connection object. A number of things return result objects (MYSQL_RES). Functions which expect MYSQL_RES * as an argument are now methods of the result object. Deprecated functions (as of 3.23) are NOT implemented.
Classes | |
---|---|
connection |
Returns a MYSQL connection object. |
result |
result(connection, use=0, converter={}) -- Result set from a query. |
Function Summary | |
---|---|
Returns a MYSQL connection object. | |
Does a DBUG_PUSH with the given string. | |
using mapping dict to provide quoting functions for each type. | |
escape_sequence(d, dict) -- escape any special characters in dictionary d using mapping dict to provide quoting functions for each type. | |
seq using mapping dict to provide quoting functions for each type. | |
Use connection.escape_string(s), if you use it at all. | |
the client library version. | |
Shut down embedded server. | |
Initialize embedded server. | |
This means, any special SQL characters are escaped, and it is enclosed within single quotes. | |
Indicates whether the client is compiled as thread-safe. |
Variable Summary | |
---|---|
str |
__version__ = '1.2.2c1'
|
dict |
__warningregistry__ = {('Module _mysql was already impor...
|
str |
NULL = 'NULL'
|
tuple |
version_info = (1, 2, 2, 'gamma', 1)
|
Function Details |
---|
Returns a MYSQL connection object. Exclusive use of keyword parameters strongly recommended. Consult the MySQL C API documentation for more details.
Does a DBUG_PUSH with the given string. mysql_debug() uses the Fred Fish debug library. To use this function, you must compile the client library to support debugging.
using mapping dict to provide quoting functions for each type. Returns a SQL literal string.
escape_sequence(d, dict) -- escape any special characters in dictionary d using mapping dict to provide quoting functions for each type. Returns a dictionary of escaped items.
seq using mapping dict to provide quoting functions for each type. Returns a tuple of escaped items.
Use connection.escape_string(s), if you use it at all. _mysql.escape_string(s) cannot handle character sets. You are probably better off using connection.escape(o) instead, since it will escape entire sequences as well as strings.
the client library version.
Shut down embedded server. If not using an embedded server, this does nothing.
Initialize embedded server. If this client is not linked against the embedded server library, this function does nothing.
args -- sequence of command-line arguments groups -- sequence of groups to use in defaults files
This means, any special SQL characters are escaped, and it is enclosed within single quotes. In other words, it performs:
"'%s'" % escape_string(str(obj))
Use connection.string_literal(obj), if you use it at all. _mysql.string_literal(obj) cannot handle character sets.
Indicates whether the client is compiled as thread-safe.
Variable Details |
---|
str
'1.2.2c1'
dict
{('Module _mysql was already imported from /usr/lib/python2.4/site-pac\ kages/MySQL_python-1.2.2c1-py2.4-linux-i686.egg/_mysql.pyc, but /home/\ andy/devel/MySQLdb-1.2 is being added to sys.path', <class exceptions.\ UserWarning at 0xb7e1ae6c>, 3): 1}
str
'NULL'
tuple
(1, 2, 2, 'gamma', 1)
Home | Trees | Index | Help |
---|