Home | Trees | Index | Help |
---|
Module _mysql |
|
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 |
---|
connect(...)Returns a MYSQL connection object. Exclusive use of keyword parameters strongly recommended. Consult the MySQL C API documentation for more details.
|
debug(...)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. |
escape(obj, dict)using mapping dict to provide quoting functions for each type. Returns a SQL literal string. |
escape_dict(...)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. |
escape_sequence(seq, dict)seq using mapping dict to provide quoting functions for each type. Returns a tuple of escaped items. |
escape_string(s)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. |
get_client_info()the client library version. |
server_end(...)Shut down embedded server. If not using an embedded server, this does nothing. |
server_init(...)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 |
string_literal(obj)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. |
thread_safe(...)Indicates whether the client is compiled as thread-safe. |
Variable Details |
---|
__version__
|
NULL
|
version_info
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Sat Mar 3 21:14:16 2007 | http://epydoc.sf.net |