diff --git a/MySQLdb/MANIFEST.in b/MySQLdb/MANIFEST.in index c69c310..2f1edda 100644 --- a/MySQLdb/MANIFEST.in +++ b/MySQLdb/MANIFEST.in @@ -1,5 +1,5 @@ prune CVS -recursive-include doc *.txt *.html +recursive-include doc *.txt *.html *.css include MANIFEST.in include MANIFEST include ChangeLog diff --git a/MySQLdb/MySQLdb/connections.py b/MySQLdb/MySQLdb/connections.py index 5999f76..b0336c3 100644 --- a/MySQLdb/MySQLdb/connections.py +++ b/MySQLdb/MySQLdb/connections.py @@ -46,33 +46,65 @@ class Connection(_mysql.connection): that you only use keyword parameters. Consult the MySQL C API documentation for more information. - host -- string, host to connect - user -- string, user to connect as - passwd -- string, password to use - db -- string, database to use - port -- integer, TCP/IP port to connect to - unix_socket -- string, location of unix_socket to use - conv -- conversion dictionary, see MySQLdb.converters - connect_time -- number of seconds to wait before the connection - attempt fails. - compress -- if set, compression is enabled - named_pipe -- if set, a named pipe is used to connect (Windows only) - init_command -- command which is run once the connection is created - read_default_file -- file from which default client values are read - read_default_group -- configuration group to use from the default file - cursorclass -- class object, used to create cursors (keyword only) - use_unicode -- If True, text-like columns are returned as - unicode objects using the connection's character set. - Otherwise, text-like columns are returned as strings. - columns are returned as normal strings. Unicode objects - will always be encoded to the connection's character set - regardless of this setting. - client_flag -- integer, flags to use or 0 - (see MySQL docs or constants/CLIENTS.py) - ssl -- dictionary or mapping, contains SSL connection parameters; see - the MySQL documentation for more details (mysql_ssl_set()). - If this is set, and the client does not support SSL, - UnsupportedError will be raised. + host + string, host to connect + + user + string, user to connect as + + passwd + string, password to use + + db + string, database to use + + port + integer, TCP/IP port to connect to + + unix_socket + string, location of unix_socket to use + + conv + conversion dictionary, see MySQLdb.converters + + connect_time + number of seconds to wait before the connection attempt + fails. + + compress + if set, compression is enabled + + named_pipe + if set, a named pipe is used to connect (Windows only) + + init_command + command which is run once the connection is created + + read_default_file + file from which default client values are read + + read_default_group + configuration group to use from the default file + + cursorclass + class object, used to create cursors (keyword only) + + use_unicode + If True, text-like columns are returned as unicode objects + using the connection's character set. Otherwise, text-like + columns are returned as strings. columns are returned as + normal strings. Unicode objects will always be encoded to + the connection's character set regardless of this setting. + + client_flag + integer, flags to use or 0 + (see MySQL docs or constants/CLIENTS.py) + + ssl + dictionary or mapping, contains SSL connection parameters; + see the MySQL documentation for more details + (mysql_ssl_set()). If this is set, and the client does not + support SSL, UnsupportedError will be raised. There are a number of undocumented, non-standard methods. See the documentation for the MySQL C API for some hints on what they do. diff --git a/MySQLdb/MySQLdb/converters.py b/MySQLdb/MySQLdb/converters.py index 412a99c..fe1cd00 100644 --- a/MySQLdb/MySQLdb/converters.py +++ b/MySQLdb/MySQLdb/converters.py @@ -6,18 +6,25 @@ dictionary conversions maps some kind of type to a conversion function which returns the corresponding value: Key: FIELD_TYPE.* (from MySQLdb.constants) + Conversion function: - Arguments: string - Returns: Python object + + Arguments: string + + Returns: Python object Key: Python type object (from types) or class + Conversion function: - Arguments: Python object of indicated type or class AND - conversion dictionary - Returns: SQL literal value - Notes: Most conversion functions can ignore the dictionary, but - it is a required parameter. It is necessary for converting - things like sequences and instances. + + Arguments: Python object of indicated type or class AND + conversion dictionary + + Returns: SQL literal value + + Notes: Most conversion functions can ignore the dictionary, but + it is a required parameter. It is necessary for converting + things like sequences and instances. Don't modify conversions if you can avoid it. Instead, make copies (with the copy() method), modify the copies, and then pass them to diff --git a/MySQLdb/_mysql.c b/MySQLdb/_mysql.c index 7c32534..51882e2 100644 --- a/MySQLdb/_mysql.c +++ b/MySQLdb/_mysql.c @@ -540,21 +540,46 @@ static char _mysql_connect__doc__[] = keyword parameters strongly recommended. Consult the\n\ MySQL C API documentation for more details.\n\ \n\ -host -- string, host to connect\n\ -user -- string, user to connect as\n\ -passwd -- string, password to use\n\ -db -- string, database to use\n\ -port -- integer, TCP/IP port to connect to\n\ -unix_socket -- string, location of unix_socket (UNIX-ish only)\n\ -conv -- mapping, maps MySQL FIELD_TYPE.* to Python functions which\n\ - convert a string to the appropriate Python type\n\ -connect_timeout -- number of seconds to wait before the connection\n\ - attempt fails.\n\ -compress -- if set, gzip compression is enabled\n\ -named_pipe -- if set, connect to server via named pipe (Windows only)\n\ -init_command -- command which is run once the connection is created\n\ -read_default_file -- see the MySQL documentation for mysql_options()\n\ -read_default_group -- see the MySQL documentation for mysql_options()\n\ +host\n\ + string, host to connect\n\ +\n\ +user\n\ + string, user to connect as\n\ +\n\ +passwd\n\ + string, password to use\n\ +\n\ +db\n\ + string, database to use\n\ +\n\ +port\n\ + integer, TCP/IP port to connect to\n\ +\n\ +unix_socket\n\ + string, location of unix_socket (UNIX-ish only)\n\ +\n\ +conv\n\ + mapping, maps MySQL FIELD_TYPE.* to Python functions which\n\ + convert a string to the appropriate Python type\n\ +\n\ +connect_timeout\n\ + number of seconds to wait before the connection\n\ + attempt fails.\n\ +\n\ +compress\n\ + if set, gzip compression is enabled\n\ +\n\ +named_pipe\n\ + if set, connect to server via named pipe (Windows only)\n\ +\n\ +init_command\n\ + command which is run once the connection is created\n\ +\n\ +read_default_file\n\ + see the MySQL documentation for mysql_options()\n\ +\n\ +read_default_group\n\ + see the MySQL documentation for mysql_options()\n\ "; static PyObject * @@ -801,7 +826,7 @@ _mysql_ConnectionObject_set_server_option( static char _mysql_ConnectionObject_sqlstate__doc__[] = "Returns a string containing the SQLSTATE error code\n\ for the last error. The error code consists of five characters.\n\ -'00000' means ``no error.'' The values are specified by ANSI SQL\n\ +'00000' means \"no error.\" The values are specified by ANSI SQL\n\ and ODBC. For a list of possible values, see section 23\n\ Error Handling in MySQL in the MySQL Manual.\n\ \n\