Returns a MYSQL connection object. Exclusive use of
keyword parameters strongly recommended. Consult the
MySQL C API documentation for more details.
| Method Summary |
| |
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
| |
__repr__(x)
x.__repr__() <==> repr(x) |
| |
affected_rows(...)
Return number of rows affected by the last query. |
| |
autocommit(...)
Set the autocommit mode. |
| |
change_user(...)
Changes the user and causes the database specified by db to
become the default (current) database on the connection
specified by mysql. |
| |
character_set_name(...)
Returns the default character set for the current connection. |
| |
close(...)
Close the connection. |
| |
commit(...)
Commits the current transaction |
| |
dump_debug_info(...)
Instructs the server to write some debug information to the
log. |
| |
errno(...)
Returns the error code for the most recently invoked API function
that can succeed or fail. |
| |
error(...)
Returns the error message for the most recently invoked API function
that can succeed or fail. |
| |
escape(obj,
dict)
using mapping dict to provide quoting functions for each type. |
| |
escape_string(s)
Use connection.escape_string(s), if you use it at all. |
| |
field_count(...)
Returns the number of columns for the most recent query on the
connection. |
| |
get_host_info(...)
Returns a string that represents the MySQL client library
version. |
| |
get_proto_info(...)
Returns an unsigned integer representing the protocol version
used by the current connection. |
| |
get_server_info(...)
Returns a string that represents the server version number. |
| |
info(...)
Retrieves a string providing information about the most
recently executed query. |
| |
insert_id(...)
Returns the ID generated for an AUTO_INCREMENT column by the previous
query. |
| |
kill(...)
Asks the server to kill the thread specified by pid. |
| |
next_result(...)
If more query results exist, next_result() reads the next query
results and returns the status back to application. |
| |
ping(...)
Checks whether or not the connection to the server is
working. |
| |
query(...)
Execute a query. |
| |
rollback(...)
Rolls backs the current transaction |
| |
select_db(...)
Causes the database specified by db to become the default
(current) database on the connection specified by mysql. |
| |
set_server_option(option)
for the connection. |
| |
shutdown(...)
Asks the database server to shut down. |
| |
sqlstate(...)
Returns a string containing the SQLSTATE error code
for the last error. |
| |
stat(...)
Returns a character string containing information similar to
that provided by the mysqladmin status command. |
| |
store_result(...)
Returns a result object acquired by mysql_store_result
(results stored in the client). |
| |
string_literal(obj)
This means, any special SQL characters are escaped, and it is enclosed
within single quotes. |
| |
thread_id(...)
Returns the thread ID of the current connection. |
| |
use_result(...)
Returns a result object acquired by mysql_use_result
(results stored in the server). |
| |
warning_count(...)
Returns the number of warnings generated during execution
of the previous SQL statement. |
| Inherited from object |
| |
__delattr__(...)
x.__delattr__('name') <==> del x.name |
| |
__getattribute__(...)
x.__getattribute__('name') <==> x.name |
| |
__hash__(x)
x.__hash__() <==> hash(x) |
| |
__reduce__(...)
helper for pickle |
| |
__reduce_ex__(...)
helper for pickle |
| |
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value |
| |
__str__(x)
x.__str__() <==> str(x) |
| Inherited from type |
| |
__new__(T,
S,
...)
T.__new__(S, ...) -> a new object with type S, a subtype of T |